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/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/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/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_helpers.py b/AutomatedTesting/Editor/Scripts/scene_helpers.py new file mode 100644 index 0000000000..761068e796 --- /dev/null +++ b/AutomatedTesting/Editor/Scripts/scene_helpers.py @@ -0,0 +1,95 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +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): + """ + Removes illegal filename characters from a string. + + :param name: String to clean. + :return: 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 + + :param scene_graph: Scene graph to search + :return: 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..db8df09091 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 +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,53 @@ 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 +80,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 +92,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 +101,82 @@ 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", 1, "Col0", 2, "Col0", 2, 3) + 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, 1, 0) + # 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 +188,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 +212,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/Gem/PythonTests/Atom/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py index 292bb9c19c..f0bb6e72ca 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py @@ -12,6 +12,7 @@ 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__) @@ -159,3 +160,17 @@ class TestMaterialEditorBasicTests(object): enable_prefab_system=False, ) + +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +class TestAutomation(EditorTestSuite): + + enable_prefab_system = False + + @pytest.mark.test_case_id("C36529666") + class AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded(EditorSharedTest): + from Atom.tests import hydra_AtomEditorComponentsLevel_DiffuseGlobalIlluminationAdded as test_module + + @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_constants.py b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py index ef9e90802b..c73f75fbc0 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py @@ -18,6 +18,13 @@ LIGHT_TYPES = { 'simple_spot': 7, } +# Qualiity Level settings for Diffuse Global Illumination level component +GLOBAL_ILLUMINATION_QUALITY = { + 'Low': 0, + 'Medium': 1, + 'High': 2, +} + class AtomComponentProperties: """ @@ -116,6 +123,21 @@ class AtomComponentProperties: } return properties[property] + @staticmethod + 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: """ @@ -148,12 +170,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] @@ -390,7 +417,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/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_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/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 642d7279a4..bd9740f60f 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/README.txt +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/README.txt @@ -26,8 +26,8 @@ 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 + 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: 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 59e454479c..2d1c34b9c4 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 @@ -107,7 +107,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 +119,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. @@ -459,3 +459,110 @@ class EditorEntity: """ 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/utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py index 481d73274f..212c862efd 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 diff --git a/AutomatedTesting/Gem/PythonTests/Physics/utils/FileManagement.py b/AutomatedTesting/Gem/PythonTests/Physics/utils/FileManagement.py index 017bb672a4..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) 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 c1d4836342..6e1f94d358 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main.py @@ -61,3 +61,11 @@ class TestAutomation(TestAutomationBase): 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/create_prefab/CreatePrefab_WithSingleEntity.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py index 80f4c0e596..eb8a262a69 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py @@ -24,6 +24,7 @@ def CreatePrefab_WithSingleEntity(): # 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/detach_prefab/DetachPrefab_UnderAnotherPrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py index 5c97f0b032..69dbcfc89c 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py @@ -7,8 +7,8 @@ SPDX-License-Identifier: Apache-2.0 OR MIT def DetachPrefab_UnderAnotherPrefab(): - CAR_PREFAB_FILE_NAME = 'car_prefab' - WHEEL_PREFAB_FILE_NAME = 'wheel_prefab' + CAR_PREFAB_FILE_NAME = 'car_prefab2' + WHEEL_PREFAB_FILE_NAME = 'wheel_prefab2' import editor_python_test_tools.pyside_utils as pyside_utils 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/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 index e68b0932c2..390ec6a6b0 100644 --- a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py @@ -72,7 +72,7 @@ def Terrain_SupportsPhysics(): # 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 = ["Vegetation Reference Shape", "Gradient Transform Modifier", "FastNoise Gradient"] + 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) diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py index 41b6774046..60d6e2b75f 100644 --- a/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py @@ -28,5 +28,11 @@ class TestAutomation(EditorTestSuite): 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 \ No newline at end of file + from .EditorScripts import TerrainMacroMaterialComponent_MacroMaterialActivates as test_module 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/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_processor_batch_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests.py index 2d67bca8fe..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 @@ -724,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/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/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..af92bb1773 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/bundle_mode_tests.py @@ -0,0 +1,93 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +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', ['auto_test']) +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, "level.pak") + + 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/automatedtesting_shared/base.py b/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py index 4543888a7c..88188aa6c0 100755 --- a/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py +++ b/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT import os import logging -import subprocess +import sys import pytest import time @@ -128,7 +128,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: diff --git a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt index bf42579970..1fc71da972 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt @@ -7,60 +7,6 @@ # 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 - TEST_SERIAL - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main.py - PYTEST_MARKS "not REQUIRES_gpu" - RUNTIME_DEPENDENCIES - Legacy::Editor - AZ::AssetProcessor - AutomatedTesting.Assets - COMPONENT - Editor - ) - - ly_add_pytest( - NAME AutomatedTesting::EditorTests_Main_GPU - TEST_SUITE main - TEST_SERIAL - TEST_REQUIRES gpu - PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main.py - PYTEST_MARKS "REQUIRES_gpu" - RUNTIME_DEPENDENCIES - Legacy::Editor - AZ::AssetProcessor - AutomatedTesting.Assets - COMPONENT - 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 diff --git a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main_Optimized.py index ccc4ee9737..d87fd8625b 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main_Optimized.py @@ -49,7 +49,6 @@ class TestAutomationNoAutoTestMode(EditorTestSuite): 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"]) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt index 98801b49d6..ba607ede32 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt @@ -11,24 +11,10 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ ## DynVeg ## ly_add_pytest( - NAME AutomatedTesting::DynamicVegetationTests_Main + NAME AutomatedTesting::DynamicVegetationTests_Main_Optimized 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 + PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg/TestSuite_Main_Optimized.py RUNTIME_DEPENDENCIES AZ::AssetProcessor Legacy::Editor @@ -37,7 +23,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ COMPONENT LargeWorlds ) - ly_add_pytest( NAME AutomatedTesting::DynamicVegetationTests_Periodic_Optimized TEST_SERIAL @@ -52,20 +37,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ 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 - COMPONENT - LargeWorlds - ) - ## LandscapeCanvas ## ly_add_pytest( 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..fa45e057e2 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,9 +72,9 @@ 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 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..2353095849 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 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..130d56937b 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) 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..42604cd2da 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. @@ -67,7 +67,7 @@ def LayerSpawner_InstancesPlantInAllSupportedShapes(): 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/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py index ed23af51ad..673e40e397 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py @@ -12,13 +12,23 @@ 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): 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 @@ -38,10 +48,7 @@ class TestAutomation(EditorTestSuite): 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.cleanup_test_slices(self, workspace) from .EditorScripts import SpawnerSlices_SliceCreationAndVisibilityToggleWorks as test_module class test_AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea(EditorParallelTest): @@ -152,23 +159,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.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.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.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.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.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.cleanup_test_level(self, workspace) 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/Levels/macbeth_shaderballs/macbeth_shaderballs.prefab b/AutomatedTesting/Levels/macbeth_shaderballs/macbeth_shaderballs.prefab new file mode 100644 index 0000000000..22504f168a --- /dev/null +++ b/AutomatedTesting/Levels/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/macbeth_shaderballs/tags.txt b/AutomatedTesting/Levels/macbeth_shaderballs/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/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/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/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/Code/Editor/BaseLibrary.cpp b/Code/Editor/BaseLibrary.cpp index 9f26630c2c..15742bd254 100644 --- a/Code/Editor/BaseLibrary.cpp +++ b/Code/Editor/BaseLibrary.cpp @@ -14,66 +14,6 @@ #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. diff --git a/Code/Editor/BaseLibraryItem.cpp b/Code/Editor/BaseLibraryItem.cpp index b1fba91fad..e3788bc3e4 100644 --- a/Code/Editor/BaseLibraryItem.cpp +++ b/Code/Editor/BaseLibraryItem.cpp @@ -29,7 +29,6 @@ public: 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"); @@ -45,13 +44,8 @@ public: 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 @@ -59,11 +53,6 @@ protected: return m_size; } - QString GetDescription() override - { - return m_description; - } - void Undo(bool bUndo) override { //find the libItem @@ -111,7 +100,6 @@ protected: } 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 diff --git a/Code/Editor/BaseLibraryManager.cpp b/Code/Editor/BaseLibraryManager.cpp index 3370165ddb..0e51a5238c 100644 --- a/Code/Editor/BaseLibraryManager.cpp +++ b/Code/Editor/BaseLibraryManager.cpp @@ -17,120 +17,6 @@ #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. ////////////////////////////////////////////////////////////////////////// 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/CryEdit.cpp b/Code/Editor/CryEdit.cpp index 4b725ac3d7..d5f2305dfb 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 @@ -4016,7 +4017,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() diff --git a/Code/Editor/CryEditDoc.cpp b/Code/Editor/CryEditDoc.cpp index 9c6c257ac0..3bcba4d5e0 100644 --- a/Code/Editor/CryEditDoc.cpp +++ b/Code/Editor/CryEditDoc.cpp @@ -51,7 +51,6 @@ #include "GameExporter.h" #include "MainWindow.h" #include "LevelFileDialog.h" -#include "StatObjBus.h" #include "Undo/Undo.h" #include @@ -246,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. ////////////////////////////////////////////////////////////////////////// @@ -308,8 +304,6 @@ void CCryEditDoc::Save(TDocMultiArchive& arrXmlAr) // Fog settings /////////////////////////////////////////////////////// SerializeFogSettings((*arrXmlAr[DMAS_GENERAL])); - - SerializeNameSelection((*arrXmlAr[DMAS_GENERAL])); } } AfterSave(); @@ -455,12 +449,6 @@ void CCryEditDoc::Load(TDocMultiArchive& arrXmlAr, const QString& szFilename) } } - if (!isPrefabEnabled) - { - // Name Selection groups - SerializeNameSelection((*arrXmlAr[DMAS_GENERAL])); - } - { CAutoLogTime logtime("Post Load"); @@ -595,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) 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/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 ae188c7d98..e06b9696e1 100644 --- a/Code/Editor/EditorViewportSettings.cpp +++ b/Code/Editor/EditorViewportSettings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace SandboxEditor { @@ -57,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() @@ -118,399 +94,409 @@ namespace SandboxEditor AZ::Vector3 CameraDefaultEditorPosition() { return AZ::Vector3( - aznumeric_cast(GetRegistry(CameraDefaultStartingPositionX, 0.0)), - aznumeric_cast(GetRegistry(CameraDefaultStartingPositionY, -10.0)), - aznumeric_cast(GetRegistry(CameraDefaultStartingPositionZ, 4.0))); + aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionX, 0.0)), + aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionY, -10.0)), + aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionZ, 4.0))); } 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(GetRegistry(CameraDefaultOrbitDistanceSetting, 20.0)); + return aznumeric_cast(AzToolsFramework::GetRegistry(CameraDefaultOrbitDistanceSetting, 20.0)); } void SetCameraDefaultOrbitDistance(const float distance) { - SetRegistry(CameraDefaultOrbitDistanceSetting, 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/EditorViewportWidget.cpp b/Code/Editor/EditorViewportWidget.cpp index 132729466c..7323da9e95 100644 --- a/Code/Editor/EditorViewportWidget.cpp +++ b/Code/Editor/EditorViewportWidget.cpp @@ -97,9 +97,6 @@ #include -#include -#include - AZ_CVAR( bool, ed_visibility_logTiming, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Output the timing of the new IVisibilitySystem query"); @@ -475,7 +472,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) { @@ -717,7 +714,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()))))); @@ -881,31 +878,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)); -} - -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; @@ -2135,7 +2112,7 @@ bool EditorViewportWidget::GetActiveCameraState(AzFramework::CameraState& camera { if (m_pPrimaryViewport == this) { - cameraState = GetCameraState(); + cameraState = m_renderViewport->GetCameraState(); return true; } diff --git a/Code/Editor/EditorViewportWidget.h b/Code/Editor/EditorViewportWidget.h index 0101f2ffef..3d52b2416d 100644 --- a/Code/Editor/EditorViewportWidget.h +++ b/Code/Editor/EditorViewportWidget.h @@ -205,8 +205,6 @@ private: void* GetSystemCursorConstraintWindow() const override; // AzToolsFramework::MainEditorViewportInteractionRequestBus overrides ... - AZ::Vector3 PickTerrain(const AzFramework::ScreenPoint& point) override; - float TerrainHeight(const AZ::Vector2& position) override; bool ShowingWorldSpace() override; QWidget* GetWidgetForViewportContextMenu() override; @@ -293,9 +291,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; 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 6f434eda98..e82832fc21 100644 --- a/Code/Editor/GameEngine.cpp +++ b/Code/Editor/GameEngine.cpp @@ -35,7 +35,6 @@ // CryCommon #include -#include #include // Editor @@ -157,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() @@ -595,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); diff --git a/Code/Editor/GameEngine.h b/Code/Editor/GameEngine.h index 4104e9aeac..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 @@ -159,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/IEditor.h b/Code/Editor/IEditor.h index 7c49819d83..48c8392f32 100644 --- a/Code/Editor/IEditor.h +++ b/Code/Editor/IEditor.h @@ -508,8 +508,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; diff --git a/Code/Editor/IEditorImpl.cpp b/Code/Editor/IEditorImpl.cpp index 66c64d5bef..e5df6be58e 100644 --- a/Code/Editor/IEditorImpl.cpp +++ b/Code/Editor/IEditorImpl.cpp @@ -397,11 +397,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 +682,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) diff --git a/Code/Editor/IEditorImpl.h b/Code/Editor/IEditorImpl.h index 26701edec2..4976c0c1ca 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 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/IDisplayViewport.h b/Code/Editor/Include/IDisplayViewport.h index 132c62804c..2dab2802c7 100644 --- a/Code/Editor/Include/IDisplayViewport.h +++ b/Code/Editor/Include/IDisplayViewport.h @@ -6,9 +6,6 @@ * */ - -#ifndef CRYINCLUDE_EDITOR_INCLUDE_IDISPLAYVIEWPORT_H -#define CRYINCLUDE_EDITOR_INCLUDE_IDISPLAYVIEWPORT_H #pragma once struct DisplayContext; @@ -22,7 +19,6 @@ struct IDisplayViewport { virtual void Update() = 0; virtual float GetScreenScaleFactor(const Vec3& position) const = 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. @@ -48,12 +44,9 @@ struct IDisplayViewport 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; @@ -62,5 +55,3 @@ struct IDisplayViewport virtual CViewport *asCViewport() { return nullptr; } }; - -#endif // CRYINCLUDE_EDITOR_INCLUDE_IDISPLAYVIEWPORT_H 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/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/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/Lib/Tests/test_ObjectManagerPythonBindings.cpp b/Code/Editor/Lib/Tests/test_ObjectManagerPythonBindings.cpp index 39a89670ef..64b7d36d30 100644 --- a/Code/Editor/Lib/Tests/test_ObjectManagerPythonBindings.cpp +++ b/Code/Editor/Lib/Tests/test_ObjectManagerPythonBindings.cpp @@ -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/MainWindow.cpp b/Code/Editor/MainWindow.cpp index f6744ec2d2..38e433c3a3 100644 --- a/Code/Editor/MainWindow.cpp +++ b/Code/Editor/MainWindow.cpp @@ -576,7 +576,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); diff --git a/Code/Editor/Objects/BaseObject.cpp b/Code/Editor/Objects/BaseObject.cpp index b721dba56b..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); @@ -1183,47 +1128,6 @@ bool CBaseObject::CanBeDrawn(const DisplayContext& dc, bool& outDisplaySelection return bResult; } -////////////////////////////////////////////////////////////////////////// -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) { @@ -1237,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) @@ -1260,7 +1159,6 @@ void CBaseObject::SetHidden(bool bHidden, uint64 hiddenID, bool bAnimated) ClearFlags(OBJFLAG_HIDDEN); } - m_hideOrder = hiddenID; UpdateVisibility(!IsHidden()); } } @@ -1270,7 +1168,7 @@ void CBaseObject::SetFrozen(bool bFrozen) { if (CheckFlags(OBJFLAG_FROZEN) != bFrozen) { - StoreUndo("Freeze Object"); + StoreUndo(); if (bFrozen) { SetFlags(OBJFLAG_FROZEN); @@ -1356,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; @@ -1403,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. { @@ -1467,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 { @@ -1490,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) { @@ -1507,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)) @@ -1601,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)) @@ -1619,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()) @@ -1901,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 { @@ -1987,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) { @@ -2044,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; @@ -2089,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); @@ -2127,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; @@ -2158,7 +1894,6 @@ void CBaseObject::DetachThis(bool bKeepPos) SetTransformDelegate(pTransformDelegate); - static_cast(GetObjectManager())->NotifyObjectListeners(this, ON_DETACHED); NotifyListeners(ON_DETACHED); } } @@ -2262,12 +1997,6 @@ Matrix34 CBaseObject::GetParentAttachPointWorldTM() const return Matrix34(IDENTITY); } -////////////////////////////////////////////////////////////////////////// -bool CBaseObject::IsParentAttachmentValid() const -{ - return true; -} - ////////////////////////////////////////////////////////////////////////// void CBaseObject::InvalidateTM([[maybe_unused]] int flags) { @@ -2418,7 +2147,7 @@ void CBaseObject::SetLookAt(CBaseObject* target) return; } - StoreUndo("Change LookAt"); + StoreUndo(); if (m_lookat) { @@ -2543,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) { @@ -2635,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 ab14437659..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; @@ -682,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); @@ -703,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; }; @@ -732,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); @@ -741,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; } @@ -766,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. @@ -823,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 f4df4f95c6..8f54be78fe 100644 --- a/Code/Editor/Objects/DisplayContext.h +++ b/Code/Editor/Objects/DisplayContext.h @@ -81,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; } @@ -108,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 e884f874e0..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) { diff --git a/Code/Editor/Objects/EntityObject.cpp b/Code/Editor/Objects/EntityObject.cpp index ae847da160..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) { @@ -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); }); } } } @@ -1154,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); @@ -1256,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: @@ -1350,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) { @@ -1554,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; @@ -1588,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) { @@ -1624,7 +1464,7 @@ int CEntityObject::AddEntityLink(const QString& name, GUID targetEntityId) } } - StoreUndo("Add EntityLink"); + StoreUndo(); CLineGizmo* pLineGizmo = nullptr; @@ -1672,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) { @@ -1695,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) { @@ -1842,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) @@ -1901,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() { @@ -2171,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 a4f4752b75..c3e379bccc 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 @@ -81,11 +78,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 +94,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; @@ -139,14 +127,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; } ////////////////////////////////////////////////////////////////////////// @@ -220,20 +203,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); @@ -242,10 +217,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); @@ -327,7 +298,6 @@ protected: // Used for light entities float m_projectorFOV; - IStatObj* m_visualObject; AABB m_box; ////////////////////////////////////////////////////////////////////////// @@ -388,8 +358,6 @@ protected: XmlNodeRef m_physicsState; AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING - static float m_helperScale; - EAttachmentType m_attachmentType; bool m_bEnableReload; @@ -433,7 +401,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/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..fc1014ad03 100644 --- a/Code/Editor/Objects/ObjectLoader.h +++ b/Code/Editor/Objects/ObjectLoader.h @@ -6,18 +6,13 @@ * */ - -#ifndef CRYINCLUDE_EDITOR_OBJECTS_OBJECTLOADER_H -#define CRYINCLUDE_EDITOR_OBJECTS_OBJECTLOADER_H #pragma once #include "Util/GuidUtil.h" #include "ErrorReport.h" +#include -#include - -class CPakFile; class CErrorRecord; struct IObjectManager; @@ -43,63 +38,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 +69,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 +94,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 fb5b2b68c2..1dea6ece7f 100644 --- a/Code/Editor/Objects/ObjectManager.cpp +++ b/Code/Editor/Objects/ObjectManager.cpp @@ -50,7 +50,7 @@ public: GUID guid; public: - virtual ~CXMLObjectClassDesc() = default; + virtual ~CXMLObjectClassDesc() = default; REFGUID ClassID() override { return guid; @@ -81,60 +81,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) { @@ -307,12 +274,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; } @@ -340,10 +301,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) { @@ -356,7 +313,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. @@ -366,7 +322,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)); } @@ -377,8 +333,6 @@ void CObjectManager::DeleteObject(CBaseObject* obj) obj->Done(); - NotifyObjectListeners(obj, CBaseObject::ON_DELETE); - RemoveObject(obj); } @@ -451,22 +405,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); @@ -474,7 +416,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(); } @@ -488,17 +430,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 { @@ -609,7 +540,6 @@ bool CObjectManager::AddObject(CBaseObject* obj) RegisterObjectName(obj->GetName()); InvalidateVisibleList(); - NotifyObjectListeners(obj, CBaseObject::ON_ADD); return true; } @@ -630,12 +560,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)); @@ -663,54 +587,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)); } } @@ -731,28 +608,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; @@ -761,7 +619,6 @@ void CObjectManager::SendEvent(ObjectEvent event) if (event == EVENT_RELOAD_ENTITY) { - m_bInReloading = false; GetIEditor()->Notify(eNotify_OnReloadTrackView); } } @@ -781,93 +638,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 (const 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) { @@ -883,14 +653,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). @@ -910,14 +672,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). @@ -936,139 +690,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() { @@ -1122,63 +743,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); @@ -1250,157 +814,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) @@ -1431,95 +845,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.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) { @@ -1570,50 +901,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) @@ -1648,14 +938,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) { @@ -1667,64 +949,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) { @@ -1789,181 +1013,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() { @@ -2005,27 +1054,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) { @@ -2054,69 +1082,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; } ////////////////////////////////////////////////////////////////////////// @@ -2164,130 +1129,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 { @@ -2367,93 +1208,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"); @@ -2641,16 +1395,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/Plugin.cpp b/Code/Editor/Plugin.cpp index 4f6fe0279d..68f8d8833b 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; } 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 4961e7004d..9342c17a37 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp @@ -447,7 +447,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) { @@ -1396,7 +1396,7 @@ void SandboxIntegrationManager::ContextMenu_NewEntity() { worldPosition = AzToolsFramework::FindClosestPickIntersection( view->GetViewportId(), AzFramework::ScreenPointFromVector2(m_contextMenuViewPoint), AzToolsFramework::EditorPickRayLength, - GetDefaultEntityPlacementDistance()); + AzToolsFramework::GetDefaultEntityPlacementDistance()); } CreateNewEntityAtPosition(worldPosition); diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h index 9afa944438..7fe2881b92 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h @@ -306,8 +306,7 @@ class CToolsApplicationUndoLink { public: - CToolsApplicationUndoLink(const char* description) - : m_description(description) + CToolsApplicationUndoLink() { } @@ -316,11 +315,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 +348,6 @@ public: w->setFocus(Qt::OtherFocusReason); } } - - AZStd::string m_description; }; #endif // CRYINCLUDE_COMPONENTENTITYEDITORPLUGIN_SANDBOXINTEGRATION_H 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/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/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/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/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 5a64982350..437dcead3b 100644 --- a/Code/Editor/Viewport.cpp +++ b/Code/Editor/Viewport.cpp @@ -14,14 +14,11 @@ // Qt #include -// AzCore -#include - // AzQtComponents #include +// AzToolsFramework #include -#include #include #include @@ -41,19 +38,6 @@ #undef LoadCursor #endif -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"); - -float GetDefaultEntityPlacementDistance() -{ - return ed_defaultEntityPlacementDistance; -} - ////////////////////////////////////////////////////////////////////// // Viewport drag and drop support ////////////////////////////////////////////////////////////////////// @@ -63,7 +47,7 @@ void QtViewport::BuildDragDropContext( { context.m_hitLocation = AzToolsFramework::FindClosestPickIntersection( viewportId, AzToolsFramework::ViewportInteraction::ScreenPointFromQPoint(point), AzToolsFramework::EditorPickRayLength, - GetDefaultEntityPlacementDistance()); + AzToolsFramework::GetDefaultEntityPlacementDistance()); } void QtViewport::dragEnterEvent(QDragEnterEvent* event) @@ -1062,11 +1046,6 @@ Vec3 QtViewport::SnapToGrid(const Vec3& vec) return vec; } -float QtViewport::GetGridStep() const -{ - return 0.0f; -} - ////////////////////////////////////////////////////////////////////////// void QtViewport::BeginUndo() { @@ -1121,30 +1100,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 { @@ -1349,6 +1304,7 @@ float QtViewport::GetFOV() const { return gSettings.viewports.fDefaultFov; } + ////////////////////////////////////////////////////////////////////////// void QtViewport::setRay(QPoint& vp, Vec3& raySrc, Vec3& rayDir) { @@ -1356,12 +1312,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 bf44b914aa..a71df6a9cd 100644 --- a/Code/Editor/Viewport.h +++ b/Code/Editor/Viewport.h @@ -87,9 +87,6 @@ enum EStdCursor STD_CURSOR_LAST, }; -//! The default distance an entity is placed from the camera if there is no intersection -SANDBOX_API float GetDefaultEntityPlacementDistance(); - AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING class SANDBOX_API CViewport : public IDisplayViewport @@ -397,7 +394,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. @@ -434,19 +430,12 @@ public: //! Performs hit testing of 2d point in view to find which object hit. bool HitTest(const QPoint& point, HitContext& hitInfo) 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; // Access to the member m_bAdvancedSelectMode so interested modules can know its value. 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. @@ -502,7 +491,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; diff --git a/Code/Editor/editor_lib_files.cmake b/Code/Editor/editor_lib_files.cmake index 47b69765ba..fa627176d8 100644 --- a/Code/Editor/editor_lib_files.cmake +++ b/Code/Editor/editor_lib_files.cmake @@ -488,7 +488,6 @@ set(FILES UndoViewPosition.h UndoViewRotation.h Util/GeometryUtil.h - Util/KDTree.h WipFeaturesDlg.h WipFeaturesDlg.ui WipFeaturesDlg.qrc @@ -499,7 +498,6 @@ set(FILES Objects/ClassDesc.cpp Objects/ClassDesc.h Objects/DisplayContextShared.inl - Objects/IEntityObjectListener.h Objects/SelectionGroup.cpp Objects/SelectionGroup.h Objects/SubObjSelection.cpp @@ -710,7 +708,6 @@ set(FILES Util/GuidUtil.cpp Util/GuidUtil.h Util/IObservable.h - Util/KDTree.cpp Util/Mailer.h Util/NamedData.cpp Util/NamedData.h diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h index c45bb21c6d..0b181f6782 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.h @@ -325,13 +325,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(); } diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp index cf23d2b4d7..06cb2c3740 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp @@ -45,6 +45,7 @@ #include #include +#include #include #include @@ -485,9 +486,11 @@ namespace AZ // Merge Command Line arguments constexpr bool executeRegDumpCommands = false; - SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_settingsRegistry, m_commandLine, executeRegDumpCommands); +#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); @@ -1547,7 +1550,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/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/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..094dee16f2 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; @@ -665,6 +665,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..5ac15fc728 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; } 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..55a991f19f --- /dev/null +++ b/Code/Framework/AzCore/AzCore/IO/Path/PathReflect.cpp @@ -0,0 +1,77 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * 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::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 + PathType path(reinterpret_cast(classPtr)->Native(), AZ::IO::PosixPathSeparator); + path.MakePreferred(); + + return static_cast(stream.Write(path.Native().size(), path.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() }) + ; + } + } +} diff --git a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Archive/ArchiveVars_Mac.h b/Code/Framework/AzCore/AzCore/IO/Path/PathReflect.h similarity index 67% rename from Code/Framework/AzFramework/Platform/Mac/AzFramework/Archive/ArchiveVars_Mac.h rename to Code/Framework/AzCore/AzCore/IO/Path/PathReflect.h index 5a80afe271..3076895026 100644 --- a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Archive/ArchiveVars_Mac.h +++ b/Code/Framework/AzCore/AzCore/IO/Path/PathReflect.h @@ -8,4 +8,12 @@ #pragma once -#define STREAM_CACHE_DEFAULT 0 +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/Jobs/JobManagerComponent.cpp b/Code/Framework/AzCore/AzCore/Jobs/JobManagerComponent.cpp index acf24e8d42..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 { 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/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/SettingsRegistryMergeUtils.cpp b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryMergeUtils.cpp index 975217a131..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 @@ -983,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 @@ -998,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/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/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/azcore_files.cmake b/Code/Framework/AzCore/AzCore/azcore_files.cmake index 30662f37c4..0c381c9850 100644 --- a/Code/Framework/AzCore/AzCore/azcore_files.cmake +++ b/Code/Framework/AzCore/AzCore/azcore_files.cmake @@ -187,6 +187,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 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 e05e000a4e..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 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 2c0d554078..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 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 816a28b728..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 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 83cff9b54f..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 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 b0832c54f6..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 diff --git a/Code/Framework/AzCore/Tests/AZStd/VectorAndArray.cpp b/Code/Framework/AzCore/Tests/AZStd/VectorAndArray.cpp index d802b3461b..851a7a8609 100644 --- a/Code/Framework/AzCore/Tests/AZStd/VectorAndArray.cpp +++ b/Code/Framework/AzCore/Tests/AZStd/VectorAndArray.cpp @@ -799,7 +799,7 @@ namespace UnitTest TEST_F(Arrays, FixedVectorCXX20Erase_Succeeds) { // Erase 'l' from the phrase "Hello" World" - auto eraseTest = [](AZStd::initializer_list testInit) constexpr + auto eraseTest = [](AZStd::initializer_list testInit) { AZStd::fixed_vector testResult{ testInit }; AZStd::erase(testResult, 'l'); @@ -811,7 +811,7 @@ namespace UnitTest 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) constexpr + auto eraseIfTest = [](const AZStd::fixed_vector& testVector) { AZStd::fixed_vector testResult{ testVector }; auto erasePredicate = [](char ch) diff --git a/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp b/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp index fe38451101..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, @@ -608,7 +580,7 @@ namespace UnitTest AZ::Data::AssetData::AssetStatus expected_base_status = AZ::Data::AssetData::AssetStatus::Ready; EXPECT_EQ(baseStatus, expected_base_status); } - + TEST_F(AssetJobsFloodTest, RapidAcquireAndRelease) { auto assetUuids = { @@ -641,7 +613,7 @@ namespace UnitTest { Asset asset1 = m_testAssetManager->GetAsset(assetUuid, azrtti_typeid(), AZ::Data::AssetLoadBehavior::PreLoad); - + if (checkLoaded) { asset1.BlockUntilLoadComplete(); @@ -714,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(); @@ -778,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}" }; @@ -797,7 +769,7 @@ namespace UnitTest void SetUp() override { - BaseAssetManagerTest::SetUp(); + DisklessAssetManagerBase::SetUp(); SetupTest(); } @@ -807,7 +779,7 @@ namespace UnitTest AssetManager::Instance().UnregisterHandler(m_assetHandlerAndCatalog); delete m_assetHandlerAndCatalog; AssetManager::Destroy(); - BaseAssetManagerTest::TearDown(); + DisklessAssetManagerBase::TearDown(); } void SetupAssets() @@ -849,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; @@ -862,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; } @@ -942,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(); @@ -1291,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 @@ -1332,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 @@ -1371,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 @@ -2014,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}" }; @@ -2028,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; } @@ -2078,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; @@ -2089,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; @@ -2191,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; @@ -2347,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 = db.CreateAsset(AssetId(MyAssetDId)); // point at D - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &c, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset3.txt", &c, &context)); // AssetB is MYASSETB AssetWithAssetReference b; b.m_asset = db.CreateAsset(AssetId(MyAssetCId)); // point at C - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &b, &context)); + EXPECT_TRUE(m_streamerWrapper->WriteMemoryFile("TestAsset2.txt", &b, &context)); // AssetA will be written to disk as MYASSETA AssetWithAssetReference a; a.m_asset = db.CreateAsset(AssetId(MyAssetBId)); // point at B - EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &a, &context)); + 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); @@ -2381,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]() { @@ -2569,7 +2543,6 @@ 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, ParallelDeepAssetReferences) #endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { @@ -2577,7 +2550,7 @@ namespace UnitTest } class AssetManagerTests - : public BaseAssetManagerTest + : public DisklessAssetManagerBase { protected: static inline const AZ::Uuid MyAsset1Id{ "{5B29FE2B-6B41-48C9-826A-C723951B0560}" }; @@ -2592,7 +2565,7 @@ namespace UnitTest void SetUp() override { - BaseAssetManagerTest::SetUp(); + DisklessAssetManagerBase::SetUp(); m_console = AZStd::make_unique(); AZ::Interface::Register(m_console.get()); @@ -2631,7 +2604,7 @@ namespace UnitTest AssetManager::Destroy(); AZ::Interface::Unregister(m_console.get()); m_console = nullptr; - BaseAssetManagerTest::TearDown(); + DisklessAssetManagerBase::TearDown(); } }; @@ -2982,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}" }; @@ -3001,7 +2974,7 @@ namespace UnitTest void SetUp() override { - BaseAssetManagerTest::SetUp(); + DisklessAssetManagerBase::SetUp(); // create the database AssetManager::Descriptor desc; @@ -3039,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 @@ -3065,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 c6fa296cbc..532cb0a1d8 100644 --- a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp +++ b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp @@ -165,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 29c2c124cd..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,7 +59,11 @@ 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; @@ -66,8 +71,8 @@ namespace UnitTest 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(); @@ -82,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/Serialization.cpp b/Code/Framework/AzCore/Tests/Serialization.cpp index 219744a480..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 @@ -8151,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/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/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/AzFramework/AzFramework/Archive/Archive.cpp b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp index a60a657d87..04802a8d0e 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp @@ -46,11 +46,6 @@ namespace AZ::IO "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_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_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, diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h index 253e3b0c5b..2c2ec33544 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h @@ -9,8 +9,6 @@ #pragma once -#include - namespace AZ::IO { enum class FileSearchPriority @@ -39,25 +37,10 @@ namespace AZ::IO #else inline static constexpr bool IsReleaseConfig{}; #endif - 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 }; 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/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.cpp b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.cpp similarity index 82% rename from Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.cpp rename to Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.cpp index c6008deb34..51674bb32c 100644 --- a/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.cpp +++ b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.cpp @@ -6,16 +6,17 @@ * */ -#include "CommunicatorTracePrinter.h" +#include "ProcessCommunicatorTracePrinter.h" -CommunicatorTracePrinter::CommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window) : + +ProcessCommunicatorTracePrinter::ProcessCommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window) : m_communicator(communicator), m_window(window) { m_stringBeingConcatenated.reserve(1024); } -CommunicatorTracePrinter::~CommunicatorTracePrinter() +ProcessCommunicatorTracePrinter::~ProcessCommunicatorTracePrinter() { // flush stdout WriteCurrentString(false); @@ -24,7 +25,7 @@ CommunicatorTracePrinter::~CommunicatorTracePrinter() WriteCurrentString(true); } -void CommunicatorTracePrinter::Pump() +void ProcessCommunicatorTracePrinter::Pump() { if (m_communicator->IsValid()) { @@ -42,7 +43,7 @@ void CommunicatorTracePrinter::Pump() } } -void CommunicatorTracePrinter::ParseDataBuffer(AZ::u32 readSize, bool isFromStdErr) +void ProcessCommunicatorTracePrinter::ParseDataBuffer(AZ::u32 readSize, bool isFromStdErr) { if (readSize > AZ_ARRAY_SIZE(m_streamBuffer)) { @@ -67,7 +68,7 @@ void CommunicatorTracePrinter::ParseDataBuffer(AZ::u32 readSize, bool isFromStdE } } -void CommunicatorTracePrinter::WriteCurrentString(bool isFromStdErr) +void ProcessCommunicatorTracePrinter::WriteCurrentString(bool isFromStdErr) { AZStd::string& bufferToUse = isFromStdErr ? m_errorStringBeingConcatenated : m_stringBeingConcatenated; diff --git a/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.h b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.h similarity index 54% rename from Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.h rename to Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.h index c2e4da32af..5e14fa290d 100644 --- a/Code/Tools/AssetProcessor/native/utilities/CommunicatorTracePrinter.h +++ b/Code/Framework/AzFramework/AzFramework/Process/ProcessCommunicatorTracePrinter.h @@ -10,20 +10,21 @@ #include -//! CommunicatorTracePrinter listens to stderr and stdout of a running process and writes its output to the AZ_Trace system +//! 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 CommunicatorTracePrinter +class ProcessCommunicatorTracePrinter { public: - CommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window); - ~CommunicatorTracePrinter(); + ProcessCommunicatorTracePrinter(AzFramework::ProcessCommunicator* communicator, const char* window); + ~ProcessCommunicatorTracePrinter(); - // call this periodically to drain the buffers and write them. + //! 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. + //! 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: diff --git a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp index 561408db20..60c730291f 100644 --- a/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp +++ b/Code/Framework/AzFramework/AzFramework/Terrain/TerrainDataRequestBus.cpp @@ -12,13 +12,57 @@ 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) + ->Attribute(AZ::Script::Attributes::Module, "terrain") ->Event("GetNormal", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetNormal) ->Event("GetMaxSurfaceWeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetMaxSurfaceWeight) ->Event("GetMaxSurfaceWeightFromVector2", @@ -26,15 +70,32 @@ namespace AzFramework::Terrain ->Event("GetSurfaceWeights", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfaceWeights) ->Event("GetSurfaceWeightsFromVector2", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfaceWeightsFromVector2) + ->Event("GetIsHole", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetIsHole) ->Event("GetIsHoleFromFloats", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetIsHoleFromFloats) - ->Event("GetSurfacePoint", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfacePoint) + ->Event("GetSurfacePoint", &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetSurfacePoint) ->Event("GetSurfacePointFromVector2", - &AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfacePointFromVector2) + &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetSurfacePointFromVector2) ->Event("GetTerrainAabb", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainAabb) ->Event("GetTerrainHeightQueryResolution", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainHeightQueryResolution) + ->Event("GetHeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeightVal) + ->Event("GetHeightFromVector2", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeightValFromVector2) + ->Event("GetHeightFromFloats", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeightValFromFloats) ; + + 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..0da1beba77 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,45 @@ 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; + } + + // Functions without the optional bool* parameter that can be used from Python tests. + float GetHeightVal(AZ::Vector3 position, Sampler sampler = Sampler::BILINEAR) const + { + bool terrainExists; + return GetHeight(position, sampler, &terrainExists); + } + + float GetHeightValFromVector2(AZ::Vector2 position, Sampler sampler = Sampler::BILINEAR) const + { + bool terrainExists; + return GetHeightFromVector2(position, sampler, &terrainExists); + } + + float GetHeightValFromFloats(float x, float y, Sampler sampler = Sampler::BILINEAR) const + { + bool terrainExists; + return GetHeightFromFloats(x, y, sampler, &terrainExists); + } }; 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/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 b8d428ab82..aac7bd8f14 100644 --- a/Code/Framework/AzFramework/AzFramework/azframework_files.cmake +++ b/Code/Framework/AzFramework/AzFramework/azframework_files.cmake @@ -277,6 +277,8 @@ set(FILES 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 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/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/Xcb/AzFramework/XcbInputDeviceKeyboard.h b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceKeyboard.h index 00383abf6c..d9f077f9d4 100644 --- a/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceKeyboard.h +++ b/Code/Framework/AzFramework/Platform/Common/Xcb/AzFramework/XcbInputDeviceKeyboard.h @@ -5,6 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ +#pragma once #include #include 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/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_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/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/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/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/InputTests.cpp b/Code/Framework/AzFramework/Tests/InputTests.cpp index 5fba7f5796..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,6 +53,7 @@ namespace InputUnitTests //////////////////////////////////////////////////////////////////////////////////////////// AZStd::unique_ptr m_inputSystemComponent; + bool m_gamepadSupported; }; //////////////////////////////////////////////////////////////////////////////////////////////// @@ -78,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"); @@ -148,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(); @@ -256,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. @@ -340,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; @@ -413,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(); @@ -491,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(); @@ -558,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(); @@ -650,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(); @@ -728,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(); @@ -795,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(); @@ -909,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(); @@ -969,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/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/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..66227c692b 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 @@ -40,7 +41,7 @@ namespace AzManipulatorTestFramework //! Set the angular step. virtual void SetAngularStep(float step) = 0; //! Get the viewport id. - virtual int GetViewportId() const = 0; + 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; diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h index f87f83c1b2..63392eb82f 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/AzManipulatorTestFrameworkTestHelpers.h @@ -29,7 +29,8 @@ namespace UnitTest 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); 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..da2804dfd5 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/IndirectManipulatorViewportInteraction.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/IndirectManipulatorViewportInteraction.h @@ -21,7 +21,7 @@ namespace AzManipulatorTestFramework class IndirectCallManipulatorViewportInteraction : public ManipulatorViewportInteraction { public: - IndirectCallManipulatorViewportInteraction(); + explicit IndirectCallManipulatorViewportInteraction(AZStd::shared_ptr debugDisplayRequests); ~IndirectCallManipulatorViewportInteraction(); // ManipulatorViewportInteractionInterface ... diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h index 3c41b28851..1568c1a931 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,7 +36,7 @@ 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; @@ -60,9 +63,10 @@ namespace AzManipulatorTestFramework 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; bool m_gridSnapping = false; bool m_angularSnapping = false; 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 5bfe63bd99..aea93ca342 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,34 +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); + 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(); } @@ -83,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(); @@ -101,10 +119,10 @@ namespace AzManipulatorTestFramework void ImmediateModeActionDispatcher::MousePositionImpl(const AzFramework::ScreenPoint& position) { - const auto cameraState = m_viewportManipulatorInteraction.GetViewportInteraction().GetCameraState(); + const auto cameraState = m_manipulatorViewportInteraction.GetViewportInteraction().GetCameraState(); GetMouseInteractionEvent()->m_mouseInteraction.m_mousePick = BuildMousePick(position, cameraState); 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) @@ -144,7 +162,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(); @@ -178,12 +196,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 9bcb8986d5..9c5f84196f 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp @@ -76,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 08cae0c738..1a28c8cad1 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp @@ -13,15 +13,8 @@ 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); @@ -102,7 +95,7 @@ namespace AzManipulatorTestFramework AzFramework::DebugDisplayRequests& ViewportInteraction::GetDebugDisplay() { - return *m_nullDebugDisplayRequests; + return *m_debugDisplayRequests; } void ViewportInteraction::SetGridSnapping(const bool enabled) @@ -135,20 +128,20 @@ namespace AzManipulatorTestFramework m_angularStep = step; } - int ViewportInteraction::GetViewportId() const + AzFramework::ViewportId ViewportInteraction::GetViewportId() const { return m_viewportId; } AZ::Vector3 ViewportInteraction::ViewportScreenToWorld([[maybe_unused]] const AzFramework::ScreenPoint& screenPosition) { - return AZ::Vector3::CreateZero(); + return AzFramework::ScreenToWorld(screenPosition, m_cameraState); } AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportInteraction::ViewportScreenToWorldRay( [[maybe_unused]] const AzFramework::ScreenPoint& screenPosition) { - return {}; + return AzToolsFramework::ViewportInteraction::ViewportScreenToWorldRay(m_cameraState, screenPosition); } float ViewportInteraction::DeviceScalingFactor() 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 376c18072e..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); } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index af902f97a0..7e78f64778 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -53,7 +53,6 @@ static void OptimizedSetParent(QWidget* widget, QWidget* parent) namespace AzQtComponents { - static const FancyDockingDropZoneConstants g_FancyDockingConstants; // Constant for the threshold in pixels for snapping to edges while dragging for docking static const int g_snapThresholdInPixels = 15; @@ -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 @@ -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; } @@ -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 1451094ea1..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 const 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/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/Images/Entity/prefab_edit_open_readonly.svg b/Code/Framework/AzQtComponents/AzQtComponents/Images/Entity/prefab_edit_open_readonly.svg new file mode 100644 index 0000000000..9f16c88211 --- /dev/null +++ b/Code/Framework/AzQtComponents/AzQtComponents/Images/Entity/prefab_edit_open_readonly.svg @@ -0,0 +1,3 @@ + + + diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Images/Entity/readonly.svg b/Code/Framework/AzQtComponents/AzQtComponents/Images/Entity/readonly.svg new file mode 100644 index 0000000000..2e942e87f8 --- /dev/null +++ b/Code/Framework/AzQtComponents/AzQtComponents/Images/Entity/readonly.svg @@ -0,0 +1,3 @@ + + + diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc b/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc index 15049aeb69..7e7fafc9ee 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc +++ b/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc @@ -7,7 +7,9 @@ Entity/prefab.svg Entity/prefab_edit.svg Entity/prefab_edit_open.svg + Entity/prefab_edit_open_readonly.svg Entity/prefab_edit_close.svg + Entity/readonly.svg Level/level.svg diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp index fbd58dcac7..9e9bb92737 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp @@ -164,11 +164,7 @@ namespace } } -#if AZ_TRAIT_DISABLE_FAILED_ZERO_COLOR_CONVERSION_TEST -TEST(AzQtComponents, DISABLED_ColorConversionsTestAllZeros) -#else TEST(AzQtComponents, ColorConversionsTestAllZeros) -#endif // AZ_TRAIT_DISABLE_FAILED_ZERO_COLOR_CONVERSION_TEST { TestConversions({ 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }); } diff --git a/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h b/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h index d9b48b7835..94f3dd004a 100644 --- a/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h +++ b/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h @@ -13,19 +13,15 @@ #define AZ_TRAIT_UNIT_TEST_ENTITY_ID_GEN_TEST_COUNT 10000 #define AZ_TRAIT_UNIT_TEST_DILLER_TRIGGER_EVENT_COUNT 100000 -#define AZ_TRAIT_DISABLE_ALL_SAVE_DATA_TESTS true - #define AZ_TRAIT_DISABLE_FAILED_AP_CONNECTION_TESTS true -#define AZ_TRAIT_DISABLE_FAILED_ASSET_LOAD_TESTS true #define AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS true #define AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS true -#define AZ_TRAIT_DISABLE_FAILED_ZERO_COLOR_CONVERSION_TEST true + #define AZ_TRAIT_DISABLE_FAILED_FRAMEPROFILER_TEST true #define AZ_TRAIT_DISABLE_FAILED_FRAMEWORK_TESTS true #define AZ_TRAIT_DISABLE_FAILED_GRADIENT_SIGNAL_TESTS true #define AZ_TRAIT_DISABLE_FAILED_MULTIPLAYER_GRIDMATE_TESTS true -#define AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS true #define AZ_TRAIT_DISABLE_FAILED_NATIVE_WINDOWS_TESTS true #define AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS true #define AZ_TRAIT_DISABLE_FAILED_EMOTION_FX_TESTS true diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorVegetationRequestsBus.h b/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorVegetationRequestsBus.h index d8d4c37f01..7bfc891476 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorVegetationRequestsBus.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/API/EditorVegetationRequestsBus.h @@ -10,6 +10,7 @@ #include #include +#include class CVegetationMap; struct CVegetationInstance; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp index afabbb233b..6c69fc04da 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -268,6 +269,7 @@ namespace AzToolsFramework azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), + azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), azrtti_typeid(), diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserTableModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserTableModel.cpp index 14c5e719b4..775462f63f 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserTableModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserTableModel.cpp @@ -30,6 +30,7 @@ namespace AzToolsFramework connect(m_filterModel, &QAbstractItemModel::rowsRemoved, this, &AssetBrowserTableModel::UpdateTableModelMaps); connect(m_filterModel, &QAbstractItemModel::layoutChanged, this, &AssetBrowserTableModel::UpdateTableModelMaps); connect(m_filterModel, &AssetBrowserFilterModel::filterChanged, this, &AssetBrowserTableModel::beginResetModel); + connect(m_filterModel, &AssetBrowserFilterModel::filterChanged, this, &AssetBrowserTableModel::UpdateTableModelMaps); connect(m_filterModel, &QAbstractItemModel::dataChanged, this, &AssetBrowserTableModel::SourceDataChanged); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AzToolsFrameworkModule.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AzToolsFrameworkModule.cpp index 2cdf409125..dd1ac12a02 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AzToolsFrameworkModule.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AzToolsFrameworkModule.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -75,6 +76,7 @@ namespace AzToolsFramework EditorEntityFixupComponent::CreateDescriptor(), EntityUtilityComponent::CreateDescriptor(), ContainerEntitySystemComponent::CreateDescriptor(), + ReadOnlyEntitySystemComponent::CreateDescriptor(), FocusModeSystemComponent::CreateDescriptor(), SliceMetadataEntityContextComponent::CreateDescriptor(), SliceRequestComponent::CreateDescriptor(), diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityBus.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityBus.h new file mode 100644 index 0000000000..051e87c7e0 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityBus.h @@ -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 + * + */ + +#pragma once + +#include +#include + +#include + +namespace AzToolsFramework +{ + //! Used to notify changes of state for read-only entities. + class ReadOnlyEntityPublicNotifications + : public AZ::EBusTraits + { + public: + ////////////////////////////////////////////////////////////////////////// + // EBusTraits overrides + static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; + static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; + using BusIdType = AzFramework::EntityContextId; + ////////////////////////////////////////////////////////////////////////// + + //! Triggered when an entity's read-only status changes. + //! @param entityId The entity whose status has changed. + //! @param readOnly The read-only state the container was changed to. + virtual void OnReadOnlyEntityStatusChanged([[maybe_unused]] const AZ::EntityId& entityId, [[maybe_unused]] bool readOnly) {} + + protected: + ~ReadOnlyEntityPublicNotifications() = default; + }; + using ReadOnlyEntityPublicNotificationBus = AZ::EBus; + + //! Used by the ReadOnlyEntitySystemComponent to query the read-only state of entities as set by systems using the API. + class ReadOnlyEntityQueryRequests + : public AZ::EBusTraits + { + public: + ////////////////////////////////////////////////////////////////////////// + // EBusTraits overrides + static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; + static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; + using BusIdType = AzFramework::EntityContextId; + ////////////////////////////////////////////////////////////////////////// + + //! Triggered when an entity's read-only status is queried. + //! Allows multiple systems to weigh in on the read-only status of an entity. + //! @param entityId The entity whose status has changed. + //! @param[out] isReadOnly The output of the query. Should only be changed to true, and left untouched if false. + virtual void IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) = 0; + + protected: + ~ReadOnlyEntityQueryRequests() = default; + }; + using ReadOnlyEntityQueryRequestBus = AZ::EBus; + +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityInterface.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityInterface.h new file mode 100644 index 0000000000..15ac04d0fd --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityInterface.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 AzToolsFramework +{ + //! An entity registered as read-only cannot be altered in the editor. + class ReadOnlyEntityPublicInterface + { + public: + AZ_RTTI(ReadOnlyEntityPublicInterface, "{921FE15B-6EBD-47F0-8238-BC63318DEDEA}"); + + //! Returns whether the entity id provided is registered as read-only. + virtual bool IsReadOnly(const AZ::EntityId& entityId) = 0; + }; + + //! An entity registered as read-only cannot be altered in the editor. + class ReadOnlyEntityQueryInterface + { + public: + AZ_RTTI(ReadOnlyEntityQueryInterface, "{2ACD63C5-1F3E-4DE8-880E-8115F857D329}"); + + //! Refreshes the cached read-only status for the entities provided. + //! @param entityIds The entityIds whose read-only state will be queried again. + virtual void RefreshReadOnlyState(const EntityIdList& entityIds) = 0; + + //! Refreshes the cached read-only status for all entities. + //! Useful when disconnecting a handler at runtime. + virtual void RefreshReadOnlyStateForAllEntities() = 0; + }; + +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.cpp new file mode 100644 index 0000000000..7536e1e8a5 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.cpp @@ -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 + * + */ + +#include + +#include +#include + +namespace AzToolsFramework +{ + void ReadOnlyEntitySystemComponent::Activate() + { + AZ::Interface::Register(this); + AZ::Interface::Register(this); + EditorEntityContextNotificationBus::Handler::BusConnect(); + } + + void ReadOnlyEntitySystemComponent::Deactivate() + { + EditorEntityContextNotificationBus::Handler::BusDisconnect(); + AZ::Interface::Unregister(this); + AZ::Interface::Unregister(this); + } + + void ReadOnlyEntitySystemComponent::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context)) + { + serializeContext->Class()->Version(1); + } + } + + void ReadOnlyEntitySystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) + { + provided.push_back(AZ_CRC_CE("ReadOnlyEntityService")); + } + + bool ReadOnlyEntitySystemComponent::IsReadOnly(const AZ::EntityId& entityId) + { + if (!m_readOnlystates.contains(entityId)) + { + QueryReadOnlyStateForEntity(entityId); + } + + return m_readOnlystates[entityId]; + } + + void ReadOnlyEntitySystemComponent::RefreshReadOnlyState(const EntityIdList& entityIds) + { + for (const AZ::EntityId& entityId : entityIds) + { + bool wasReadOnly = m_readOnlystates[entityId]; + QueryReadOnlyStateForEntity(entityId); + + if (bool isReadOnly = m_readOnlystates[entityId]; wasReadOnly != isReadOnly) + { + ReadOnlyEntityPublicNotificationBus::Broadcast( + &ReadOnlyEntityPublicNotificationBus::Events::OnReadOnlyEntityStatusChanged, entityId, isReadOnly); + } + } + } + + void ReadOnlyEntitySystemComponent::RefreshReadOnlyStateForAllEntities() + { + for (auto& elem : m_readOnlystates) + { + AZ::EntityId entityId = elem.first; + bool wasReadOnly = elem.second; + QueryReadOnlyStateForEntity(entityId); + + if (bool isReadOnly = m_readOnlystates[entityId]; wasReadOnly != isReadOnly) + { + ReadOnlyEntityPublicNotificationBus::Broadcast( + &ReadOnlyEntityPublicNotificationBus::Events::OnReadOnlyEntityStatusChanged, entityId, isReadOnly); + } + } + } + + void ReadOnlyEntitySystemComponent::OnContextReset() + { + m_readOnlystates.clear(); + } + + void ReadOnlyEntitySystemComponent::QueryReadOnlyStateForEntity(const AZ::EntityId& entityId) + { + bool isReadOnly = false; + + ReadOnlyEntityQueryRequestBus::Broadcast( + &ReadOnlyEntityQueryRequestBus::Events::IsReadOnly, entityId, isReadOnly); + + m_readOnlystates[entityId] = isReadOnly; + } + +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.h new file mode 100644 index 0000000000..4b8942bcd1 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/ReadOnly/ReadOnlyEntitySystemComponent.h @@ -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 + * + */ + +#pragma once + +#include +#include + +#include +#include + +namespace AzToolsFramework +{ + //! System Component to track read-only entity registration. + //! An entity registered as ReadOnly cannot be altered in the Editor. + class ReadOnlyEntitySystemComponent final + : public AZ::Component + , private ReadOnlyEntityPublicInterface + , private ReadOnlyEntityQueryInterface + , private EditorEntityContextNotificationBus::Handler + { + public: + AZ_COMPONENT(ReadOnlyEntitySystemComponent, "{B32EB03F-D88F-4B3A-9C16-071AF04DA646}"); + + ReadOnlyEntitySystemComponent() = default; + virtual ~ReadOnlyEntitySystemComponent() = default; + + // AZ::Component overrides ... + void Activate() override; + void Deactivate() override; + + static void Reflect(AZ::ReflectContext* context); + static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); + + // ReadOnlyEntityPublicInterface overrides ... + bool IsReadOnly(const AZ::EntityId& entityId) override; + + // ReadOnlyEntityQueryInterface overrides ... + void RefreshReadOnlyState(const EntityIdList& entityIds) override; + void RefreshReadOnlyStateForAllEntities() override; + + // EditorEntityContextNotificationBus overrides ... + void OnContextReset() override; + + private: + void QueryReadOnlyStateForEntity(const AZ::EntityId& entityId); + + AZStd::unordered_map m_readOnlystates; + }; + +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.cpp index ce73826388..8c7150f027 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.cpp @@ -50,7 +50,7 @@ namespace AzToolsFramework return false; } - void TraceLogger::PrepareLogFile(const AZStd::string& logFileName) + void TraceLogger::OpenLogFile(const AZStd::string& logFileName, bool clearLogFile) { using namespace AzFramework; @@ -73,7 +73,7 @@ namespace AzToolsFramework AZStd::string logPath; StringFunc::Path::Join(logDirectory.c_str(), logFileName.c_str(), logPath); - m_logFile.reset(aznew LogFile(logPath.c_str())); + m_logFile.reset(aznew LogFile(logPath.c_str(), clearLogFile)); if (m_logFile) { m_logFile->SetMachineReadable(false); @@ -81,7 +81,7 @@ namespace AzToolsFramework { m_logFile->AppendLog(LogFile::SEV_NORMAL, message.window.c_str(), message.message.c_str()); } - m_startupLogSink = {}; + m_startupLogSink.clear(); m_logFile->FlushLog(); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.h index 10708e3239..639674f69e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Logger/TraceLogger.h @@ -23,7 +23,7 @@ namespace AzToolsFramework ~TraceLogger(); //! Open log file and dump log sink into it - void PrepareLogFile(const AZStd::string& logFileName); + void OpenLogFile(const AZStd::string& logFileName, bool clearLogFile); //! Add filter to ignore messages for windows with matching names void AddWindowFilter(const AZStd::string& filter); @@ -55,7 +55,8 @@ namespace AzToolsFramework AZStd::string window; AZStd::string message; }; - AZStd::vector m_startupLogSink; + + AZStd::list m_startupLogSink; AZStd::unordered_set m_windowFilters; AZStd::unordered_set m_messageFilters; AZStd::unique_ptr m_logFile; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/AngularManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/AngularManipulator.cpp index b8fb4e6a53..29445f6562 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/AngularManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/AngularManipulator.cpp @@ -191,8 +191,8 @@ namespace AzToolsFramework { m_manipulatorView->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, cameraState, - mouseInteraction); + ManipulatorState{ ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, + cameraState, mouseInteraction); } void AngularManipulator::SetAxis(const AZ::Vector3& axis) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.cpp index b514c3957f..0221d6db8a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.cpp @@ -14,7 +14,7 @@ namespace AzToolsFramework { - AZ_CVAR(bool, cl_manipulatorDrawDebug, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Enable debug drawing for Manipulators"); + AZ_CVAR(bool, ed_manipulatorDrawDebug, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Enable debug drawing for Manipulators"); const AZ::Color BaseManipulator::s_defaultMouseOverColor = AZ::Color(1.0f, 1.0f, 0.0f, 1.0f); // yellow diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.h index 06e9c82e55..07a622c936 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/BaseManipulator.h @@ -28,7 +28,7 @@ namespace AzFramework namespace AzToolsFramework { - AZ_CVAR_EXTERNED(bool, cl_manipulatorDrawDebug); + AZ_CVAR_EXTERNED(bool, ed_manipulatorDrawDebug); namespace UndoSystem { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp index 00f5b1ac47..0c3638412c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp @@ -84,12 +84,12 @@ namespace AzToolsFramework break; case State::Translating: { - if (mouseInteraction.m_mouseInteraction.m_mouseButtons.Left() && + if (mouseInteraction.m_mouseInteraction.m_mouseButtons.Middle() && mouseInteraction.m_mouseEvent == ViewportInteraction::MouseEvent::Down && mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Shift() && mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Ctrl()) { - SnapVerticesToTerrain(mouseInteraction); + SnapVerticesToSurface(mouseInteraction); return true; } @@ -109,29 +109,23 @@ namespace AzToolsFramework } template - void EditorVertexSelectionBase::SnapVerticesToTerrain(const ViewportInteraction::MouseInteractionEvent& mouseInteraction) + void EditorVertexSelectionBase::SnapVerticesToSurface(const ViewportInteraction::MouseInteractionEvent& mouseInteraction) { ScopedUndoBatch surfaceSnapUndo("Snap to Surface"); ScopedUndoBatch::MarkEntityDirty(GetEntityId()); const int viewportId = mouseInteraction.m_mouseInteraction.m_interactionId.m_viewportId; - // get unsnapped terrain position (world space) - AZ::Vector3 worldSurfacePosition = AZ::Vector3::CreateZero(); - ; - ViewportInteraction::MainEditorViewportInteractionRequestBus::EventResult( - worldSurfacePosition, viewportId, &ViewportInteraction::MainEditorViewportInteractionRequestBus::Events::PickTerrain, - mouseInteraction.m_mouseInteraction.m_mousePick.m_screenCoordinates); + // get unsnapped surface position (world space) + const AZ::Vector3 worldSurfacePosition = FindClosestPickIntersection( + viewportId, mouseInteraction.m_mouseInteraction.m_mousePick.m_screenCoordinates, EditorPickRayLength, + GetDefaultEntityPlacementDistance()); AZ::Transform worldFromLocal; AZ::TransformBus::EventResult(worldFromLocal, GetEntityId(), &AZ::TransformBus::Events::GetWorldTM); const AZ::Transform localFromWorld = worldFromLocal.GetInverse(); - // convert to local space - snap if enabled - const GridSnapParameters gridSnapParams = GridSnapSettings(viewportId); - const AZ::Vector3 localFinalSurfacePosition = gridSnapParams.m_gridSnap - ? CalculateSnappedTerrainPosition(worldSurfacePosition, worldFromLocal, viewportId, gridSnapParams.m_gridSize) - : localFromWorld.TransformPoint(worldSurfacePosition); - + // convert to local space + const AZ::Vector3 localFinalSurfacePosition = localFromWorld.TransformPoint(worldSurfacePosition); SetSelectedPosition(localFinalSurfacePosition); OnEntityComponentPropertyChanged(GetEntityComponentIdPair()); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.h index 4894a00df6..7e5523f62a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.h @@ -171,7 +171,7 @@ namespace AzToolsFramework //! Snap the selected vertices to the terrain. //! Note: With a multi-selection the manipulator will be translated to the picked //! terrain position with all vertices moved relative to it. - void SnapVerticesToTerrain(const ViewportInteraction::MouseInteractionEvent& mouseInteraction); + void SnapVerticesToSurface(const ViewportInteraction::MouseInteractionEvent& mouseInteraction); //! The Actions provided by the EditorVertexSelection while it is active. //! e.g. Vertex deletion, duplication etc. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp index 2131fdf1cf..4ded50e1ab 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LineSegmentSelectionManipulator.cpp @@ -116,8 +116,8 @@ namespace AzToolsFramework { m_manipulatorView->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { TransformUniformScale(GetSpace()), GetNonUniformScale(), m_localStart, MouseOver() }, debugDisplay, cameraState, - mouseInteraction); + ManipulatorState{ TransformUniformScale(GetSpace()), GetNonUniformScale(), m_localStart, MouseOver() }, debugDisplay, + cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp index 2c85d9df38..8b55480e5a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/LinearManipulator.cpp @@ -207,7 +207,7 @@ namespace AzToolsFramework ? AZ::Transform::CreateFromQuaternionAndTranslation(m_visualOrientationOverride, GetLocalPosition()) : GetLocalTransform(); - if (cl_manipulatorDrawDebug) + if (ed_manipulatorDrawDebug) { if (PerformingAction()) { @@ -239,8 +239,8 @@ namespace AzToolsFramework view->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { ApplySpace(localTransform), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, cameraState, - mouseInteraction); + ManipulatorState{ ApplySpace(localTransform), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, + cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorManager.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorManager.cpp index b07ac08d87..859bfcab30 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorManager.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorManager.cpp @@ -146,7 +146,7 @@ namespace AzToolsFramework for (const auto& pair : m_manipulatorIdToPtrMap) { - pair.second->Draw({ Interacting() }, debugDisplay, cameraState, mouseInteraction); + pair.second->Draw(ManipulatorManagerState{ Interacting() }, debugDisplay, cameraState, mouseInteraction); } RefreshMouseOverState(mouseInteraction.m_mousePick); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.cpp index e4f6b3b1ea..5bea383630 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.cpp @@ -110,30 +110,6 @@ namespace AzToolsFramework return unsnappedPosition + CalculateSnappedOffset(unsnappedPosition, snapAxes, snapAxesCount, size); } - AZ::Vector3 CalculateSnappedTerrainPosition( - const AZ::Vector3& worldSurfacePosition, const AZ::Transform& worldFromLocal, const int viewportId, const float size) - { - const AZ::Transform localFromWorld = worldFromLocal.GetInverse(); - const AZ::Vector3 localSurfacePosition = localFromWorld.TransformPoint(worldSurfacePosition); - - // snap in xy plane - AZ::Vector3 localSnappedSurfacePosition = localSurfacePosition + - CalculateSnappedOffset(localSurfacePosition, AZ::Vector3::CreateAxisX(), size) + - CalculateSnappedOffset(localSurfacePosition, AZ::Vector3::CreateAxisY(), size); - - // find terrain height at xy snapped location - float terrainHeight = 0.0f; - ViewportInteraction::MainEditorViewportInteractionRequestBus::EventResult( - terrainHeight, viewportId, &ViewportInteraction::MainEditorViewportInteractionRequestBus::Events::TerrainHeight, - Vector3ToVector2(worldFromLocal.TransformPoint(localSnappedSurfacePosition))); - - // set snapped z value to terrain height - AZ::Vector3 localTerrainHeight = localFromWorld.TransformPoint(AZ::Vector3(0.0f, 0.0f, terrainHeight)); - localSnappedSurfacePosition.SetZ(localTerrainHeight.GetZ()); - - return localSnappedSurfacePosition; - } - bool GridSnapping(const int viewportId) { bool snapping = false; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.h index 660d38ac89..96f49d5276 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSnapping.h @@ -63,11 +63,6 @@ namespace AzToolsFramework AZ::Vector3 CalculateSnappedPosition( const AZ::Vector3& unsnappedPosition, const AZ::Vector3* snapAxes, size_t snapAxesCount, float size); - //! For a given point on the terrain, calculate the closest xy position snapped to the grid - //! (z position is aligned to terrain height, not snapped to z grid) - AZ::Vector3 CalculateSnappedTerrainPosition( - const AZ::Vector3& worldSurfacePosition, const AZ::Transform& worldFromLocal, int viewportId, float size); - //! Wrapper for grid snapping and grid size bus calls. GridSnapParameters GridSnapSettings(int viewportId); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp index d42182db92..5e05bea72a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.cpp @@ -10,6 +10,15 @@ namespace AzToolsFramework { + AZ::Transform ApplySpace(const AZ::Transform& localTransform, const AZ::Transform& space, const AZ::Vector3& nonUniformScale) + { + AZ::Transform result; + result.SetRotation(space.GetRotation() * localTransform.GetRotation()); + result.SetTranslation(space.TransformPoint(nonUniformScale * localTransform.GetTranslation())); + result.SetUniformScale(space.GetUniformScale() * localTransform.GetUniformScale()); + return result; + } + const AZ::Transform& ManipulatorSpace::GetSpace() const { return m_space; @@ -32,11 +41,7 @@ namespace AzToolsFramework AZ::Transform ManipulatorSpace::ApplySpace(const AZ::Transform& localTransform) const { - AZ::Transform result; - result.SetRotation(m_space.GetRotation() * localTransform.GetRotation()); - result.SetTranslation(m_space.TransformPoint(m_nonUniformScale * localTransform.GetTranslation())); - result.SetUniformScale(m_space.GetUniformScale() * localTransform.GetUniformScale()); - return result; + return AzToolsFramework::ApplySpace(localTransform, m_space, m_nonUniformScale); } const AZ::Vector3& ManipulatorSpaceWithLocalPosition::GetLocalPosition() const diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h index c372afcf32..5ceb4a36cc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorSpace.h @@ -17,6 +17,8 @@ namespace AZ namespace AzToolsFramework { + AZ::Transform ApplySpace(const AZ::Transform& localTransform, const AZ::Transform& space, const AZ::Vector3& nonUniformScale); + //! Handles location for manipulators which have a global space but no local transformation. class ManipulatorSpace { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.cpp index d3c94dc8ab..e4ee75bbf9 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include AZ_CVAR( @@ -30,6 +31,13 @@ AZ_CVAR( nullptr, AZ::ConsoleFunctorFlags::Null, "Display additional debug drawing for manipulator bounds"); +AZ_CVAR( + float, + ed_planarManipulatorBoundScaleFactor, + 1.75f, + nullptr, + AZ::ConsoleFunctorFlags::Null, + "The scale factor to apply to the planar manipulator bounds"); namespace AzToolsFramework { @@ -78,7 +86,8 @@ namespace AzToolsFramework { // check if we actually needed to flip the axis, if so, write to shouldCorrect // so we know and are able to draw it differently if we wish (e.g. hollow if flipped) - const bool correcting = ShouldFlipCameraAxis(worldFromLocal, localPosition, axis, cameraState); + const bool correcting = + FlipManipulatorAxesTowardsView() && ShouldFlipCameraAxis(worldFromLocal, localPosition, axis, cameraState); // the corrected axis, if no flip was required, output == input correctedAxis = correcting ? -axis : axis; @@ -325,7 +334,8 @@ namespace AzToolsFramework float ManipulatorView::ManipulatorViewScaleMultiplier( const AZ::Vector3& worldPosition, const AzFramework::CameraState& cameraState) const { - return ScreenSizeFixed() ? CalculateScreenToWorldMultiplier(worldPosition, cameraState) : 1.0f; + const float screenScale = ScreenSizeFixed() ? CalculateScreenToWorldMultiplier(worldPosition, cameraState) : 1.0f; + return screenScale * ManipulatorViewBaseScale(); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -342,47 +352,77 @@ namespace AzToolsFramework const AZ::Vector3 axis1 = m_axis1; const AZ::Vector3 axis2 = m_axis2; - CameraCorrectAxis( - axis1, m_cameraCorrectedAxis1, managerState, mouseInteraction, manipulatorState.m_worldFromLocal, - manipulatorState.m_localPosition, cameraState); - CameraCorrectAxis( - axis2, m_cameraCorrectedAxis2, managerState, mouseInteraction, manipulatorState.m_worldFromLocal, - manipulatorState.m_localPosition, cameraState); + // support partial application of CameraCorrectAxis to reduce redundant call site parameters + auto cameraCorrectAxisPartialFn = + [&manipulatorState, &managerState, &mouseInteraction, &cameraState](const AZ::Vector3& inAxis, AZ::Vector3& outAxis) + { + CameraCorrectAxis( + inAxis, outAxis, managerState, mouseInteraction, manipulatorState.m_worldFromLocal, manipulatorState.m_localPosition, + cameraState); + }; - const Picking::BoundShapeQuad quadBound = CalculateQuadBound( - manipulatorState.m_localPosition, manipulatorState, m_cameraCorrectedAxis1, m_cameraCorrectedAxis2, - m_size * - ManipulatorViewScaleMultiplier( - manipulatorState.m_worldFromLocal.TransformPoint(manipulatorState.m_localPosition), cameraState)); + cameraCorrectAxisPartialFn(axis1, m_cameraCorrectedAxis1); + cameraCorrectAxisPartialFn(axis2, m_cameraCorrectedAxis2); + cameraCorrectAxisPartialFn(axis1 * axis1.Dot(m_offset), m_cameraCorrectedOffsetAxis1); + cameraCorrectAxisPartialFn(axis2 * axis2.Dot(m_offset), m_cameraCorrectedOffsetAxis2); + + const AZ::Vector3 totalScale = + manipulatorState.m_nonUniformScale * AZ::Vector3(manipulatorState.m_worldFromLocal.GetUniformScale()); + + const auto cameraCorrectedVisualOffset = (m_cameraCorrectedOffsetAxis1 + m_cameraCorrectedOffsetAxis2) * totalScale.GetReciprocal(); + const auto viewScale = + ManipulatorViewScaleMultiplier(manipulatorState.m_worldFromLocal.TransformPoint(manipulatorState.m_localPosition), cameraState); + const Picking::BoundShapeQuad quadBoundVisual = CalculateQuadBound( + manipulatorState.m_localPosition + (cameraCorrectedVisualOffset * viewScale), manipulatorState, m_cameraCorrectedAxis1, + m_cameraCorrectedAxis2, m_size * viewScale); debugDisplay.SetLineWidth(defaultLineWidth(manipulatorState.m_mouseOver)); debugDisplay.SetColor(ViewColor(manipulatorState.m_mouseOver, m_axis1Color, m_mouseOverColor).GetAsVector4()); - debugDisplay.DrawLine(quadBound.m_corner4, quadBound.m_corner3); + debugDisplay.DrawLine(quadBoundVisual.m_corner4, quadBoundVisual.m_corner3); + debugDisplay.DrawLine(quadBoundVisual.m_corner1, quadBoundVisual.m_corner2); debugDisplay.SetColor(ViewColor(manipulatorState.m_mouseOver, m_axis2Color, m_mouseOverColor).GetAsVector4()); - debugDisplay.DrawLine(quadBound.m_corner2, quadBound.m_corner3); + debugDisplay.DrawLine(quadBoundVisual.m_corner4, quadBoundVisual.m_corner1); + debugDisplay.DrawLine(quadBoundVisual.m_corner2, quadBoundVisual.m_corner3); if (manipulatorState.m_mouseOver) { debugDisplay.SetColor(Vector3ToVector4(m_mouseOverColor.GetAsVector3(), 0.5f)); debugDisplay.CullOff(); - debugDisplay.DrawQuad(quadBound.m_corner1, quadBound.m_corner2, quadBound.m_corner3, quadBound.m_corner4); + debugDisplay.DrawQuad( + quadBoundVisual.m_corner1, quadBoundVisual.m_corner2, quadBoundVisual.m_corner3, quadBoundVisual.m_corner4); debugDisplay.CullOn(); } - RefreshBoundInternal(managerId, manipulatorId, quadBound); + // total size of bounds to use for mouse intersection + const float hitSize = m_size * ed_planarManipulatorBoundScaleFactor; + // size of edge bounds (the 'margin/border' outside the visual representation) + const float edgeSize = (hitSize - m_size) * 0.5f; + const AZ::Vector3 edgeOffset = + ((m_cameraCorrectedAxis1 * edgeSize + m_cameraCorrectedAxis2 * edgeSize) * totalScale.GetReciprocal()); + const auto cameraCorrectedHitOffset = cameraCorrectedVisualOffset - edgeOffset; + const Picking::BoundShapeQuad quadBoundHit = CalculateQuadBound( + manipulatorState.m_localPosition + (cameraCorrectedHitOffset * viewScale), manipulatorState, m_cameraCorrectedAxis1, + m_cameraCorrectedAxis2, hitSize * viewScale); + + if (ed_manipulatorDisplayBoundDebug) + { + debugDisplay.DrawQuad(quadBoundHit.m_corner1, quadBoundHit.m_corner2, quadBoundHit.m_corner3, quadBoundHit.m_corner4); + } + + RefreshBoundInternal(managerId, manipulatorId, quadBoundHit); } void ManipulatorViewQuadBillboard::Draw( const ManipulatorManagerId managerId, - const ManipulatorManagerState& /*managerState*/, + [[maybe_unused]] const ManipulatorManagerState& managerState, const ManipulatorId manipulatorId, const ManipulatorState& manipulatorState, AzFramework::DebugDisplayRequests& debugDisplay, const AzFramework::CameraState& cameraState, - const ViewportInteraction::MouseInteraction& /*mouseInteraction*/) + [[maybe_unused]] const ViewportInteraction::MouseInteraction& mouseInteraction) { const Picking::BoundShapeQuad quadBound = CalculateQuadBoundBillboard( manipulatorState.m_localPosition, manipulatorState.m_worldFromLocal, @@ -442,7 +482,7 @@ namespace AzToolsFramework void ManipulatorViewLineSelect::Draw( const ManipulatorManagerId managerId, - const ManipulatorManagerState& /*managerState*/, + [[maybe_unused]] const ManipulatorManagerState& managerState, const ManipulatorId manipulatorId, const ManipulatorState& manipulatorState, AzFramework::DebugDisplayRequests& debugDisplay, @@ -570,7 +610,7 @@ namespace AzToolsFramework void ManipulatorViewSphere::Draw( const ManipulatorManagerId managerId, - const ManipulatorManagerState& /*managerState*/, + [[maybe_unused]] const ManipulatorManagerState& managerState, const ManipulatorId manipulatorId, const ManipulatorState& manipulatorState, AzFramework::DebugDisplayRequests& debugDisplay, @@ -599,12 +639,12 @@ namespace AzToolsFramework void ManipulatorViewCircle::Draw( const ManipulatorManagerId managerId, - const ManipulatorManagerState& /*managerState*/, + [[maybe_unused]] const ManipulatorManagerState& managerState, const ManipulatorId manipulatorId, const ManipulatorState& manipulatorState, AzFramework::DebugDisplayRequests& debugDisplay, const AzFramework::CameraState& cameraState, - const ViewportInteraction::MouseInteraction& /*mouseInteraction*/) + [[maybe_unused]] const ViewportInteraction::MouseInteraction& mouseInteraction) { const float viewScale = ManipulatorViewScaleMultiplier(manipulatorState.m_worldFromLocal.TransformPoint(manipulatorState.m_localPosition), cameraState); @@ -665,7 +705,7 @@ namespace AzToolsFramework void ManipulatorViewSplineSelect::Draw( const ManipulatorManagerId managerId, - const ManipulatorManagerState& /*managerState*/, + [[maybe_unused]] const ManipulatorManagerState& managerState, const ManipulatorId manipulatorId, const ManipulatorState& manipulatorState, AzFramework::DebugDisplayRequests& debugDisplay, @@ -698,12 +738,18 @@ namespace AzToolsFramework /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// AZStd::unique_ptr CreateManipulatorViewQuad( - const PlanarManipulator& planarManipulator, const AZ::Color& axis1Color, const AZ::Color& axis2Color, const float size) + const AZ::Vector3& axis1, + const AZ::Vector3& axis2, + const AZ::Color& axis1Color, + const AZ::Color& axis2Color, + const AZ::Vector3& offset, + const float size) { AZStd::unique_ptr viewQuad = AZStd::make_unique(); - viewQuad->m_axis1 = planarManipulator.GetAxis1(); - viewQuad->m_axis2 = planarManipulator.GetAxis2(); + viewQuad->m_axis1 = axis1; + viewQuad->m_axis2 = axis2; viewQuad->m_size = size; + viewQuad->m_offset = offset; viewQuad->m_axis1Color = axis1Color; viewQuad->m_axis2Color = axis2Color; return viewQuad; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.h index 9eb84c7e0b..8a9514d11a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ManipulatorView.h @@ -54,7 +54,7 @@ namespace AzToolsFramework AZ_RTTI(ManipulatorView, "{7529E3E9-39B3-4D15-899A-FA13770113B2}") ManipulatorView(); - ManipulatorView(bool screenSizeFixed); + explicit ManipulatorView(bool screenSizeFixed); virtual ~ManipulatorView(); ManipulatorView(ManipulatorView&&) = default; ManipulatorView& operator=(ManipulatorView&&) = default; @@ -117,13 +117,16 @@ namespace AzToolsFramework AZ::Vector3 m_axis1 = AZ::Vector3(1.0f, 0.0f, 0.0f); AZ::Vector3 m_axis2 = AZ::Vector3(0.0f, 1.0f, 0.0f); + AZ::Vector3 m_offset = AZ::Vector3::CreateZero(); AZ::Color m_axis1Color = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f); AZ::Color m_axis2Color = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f); float m_size = 0.06f; //!< size to render and do mouse ray intersection tests against. private: - AZ::Vector3 m_cameraCorrectedAxis1; - AZ::Vector3 m_cameraCorrectedAxis2; + AZ::Vector3 m_cameraCorrectedAxis1; //!< First axis of quad (should be orthogonal to second axis). + AZ::Vector3 m_cameraCorrectedAxis2; //!< Second axis of quad (should be orthogonal to first axis). + AZ::Vector3 m_cameraCorrectedOffsetAxis1; //!< Offset along first axis (parallel with first axis). + AZ::Vector3 m_cameraCorrectedOffsetAxis2; //!< Offset along second axis (parallel with second axis). }; //! A screen aligned quad, centered at the position of the manipulator, display filled. @@ -379,7 +382,12 @@ namespace AzToolsFramework // Helpers to create various manipulator views. AZStd::unique_ptr CreateManipulatorViewQuad( - const PlanarManipulator& planarManipulator, const AZ::Color& axis1Color, const AZ::Color& axis2Color, float size); + const AZ::Vector3& axis1, + const AZ::Vector3& axis2, + const AZ::Color& axis1Color, + const AZ::Color& axis2Color, + const AZ::Vector3& offset, + float size); AZStd::unique_ptr CreateManipulatorViewQuadBillboard(const AZ::Color& color, float size); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/MultiLinearManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/MultiLinearManipulator.cpp index cc8e5d4866..f4dca63d77 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/MultiLinearManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/MultiLinearManipulator.cpp @@ -132,7 +132,7 @@ namespace AzToolsFramework const AzFramework::CameraState& cameraState, const ViewportInteraction::MouseInteraction& mouseInteraction) { - if (cl_manipulatorDrawDebug) + if (ed_manipulatorDrawDebug) { const AZ::Transform combined = TransformUniformScale(GetSpace()) * GetLocalTransform(); for (const auto& fixed : m_fixedAxes) @@ -145,8 +145,8 @@ namespace AzToolsFramework { view->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, - cameraState, mouseInteraction); + ManipulatorState{ ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, + debugDisplay, cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/PlanarManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/PlanarManipulator.cpp index 0326e4a07f..9dbb49a1e6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/PlanarManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/PlanarManipulator.cpp @@ -171,7 +171,7 @@ namespace AzToolsFramework const AzFramework::CameraState& cameraState, const ViewportInteraction::MouseInteraction& mouseInteraction) { - if (cl_manipulatorDrawDebug) + if (ed_manipulatorDrawDebug) { if (PerformingAction()) { @@ -202,8 +202,8 @@ namespace AzToolsFramework { view->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, - cameraState, mouseInteraction); + ManipulatorState{ ApplySpace(GetLocalTransform()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, + debugDisplay, cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp index d8c43ace9e..4b48512a5c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/ScaleManipulators.cpp @@ -9,6 +9,7 @@ #include "ScaleManipulators.h" #include +#include namespace AzToolsFramework { @@ -120,25 +121,25 @@ namespace AzToolsFramework void ScaleManipulators::ConfigureView( const float axisLength, const AZ::Color& axis1Color, const AZ::Color& axis2Color, const AZ::Color& axis3Color) { - const float boxSize = 0.1f; + const float boxHalfExtent = ScaleManipulatorBoxHalfExtent(); const AZ::Color colors[] = { axis1Color, axis2Color, axis3Color }; for (size_t manipulatorIndex = 0; manipulatorIndex < m_axisScaleManipulators.size(); ++manipulatorIndex) { - const auto lineLength = axisLength - boxSize; + const auto lineLength = axisLength - (2.0f * boxHalfExtent); ManipulatorViews views; - views.emplace_back( - CreateManipulatorViewLine(*m_axisScaleManipulators[manipulatorIndex], colors[manipulatorIndex], axisLength, m_lineBoundWidth)); + views.emplace_back(CreateManipulatorViewLine( + *m_axisScaleManipulators[manipulatorIndex], colors[manipulatorIndex], axisLength, m_lineBoundWidth)); views.emplace_back(CreateManipulatorViewBox( AZ::Transform::CreateIdentity(), colors[manipulatorIndex], - m_axisScaleManipulators[manipulatorIndex]->GetAxis() * lineLength, AZ::Vector3(boxSize))); + m_axisScaleManipulators[manipulatorIndex]->GetAxis() * (lineLength + boxHalfExtent), AZ::Vector3(boxHalfExtent))); m_axisScaleManipulators[manipulatorIndex]->SetViews(AZStd::move(views)); } ManipulatorViews views; views.emplace_back(CreateManipulatorViewBox( - AZ::Transform::CreateIdentity(), AZ::Color::CreateOne(), AZ::Vector3::CreateZero(), AZ::Vector3(boxSize))); + AZ::Transform::CreateIdentity(), AZ::Color::CreateOne(), AZ::Vector3::CreateZero(), AZ::Vector3(boxHalfExtent))); m_uniformScaleManipulator->SetViews(AZStd::move(views)); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SelectionManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SelectionManipulator.cpp index 9cf97dc213..64496c44d7 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SelectionManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SelectionManipulator.cpp @@ -90,8 +90,8 @@ namespace AzToolsFramework { view->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { TransformUniformScale(GetSpace()), GetNonUniformScale(), GetLocalPosition(), MouseOver() }, debugDisplay, cameraState, - mouseInteraction); + ManipulatorState{ TransformUniformScale(GetSpace()), GetNonUniformScale(), GetLocalPosition(), MouseOver() }, debugDisplay, + cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SplineSelectionManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SplineSelectionManipulator.cpp index 4ee965e43a..1da4240bf7 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SplineSelectionManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SplineSelectionManipulator.cpp @@ -94,8 +94,8 @@ namespace AzToolsFramework { m_manipulatorView->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { TransformUniformScale(GetSpace()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, debugDisplay, - cameraState, mouseInteraction); + ManipulatorState{ TransformUniformScale(GetSpace()), GetNonUniformScale(), AZ::Vector3::CreateZero(), MouseOver() }, + debugDisplay, cameraState, mouseInteraction); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.cpp index dd565eb0a8..58d579b20c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.cpp @@ -10,6 +10,7 @@ #include #include +#include namespace AzToolsFramework { @@ -17,28 +18,16 @@ namespace AzToolsFramework const AZ::Transform& worldFromLocal, const AZ::Vector3& worldSurfacePosition, const AZ::Vector3& localStartPosition, - const bool snapping, - const float gridSize, - const int viewportId) + [[maybe_unused]] const bool snapping, + [[maybe_unused]] const float gridSize, + [[maybe_unused]] const int viewportId) { - const AZ::Transform worldFromLocalUniform = AzToolsFramework::TransformUniformScale(worldFromLocal); - const AZ::Transform localFromWorldUniform = worldFromLocalUniform.GetInverse(); - - const AZ::Vector3 localFinalSurfacePosition = snapping - // note: gridSize is not scaled by scaleRecip here as localStartPosition is - // unscaled itself so the position returned by CalculateSnappedTerrainPosition - // must be in the same space (if localStartPosition were also scaled, gridSize - // would need to be multiplied by scaleRecip) - ? CalculateSnappedTerrainPosition(worldSurfacePosition, worldFromLocalUniform, viewportId, gridSize) - : localFromWorldUniform.TransformPoint(worldSurfacePosition); - - // delta/offset between initial vertex position and terrain pick position - const AZ::Vector3 localSurfaceOffset = localFinalSurfacePosition - localStartPosition; + const AZ::Transform localFromWorld = worldFromLocal.GetInverse(); StartInternal startInternal; - startInternal.m_snapOffset = localSurfaceOffset; - startInternal.m_localPosition = localStartPosition + localSurfaceOffset; - startInternal.m_localHitPosition = localFromWorldUniform.TransformVector(worldSurfacePosition); + startInternal.m_snapOffset = AZ::Vector3::CreateZero(); + startInternal.m_localPosition = localStartPosition; + startInternal.m_localHitPosition = localFromWorld.TransformPoint(worldSurfacePosition); return startInternal; } @@ -46,26 +35,19 @@ namespace AzToolsFramework const StartInternal& startInternal, const AZ::Transform& worldFromLocal, const AZ::Vector3& worldSurfacePosition, - const bool snapping, - const float gridSize, + [[maybe_unused]] const bool snapping, + [[maybe_unused]] const float gridSize, const ViewportInteraction::KeyboardModifiers keyboardModifiers, - const int viewportId) + [[maybe_unused]] const int viewportId) { - const AZ::Transform worldFromLocalUniform = AzToolsFramework::TransformUniformScale(worldFromLocal); - const AZ::Transform localFromWorldUniform = worldFromLocalUniform.GetInverse(); - - const float scaleRecip = ScaleReciprocal(worldFromLocalUniform); - - const AZ::Vector3 localFinalSurfacePosition = snapping - ? CalculateSnappedTerrainPosition(worldSurfacePosition, worldFromLocalUniform, viewportId, gridSize * scaleRecip) - : localFromWorldUniform.TransformPoint(worldSurfacePosition); + const AZ::Transform localFromWorld = worldFromLocal.GetInverse(); + const AZ::Vector3 localFinalSurfacePosition = localFromWorld.TransformPoint(worldSurfacePosition); Action action; action.m_start.m_localPosition = startInternal.m_localPosition; - action.m_start.m_snapOffset = startInternal.m_snapOffset; + action.m_start.m_snapOffset = AZ::Vector3::CreateZero(); action.m_current.m_localOffset = localFinalSurfacePosition - startInternal.m_localPosition; - // record what modifier keys are held during this action - action.m_modifiers = keyboardModifiers; + action.m_modifiers = keyboardModifiers; // record what modifier keys are held during this action return action; } @@ -78,12 +60,16 @@ namespace AzToolsFramework { SetSpace(worldFromLocal); AttachLeftMouseDownImpl(); + + // only cast rays against objects (entities/meshes etc.) we can actually see + m_rayRequest.m_onlyVisible = true; } void SurfaceManipulator::InstallLeftMouseDownCallback(const MouseActionCallback& onMouseDownCallback) { m_onLeftMouseDownCallback = onMouseDownCallback; } + void SurfaceManipulator::InstallLeftMouseUpCallback(const MouseActionCallback& onMouseUpCallback) { m_onLeftMouseUpCallback = onMouseUpCallback; @@ -95,17 +81,30 @@ namespace AzToolsFramework } void SurfaceManipulator::OnLeftMouseDownImpl( - const ViewportInteraction::MouseInteraction& interaction, float /*rayIntersectionDistance*/) + const ViewportInteraction::MouseInteraction& interaction, [[maybe_unused]] float rayIntersectionDistance) { const AZ::Transform worldFromLocalUniformScale = TransformUniformScale(GetSpace()); - const GridSnapParameters gridSnapParams = GridSnapSettings(interaction.m_interactionId.m_viewportId); + const AzFramework::ViewportId viewportId = interaction.m_interactionId.m_viewportId; - AZ::Vector3 worldSurfacePosition; - ViewportInteraction::MainEditorViewportInteractionRequestBus::EventResult( - worldSurfacePosition, interaction.m_interactionId.m_viewportId, - &ViewportInteraction::MainEditorViewportInteractionRequestBus::Events::PickTerrain, - interaction.m_mousePick.m_screenCoordinates); + const auto& entityComponentIdPairs = EntityComponentIdPairs(); + m_rayRequest.m_entityFilter.m_ignoreEntities.clear(); + m_rayRequest.m_entityFilter.m_ignoreEntities.reserve(entityComponentIdPairs.size()); + AZStd::transform( + entityComponentIdPairs.begin(), entityComponentIdPairs.end(), + AZStd::inserter(m_rayRequest.m_entityFilter.m_ignoreEntities, m_rayRequest.m_entityFilter.m_ignoreEntities.begin()), + [](const AZ::EntityComponentIdPair& entityComponentIdPair) + { + return entityComponentIdPair.GetEntityId(); + }); + + // calculate the start and end of the ray + RefreshRayRequest( + m_rayRequest, ViewportInteraction::ViewportScreenToWorldRay(viewportId, interaction.m_mousePick.m_screenCoordinates), + EditorPickRayLength); + + const GridSnapParameters gridSnapParams = GridSnapSettings(viewportId); + const AZ::Vector3 worldSurfacePosition = FindClosestPickIntersection(m_rayRequest, GetDefaultEntityPlacementDistance()); m_startInternal = CalculateManipulationDataStart( worldFromLocalUniformScale, worldSurfacePosition, GetLocalPosition(), gridSnapParams.m_gridSnap, gridSnapParams.m_gridSize, @@ -123,17 +122,14 @@ namespace AzToolsFramework { if (m_onLeftMouseUpCallback) { - AZ::Vector3 worldSurfacePosition = AZ::Vector3::CreateZero(); - ViewportInteraction::MainEditorViewportInteractionRequestBus::EventResult( - worldSurfacePosition, interaction.m_interactionId.m_viewportId, - &ViewportInteraction::MainEditorViewportInteractionRequestBus::Events::PickTerrain, - interaction.m_mousePick.m_screenCoordinates); + const AzFramework::ViewportId viewportId = interaction.m_interactionId.m_viewportId; - const GridSnapParameters gridSnapParams = GridSnapSettings(interaction.m_interactionId.m_viewportId); + const GridSnapParameters gridSnapParams = GridSnapSettings(viewportId); + const AZ::Vector3 worldSurfacePosition = FindClosestPickIntersection(m_rayRequest, GetDefaultEntityPlacementDistance()); m_onLeftMouseUpCallback(CalculateManipulationDataAction( m_startInternal, TransformUniformScale(GetSpace()), worldSurfacePosition, gridSnapParams.m_gridSnap, - gridSnapParams.m_gridSize, interaction.m_keyboardModifiers, interaction.m_interactionId.m_viewportId)); + gridSnapParams.m_gridSize, interaction.m_keyboardModifiers, viewportId)); } } @@ -141,13 +137,15 @@ namespace AzToolsFramework { if (m_onMouseMoveCallback) { - AZ::Vector3 worldSurfacePosition = AZ::Vector3::CreateZero(); - ViewportInteraction::MainEditorViewportInteractionRequestBus::EventResult( - worldSurfacePosition, interaction.m_interactionId.m_viewportId, - &ViewportInteraction::MainEditorViewportInteractionRequestBus::Events::PickTerrain, - interaction.m_mousePick.m_screenCoordinates); + const AzFramework::ViewportId viewportId = interaction.m_interactionId.m_viewportId; - const GridSnapParameters gridSnapParams = GridSnapSettings(interaction.m_interactionId.m_viewportId); + // update the start and end of the ray + RefreshRayRequest( + m_rayRequest, ViewportInteraction::ViewportScreenToWorldRay(viewportId, interaction.m_mousePick.m_screenCoordinates), + EditorPickRayLength); + + const GridSnapParameters gridSnapParams = GridSnapSettings(viewportId); + const AZ::Vector3 worldSurfacePosition = FindClosestPickIntersection(m_rayRequest, GetDefaultEntityPlacementDistance()); m_onMouseMoveCallback(CalculateManipulationDataAction( m_startInternal, TransformUniformScale(GetSpace()), worldSurfacePosition, gridSnapParams.m_gridSnap, @@ -168,8 +166,8 @@ namespace AzToolsFramework { m_manipulatorView->Draw( GetManipulatorManagerId(), managerState, GetManipulatorId(), - { TransformUniformScale(GetSpace()), GetNonUniformScale(), GetLocalPosition(), MouseOver() }, debugDisplay, cameraState, - mouseInteraction); + ManipulatorState{ TransformUniformScale(GetSpace()), GetNonUniformScale(), GetLocalPosition(), MouseOver() }, debugDisplay, + cameraState, mouseInteraction); } void SurfaceManipulator::InvalidateImpl() diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.h index c9121c49cc..091a71d8da 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/SurfaceManipulator.h @@ -11,6 +11,7 @@ #include "BaseManipulator.h" #include +#include #include namespace AzToolsFramework @@ -58,10 +59,12 @@ namespace AzToolsFramework Start m_start; Current m_current; ViewportInteraction::KeyboardModifiers m_modifiers; + AZ::Vector3 LocalPosition() const { return m_start.m_localPosition + m_current.m_localOffset; } + AZ::Vector3 LocalPositionOffset() const { return m_current.m_localOffset; @@ -106,6 +109,9 @@ namespace AzToolsFramework MouseActionCallback m_onLeftMouseUpCallback = nullptr; MouseActionCallback m_onMouseMoveCallback = nullptr; + //! Cached ray request initialized at mouse down and updated during mouse move. + AzFramework::RenderGeometry::RayRequest m_rayRequest; + static StartInternal CalculateManipulationDataStart( const AZ::Transform& worldFromLocal, const AZ::Vector3& worldSurfacePosition, diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.cpp index 0efe310250..5810662e57 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.cpp @@ -10,18 +10,30 @@ #include #include +#include namespace AzToolsFramework { - static const float SurfaceManipulatorTransparency = 0.75f; - static const float LinearManipulatorAxisLength = 2.0f; - static const float SurfaceManipulatorRadius = 0.1f; - static const AZ::Color LinearManipulatorXAxisColor = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f); static const AZ::Color LinearManipulatorYAxisColor = AZ::Color(0.0f, 1.0f, 0.0f, 1.0f); static const AZ::Color LinearManipulatorZAxisColor = AZ::Color(0.0f, 0.0f, 1.0f, 1.0f); static const AZ::Color SurfaceManipulatorColor = AZ::Color(1.0f, 1.0f, 0.0f, 0.5f); + static TranslationManipulatorsViewCreateInfo DefaultTranslationManipulatorViewCreateInfo() + { + TranslationManipulatorsViewCreateInfo createInfo; + createInfo.axis1Color = LinearManipulatorXAxisColor; + createInfo.axis2Color = LinearManipulatorYAxisColor; + createInfo.axis3Color = LinearManipulatorZAxisColor; + createInfo.surfaceColor = SurfaceManipulatorColor; + createInfo.linearAxisLength = LinearManipulatorAxisLength(); + createInfo.linearConeLength = LinearManipulatorConeLength(); + createInfo.linearConeRadius = LinearManipulatorConeRadius(); + createInfo.planarAxisLength = PlanarManipulatorAxisLength(); + createInfo.surfaceRadius = SurfaceManipulatorRadius(); + return createInfo; + } + TranslationManipulators::TranslationManipulators( const Dimensions dimensions, const AZ::Transform& worldFromLocal, const AZ::Vector3& nonUniformScale) : m_dimensions(dimensions) @@ -234,15 +246,32 @@ namespace AzToolsFramework } } + void TranslationManipulators::ConfigureView2d(const TranslationManipulatorsViewCreateInfo& translationManipulatorViewCreateInfo) + { + ConfigureLinearView( + translationManipulatorViewCreateInfo.linearAxisLength, translationManipulatorViewCreateInfo.linearConeLength, + translationManipulatorViewCreateInfo.linearConeRadius, translationManipulatorViewCreateInfo.axis1Color, + translationManipulatorViewCreateInfo.axis2Color, translationManipulatorViewCreateInfo.axis3Color); + ConfigurePlanarView( + translationManipulatorViewCreateInfo.planarAxisLength, translationManipulatorViewCreateInfo.linearAxisLength, + translationManipulatorViewCreateInfo.linearConeLength, translationManipulatorViewCreateInfo.axis1Color, + translationManipulatorViewCreateInfo.axis2Color, translationManipulatorViewCreateInfo.axis3Color); + } + + void TranslationManipulators::ConfigureView3d(const TranslationManipulatorsViewCreateInfo& translationManipulatorViewCreateInfo) + { + ConfigureView2d(translationManipulatorViewCreateInfo); + ConfigureSurfaceView(translationManipulatorViewCreateInfo.surfaceRadius, translationManipulatorViewCreateInfo.surfaceColor); + } + void TranslationManipulators::ConfigureLinearView( const float axisLength, + const float coneLength, + const float coneRadius, const AZ::Color& axis1Color, const AZ::Color& axis2Color, const AZ::Color& axis3Color /*= AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)*/) { - const float coneLength = 0.28f; - const float coneRadius = 0.07f; - const AZ::Color axesColor[] = { axis1Color, axis2Color, axis3Color }; const auto configureLinearView = [lineBoundWidth = m_lineBoundWidth, coneLength, axisLength, @@ -251,7 +280,7 @@ namespace AzToolsFramework const auto lineLength = axisLength - coneLength; ManipulatorViews views; - views.emplace_back(CreateManipulatorViewLine(*linearManipulator, color, lineLength, lineBoundWidth)); + views.emplace_back(CreateManipulatorViewLine(*linearManipulator, color, axisLength, lineBoundWidth)); views.emplace_back( CreateManipulatorViewCone(*linearManipulator, color, linearManipulator->GetAxis() * lineLength, coneLength, coneRadius)); linearManipulator->SetViews(AZStd::move(views)); @@ -264,19 +293,21 @@ namespace AzToolsFramework } void TranslationManipulators::ConfigurePlanarView( + const float planarAxisLength, + const float linearAxisLength, + const float linearConeLength, const AZ::Color& plane1Color, const AZ::Color& plane2Color /*= AZ::Color(0.0f, 1.0f, 0.0f, 0.5f)*/, const AZ::Color& plane3Color /*= AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)*/) { - const float planeSize = 0.6f; const AZ::Color planesColor[] = { plane1Color, plane2Color, plane3Color }; for (size_t manipulatorIndex = 0; manipulatorIndex < m_planarManipulators.size(); ++manipulatorIndex) { - const AZStd::shared_ptr manipulatorView = CreateManipulatorViewQuad( - *m_planarManipulators[manipulatorIndex], planesColor[manipulatorIndex], planesColor[(manipulatorIndex + 1) % 3], planeSize); - - m_planarManipulators[manipulatorIndex]->SetViews(ManipulatorViews{ manipulatorView }); + const auto& planarManipulator = *m_planarManipulators[manipulatorIndex]; + m_planarManipulators[manipulatorIndex]->SetViews(ManipulatorViews{ CreateManipulatorViewQuadForPlanarTranslationManipulator( + planarManipulator.GetAxis1(), planarManipulator.GetAxis2(), planesColor[manipulatorIndex], + planesColor[(manipulatorIndex + 1) % 3], linearAxisLength, linearConeLength, planarAxisLength) }); } } @@ -286,12 +317,11 @@ namespace AzToolsFramework { m_surfaceManipulator->SetView(CreateManipulatorViewSphere( color, radius, - [](const ViewportInteraction::MouseInteraction& /*mouseInteraction*/, bool mouseOver, + []([[maybe_unused]] const ViewportInteraction::MouseInteraction& mouseInteraction, bool mouseOver, const AZ::Color& defaultColor) -> AZ::Color { const AZ::Color color[2] = { - defaultColor, - Vector3ToVector4(BaseManipulator::s_defaultMouseOverColor.GetAsVector3(), SurfaceManipulatorTransparency) + defaultColor, Vector3ToVector4(BaseManipulator::s_defaultMouseOverColor.GetAsVector3(), SurfaceManipulatorOpacity()) }; return color[mouseOver]; @@ -325,16 +355,25 @@ namespace AzToolsFramework void ConfigureTranslationManipulatorAppearance3d(TranslationManipulators* translationManipulators) { translationManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ()); - translationManipulators->ConfigurePlanarView(LinearManipulatorXAxisColor, LinearManipulatorYAxisColor, LinearManipulatorZAxisColor); - translationManipulators->ConfigureLinearView( - LinearManipulatorAxisLength, LinearManipulatorXAxisColor, LinearManipulatorYAxisColor, LinearManipulatorZAxisColor); - translationManipulators->ConfigureSurfaceView(SurfaceManipulatorRadius, SurfaceManipulatorColor); + translationManipulators->ConfigureView3d(DefaultTranslationManipulatorViewCreateInfo()); } void ConfigureTranslationManipulatorAppearance2d(TranslationManipulators* translationManipulators) { translationManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY()); - translationManipulators->ConfigurePlanarView(LinearManipulatorXAxisColor); - translationManipulators->ConfigureLinearView(LinearManipulatorAxisLength, LinearManipulatorXAxisColor, LinearManipulatorYAxisColor); + translationManipulators->ConfigureView2d(DefaultTranslationManipulatorViewCreateInfo()); + } + + AZStd::shared_ptr CreateManipulatorViewQuadForPlanarTranslationManipulator( + const AZ::Vector3& axis1, + const AZ::Vector3& axis2, + const AZ::Color& axis1Color, + const AZ::Color& axis2Color, + const float linearAxisLength, + const float linearConeLength, + const float planarAxisLength) + { + const AZ::Vector3 offset = (axis1 + axis2) * (((linearAxisLength - linearConeLength) * 0.5f) - (planarAxisLength * 0.5f)); + return CreateManipulatorViewQuad(axis1, axis2, axis1Color, axis2Color, offset, planarAxisLength); } } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.h index 65e53f0680..ea8dbb7975 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/TranslationManipulators.h @@ -15,6 +15,20 @@ namespace AzToolsFramework { + //! Parameters to configure the appearance of the TranslationManipulators view(s). + struct TranslationManipulatorsViewCreateInfo + { + float linearAxisLength; + float linearConeLength; + float linearConeRadius; + float planarAxisLength; + float surfaceRadius; + AZ::Color axis1Color; + AZ::Color axis2Color; + AZ::Color axis3Color; + AZ::Color surfaceColor; + }; + //! TranslationManipulators is an aggregation of 3 linear manipulators, 3 planar manipulators //! and one surface manipulator who share the same transform. class TranslationManipulators : public Manipulators @@ -23,6 +37,9 @@ namespace AzToolsFramework AZ_RTTI(TranslationManipulators, "{D5E49EA2-30E0-42BC-A51D-6A7F87818260}") AZ_CLASS_ALLOCATOR(TranslationManipulators, AZ::SystemAllocator, 0) + TranslationManipulators(TranslationManipulators&&) = delete; + TranslationManipulators& operator=(TranslationManipulators&&) = delete; + //! How many dimensions does this translation manipulator have. enum class Dimensions { @@ -52,25 +69,31 @@ namespace AzToolsFramework void SetAxes(const AZ::Vector3& axis1, const AZ::Vector3& axis2, const AZ::Vector3& axis3 = AZ::Vector3::CreateAxisZ()); + void ConfigureView2d(const TranslationManipulatorsViewCreateInfo& translationManipulatorViewCreateInfo); + void ConfigureView3d(const TranslationManipulatorsViewCreateInfo& translationManipulatorViewCreateInfo); + + //! Sets the bound width to use for the line/axis of a linear manipulator. + void SetLineBoundWidth(float lineBoundWidth); + + private: void ConfigurePlanarView( + float planeSize, + float linearAxisLength, + float linearConeLength, const AZ::Color& plane1Color, const AZ::Color& plane2Color = AZ::Color(0.0f, 1.0f, 0.0f, 0.5f), const AZ::Color& plane3Color = AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)); void ConfigureLinearView( float axisLength, + float coneLength, + float coneRadius, const AZ::Color& axis1Color, const AZ::Color& axis2Color, const AZ::Color& axis3Color = AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)); void ConfigureSurfaceView(float radius, const AZ::Color& color); - //! Sets the bound width to use for the line/axis of a linear manipulator. - void SetLineBoundWidth(float lineBoundWidth); - - private: - AZ_DISABLE_COPY_MOVE(TranslationManipulators) - // Manipulators void ProcessManipulators(const AZStd::function&) override; @@ -130,4 +153,12 @@ namespace AzToolsFramework void ConfigureTranslationManipulatorAppearance3d(TranslationManipulators* translationManipulators); void ConfigureTranslationManipulatorAppearance2d(TranslationManipulators* translationManipulators); + AZStd::shared_ptr CreateManipulatorViewQuadForPlanarTranslationManipulator( + const AZ::Vector3& axis1, + const AZ::Vector3& axis2, + const AZ::Color& axis1Color, + const AZ::Color& axis2Color, + float linearAxisLength, + float linearConeLength, + float planarAxisLength); } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp index f20c11a1d8..3426c56c99 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -34,10 +35,12 @@ namespace AzToolsFramework::Prefab PrefabPublicNotificationBus::Handler::BusConnect(); AZ::Interface::Register(this); AZ::Interface::Register(this); + PrefabFocusPublicRequestBus::Handler::BusConnect(); } PrefabFocusHandler::~PrefabFocusHandler() { + PrefabFocusPublicRequestBus::Handler::BusDisconnect(); AZ::Interface::Unregister(this); AZ::Interface::Unregister(this); PrefabPublicNotificationBus::Handler::BusDisconnect(); @@ -45,6 +48,18 @@ namespace AzToolsFramework::Prefab EditorEntityInfoNotificationBus::Handler::BusDisconnect(); } + void PrefabFocusHandler::Reflect(AZ::ReflectContext* context) + { + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context); behaviorContext) + { + behaviorContext->EBus("PrefabFocusPublicRequestBus") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) + ->Attribute(AZ::Script::Attributes::Category, "Prefab") + ->Attribute(AZ::Script::Attributes::Module, "prefab") + ->Event("FocusOnOwningPrefab", &PrefabFocusPublicInterface::FocusOnOwningPrefab); + } + } + void PrefabFocusHandler::InitializeEditorInterfaces() { m_containerEntityInterface = AZ::Interface::Get(); @@ -60,6 +75,13 @@ namespace AzToolsFramework::Prefab "Prefab - PrefabFocusHandler - " "Focus Mode Interface could not be found. " "Check that it is being correctly initialized."); + + m_readOnlyEntityQueryInterface = AZ::Interface::Get(); + AZ_Assert( + m_readOnlyEntityQueryInterface, + "Prefab - PrefabFocusHandler - " + "ReadOnly Entity Query Interface could not be found. " + "Check that it is being correctly initialized."); } PrefabFocusOperationResult PrefabFocusHandler::FocusOnOwningPrefab(AZ::EntityId entityId) @@ -172,6 +194,8 @@ namespace AzToolsFramework::Prefab // Close all container entities in the old path. CloseInstanceContainers(m_instanceFocusHierarchy); + AZ::EntityId previousContainerEntityId = m_focusedInstanceContainerEntityId; + // Do not store the container for the root instance, use an invalid EntityId instead. m_focusedInstanceContainerEntityId = focusedInstance->get().GetParentInstance().has_value() ? focusedInstance->get().GetContainerEntityId() : AZ::EntityId(); m_focusedTemplateId = focusedInstance->get().GetTemplateId(); @@ -187,6 +211,12 @@ namespace AzToolsFramework::Prefab m_focusModeInterface->SetFocusRoot(containerEntityId); } + // Refresh the read-only cache, if the interface is initialized. + if (m_readOnlyEntityQueryInterface) + { + m_readOnlyEntityQueryInterface->RefreshReadOnlyState({ previousContainerEntityId, m_focusedInstanceContainerEntityId }); + } + // Refresh path variables. RefreshInstanceFocusList(); RefreshInstanceFocusPath(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h index 2e23059a01..4f3dbdd708 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h @@ -22,6 +22,7 @@ namespace AzToolsFramework { class ContainerEntityInterface; class FocusModeInterface; + class ReadOnlyEntityQueryInterface; } namespace AzToolsFramework::Prefab @@ -30,8 +31,8 @@ namespace AzToolsFramework::Prefab //! Handles Prefab Focus mode, determining which prefab file entity changes will target. class PrefabFocusHandler final - : private PrefabFocusInterface - , private PrefabFocusPublicInterface + : public PrefabFocusPublicRequestBus::Handler + , private PrefabFocusInterface , private PrefabPublicNotificationBus::Handler , private EditorEntityContextNotificationBus::Handler , private EditorEntityInfoNotificationBus::Handler @@ -42,13 +43,15 @@ namespace AzToolsFramework::Prefab PrefabFocusHandler(); ~PrefabFocusHandler(); + static void Reflect(AZ::ReflectContext* context); + // PrefabFocusInterface overrides ... void InitializeEditorInterfaces() override; PrefabFocusOperationResult FocusOnPrefabInstanceOwningEntityId(AZ::EntityId entityId) override; TemplateId GetFocusedPrefabTemplateId(AzFramework::EntityContextId entityContextId) const override; InstanceOptionalReference GetFocusedPrefabInstance(AzFramework::EntityContextId entityContextId) const override; - // PrefabFocusPublicInterface overrides ... + // PrefabFocusPublicInterface and PrefabFocusPublicRequestBus overrides ... PrefabFocusOperationResult FocusOnOwningPrefab(AZ::EntityId entityId) override; PrefabFocusOperationResult FocusOnParentOfFocusedPrefab(AzFramework::EntityContextId entityContextId) override; PrefabFocusOperationResult FocusOnPathIndex(AzFramework::EntityContextId entityContextId, int index) override; @@ -91,6 +94,7 @@ namespace AzToolsFramework::Prefab ContainerEntityInterface* m_containerEntityInterface = nullptr; FocusModeInterface* m_focusModeInterface = nullptr; InstanceEntityMapperInterface* m_instanceEntityMapperInterface = nullptr; + ReadOnlyEntityQueryInterface* m_readOnlyEntityQueryInterface = nullptr; }; } // namespace AzToolsFramework::Prefab diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusPublicInterface.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusPublicInterface.h index 2fc9ef6b9a..2c0e95f1cc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusPublicInterface.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusPublicInterface.h @@ -58,4 +58,18 @@ namespace AzToolsFramework::Prefab virtual const int GetPrefabFocusPathLength(AzFramework::EntityContextId entityContextId) const = 0; }; + /** + * The primary purpose of this bus is to facilitate writing automated tests for prefab focus mode. + * If you would like to integrate prefabs focus mode into your system, please call PrefabFocusPublicInterface + * for better performance. + */ + class PrefabFocusPublicRequests + : public AZ::EBusTraits + { + public: + static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; + }; + + using PrefabFocusPublicRequestBus = AZ::EBus; + } // namespace AzToolsFramework::Prefab diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp index 1640ac1017..dfabd42cd1 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp @@ -521,21 +521,18 @@ namespace AzToolsFramework nestedInstanceLink.has_value(), "A valid link was not found for one of the instances provided as input for the CreatePrefab operation."); - PrefabDomReference nestedInstanceLinkDom = nestedInstanceLink->get().GetLinkDom(); - AZ_Assert( - nestedInstanceLinkDom.has_value(), - "A valid DOM was not found for the link corresponding to one of the instances provided as input for the " - "CreatePrefab operation."); - - PrefabDomValueReference nestedInstanceLinkPatches = - PrefabDomUtils::FindPrefabDomValue(nestedInstanceLinkDom->get(), PrefabDomUtils::PatchesName); - AZ_Assert( - nestedInstanceLinkPatches.has_value(), - "A valid DOM for patches was not found for the link corresponding to one of the instances provided as input for the " - "CreatePrefab operation."); - PrefabDom patchesCopyForUndoSupport; - patchesCopyForUndoSupport.CopyFrom(nestedInstanceLinkPatches->get(), patchesCopyForUndoSupport.GetAllocator()); + PrefabDomReference nestedInstanceLinkDom = nestedInstanceLink->get().GetLinkDom(); + if (nestedInstanceLinkDom.has_value()) + { + PrefabDomValueReference nestedInstanceLinkPatches = + PrefabDomUtils::FindPrefabDomValue(nestedInstanceLinkDom->get(), PrefabDomUtils::PatchesName); + if (nestedInstanceLinkPatches.has_value()) + { + patchesCopyForUndoSupport.CopyFrom(nestedInstanceLinkPatches->get(), patchesCopyForUndoSupport.GetAllocator()); + } + } + PrefabUndoHelpers::RemoveLink( sourceInstance->GetTemplateId(), targetTemplateId, sourceInstance->GetInstanceAlias(), sourceInstance->GetLinkId(), AZStd::move(patchesCopyForUndoSupport), undoBatch); @@ -921,6 +918,18 @@ namespace AzToolsFramework } } + bool PrefabPublicHandler::IsOwnedByProceduralPrefabInstance(AZ::EntityId entityId) const + { + if (InstanceOptionalReference instanceReference = m_instanceEntityMapperInterface->FindOwningInstance(entityId); + instanceReference.has_value()) + { + TemplateReference templateReference = m_prefabSystemComponentInterface->FindTemplate(instanceReference->get().GetTemplateId()); + return (templateReference.has_value()) && (templateReference->get().IsProcedural()); + } + + return false; + } + bool PrefabPublicHandler::IsInstanceContainerEntity(AZ::EntityId entityId) const { InstanceOptionalReference owningInstance = m_instanceEntityMapperInterface->FindOwningInstance(entityId); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h index dd071ac09f..41c9b4a292 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h @@ -54,6 +54,7 @@ namespace AzToolsFramework PrefabOperationResult GenerateUndoNodesForEntityChangeAndUpdateCache(AZ::EntityId entityId, UndoSystem::URSequencePoint* parentUndoBatch) override; + bool IsOwnedByProceduralPrefabInstance(AZ::EntityId entityId) const override; bool IsInstanceContainerEntity(AZ::EntityId entityId) const override; bool IsLevelInstanceContainerEntity(AZ::EntityId entityId) const override; AZ::EntityId GetInstanceContainerEntityId(AZ::EntityId entityId) const override; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicInterface.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicInterface.h index ede857dd2b..2eb0bfa8e6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicInterface.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicInterface.h @@ -101,6 +101,13 @@ namespace AzToolsFramework */ virtual PrefabOperationResult GenerateUndoNodesForEntityChangeAndUpdateCache( AZ::EntityId entityId, UndoSystem::URSequencePoint* parentUndoBatch) = 0; + + /** + * Detects if an entity is owned by a procedural prefab. + * @param entityId The entity to query. + * @return True if the entity is owned by a procedural prefab instance, false otherwise. + */ + virtual bool IsOwnedByProceduralPrefabInstance(AZ::EntityId entityId) const = 0; /** * Detects if an entity is the container entity for its owning prefab instance. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp index 62d7a6ac1d..ed16606413 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemComponent.cpp @@ -60,6 +60,7 @@ namespace AzToolsFramework AzToolsFramework::Prefab::PrefabConversionUtils::PrefabCatchmentProcessor::Reflect(context); AzToolsFramework::Prefab::PrefabConversionUtils::EditorInfoRemover::Reflect(context); PrefabPublicRequestHandler::Reflect(context); + PrefabFocusHandler::Reflect(context); PrefabLoader::Reflect(context); PrefabSystemScriptingHandler::Reflect(context); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemScriptingHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemScriptingHandler.cpp index 9d0d0547ae..93dfca3f13 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemScriptingHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabSystemScriptingHandler.cpp @@ -8,10 +8,12 @@ #include #include +#include #include +#include +#include #include #include -#include #include #include @@ -72,6 +74,9 @@ namespace AzToolsFramework::Prefab entities, commonRoot, &topLevelEntities); auto containerEntity = AZStd::make_unique(); + containerEntity->CreateComponent(); + containerEntity->CreateComponent(); + containerEntity->CreateComponent(); containerEntity->CreateComponent(); for (AZ::Entity* entity : topLevelEntities) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.cpp index 7ab7dfdfe4..1f056729d7 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.cpp @@ -860,18 +860,20 @@ namespace AzToolsFramework return; } - bool isDuringUndoRedo = false; - EBUS_EVENT_RESULT(isDuringUndoRedo, AzToolsFramework::ToolsApplicationRequests::Bus, IsDuringUndoRedo); - if (!isDuringUndoRedo) + bool suppressTransformChangedEvent = m_suppressTransformChangedEvent; + // temporarily disable calling OnTransformChanged, because CheckApplyCachedWorldTransform is not guaranteed + // to call it when m_cachedWorldTransform is identity. We send it manually later. + m_suppressTransformChangedEvent = false; + // When parent comes online, compute local TM from world TM. + CheckApplyCachedWorldTransform(parentTransform->GetWorldTM()); + if (!m_initialized) { - // When parent comes online, compute local TM from world TM. - CheckApplyCachedWorldTransform(parentTransform->GetWorldTM()); - } - else - { - // During undo operations, just apply our local TM. + m_initialized = true; + // If this is the first time this entity is being activated, manually compute OnTransformChanged + // this can occur when either the entity first created or undo/redo command is performed OnTransformChanged(AZ::Transform::Identity(), parentTransform->GetWorldTM()); } + m_suppressTransformChangedEvent = suppressTransformChangedEvent; auto& parentChildIds = GetParentTransformComponent()->m_childrenEntityIds; if (parentChildIds.end() == AZStd::find(parentChildIds.begin(), parentChildIds.end(), GetEntityId())) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.h index 931d3b48d6..08d1392d74 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/TransformComponent.h @@ -242,6 +242,9 @@ namespace AzToolsFramework // element is used rather than a data element. bool m_addNonUniformScaleButton = false; + // Used to check whether entity was just created vs manually reactivated. Set true after OnEntityActivated is called the first time. + bool m_initialized = false; + // Deprecated AZ::InterpolationMode m_interpolatePosition; AZ::InterpolationMode m_interpolateRotation; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp index a68a72f00a..284caaa7a2 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -313,7 +314,7 @@ namespace AzToolsFramework if (isEditorOnly) { - return QIcon(QString(":/Icons/Entity_Editor_Only.svg")); + return QIcon(QString(":/Entity/entity_editoronly.svg")); } AZ::Entity* entity = nullptr; @@ -322,10 +323,10 @@ namespace AzToolsFramework if (!isInitiallyActive) { - return QIcon(QString(":/Icons/Entity_Not_Active.svg")); + return QIcon(QString(":/Entity/entity_notactive.svg")); } - return QIcon(QString(":/Icons/Entity.svg")); + return QIcon(QString(":/Entity/entity.svg")); } QVariant EntityOutlinerListModel::GetEntityTooltip(const AZ::EntityId& id) const @@ -1994,9 +1995,13 @@ namespace AzToolsFramework , m_lockCheckBoxes(parent, "Lock", EntityOutlinerListModel::PartiallyLockedRole, EntityOutlinerListModel::LockedAncestorRole) { m_editorEntityFrameworkInterface = AZ::Interface::Get(); - AZ_Assert((m_editorEntityFrameworkInterface != nullptr), "EntityOutlinerItemDelegate requires a EditorEntityFrameworkInterface instance on Construction."); + + m_readOnlyEntityPublicInterface = AZ::Interface::Get(); + AZ_Assert( + (m_readOnlyEntityPublicInterface != nullptr), + "EntityOutlinerItemDelegate requires a ReadOnlyEntityPublicInterface instance on Construction."); } EntityOutlinerItemDelegate::CheckboxGroup::CheckboxGroup(QWidget* parent, AZStd::string prefix, @@ -2108,6 +2113,12 @@ namespace AzToolsFramework } PaintEntityNameAsRichText(painter, customOption, index); + + // Paint Read-Only icon if necessary + if (m_readOnlyEntityPublicInterface->IsReadOnly(entityId)) + { + PaintReadOnlyIcon(painter, option, index); + } } break; default: @@ -2166,10 +2177,10 @@ namespace AzToolsFramework backgroundPath.addRect(backgroundRect); - QColor backgroundColor = m_hoverColor; + QColor backgroundColor = s_hoverColor; if (isSelected) { - backgroundColor = m_selectedColor; + backgroundColor = s_selectedColor; } painter->fillPath(backgroundPath, backgroundColor); @@ -2336,6 +2347,20 @@ namespace AzToolsFramework EntityOutlinerListModel::s_paintingName = false; } + void EntityOutlinerItemDelegate::PaintReadOnlyIcon(QPainter* painter, const QStyleOptionViewItem& option, [[maybe_unused]] const QModelIndex& index) const + { + // Build the rect that will be used to paint the icon + QRect readOnlyRect = QRect(option.rect.topLeft() + s_readOnlyOffset, QSize(s_readOnlyRadius * 2, s_readOnlyRadius * 2)); + + painter->save(); + painter->setRenderHint(QPainter::Antialiasing, true); + painter->setPen(Qt::NoPen); + painter->setBrush(s_readOnlyBackgroundColor); + painter->drawEllipse(readOnlyRect.center(), s_readOnlyRadius, s_readOnlyRadius); + s_readOnlyIcon.paint(painter, readOnlyRect); + painter->restore(); + } + QSize EntityOutlinerItemDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& /*index*/) const { // Get the height of a tall character... diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx index 0a46ee4850..b785dcb31e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerListModel.hxx @@ -38,6 +38,7 @@ namespace AzToolsFramework { class EditorEntityUiInterface; class FocusModeInterface; + class ReadOnlyEntityPublicInterface; namespace EntityOutliner { @@ -344,6 +345,9 @@ namespace AzToolsFramework // Paint the entity name using rich text void PaintEntityNameAsRichText(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; + // Paint the read-only icon on the entity + void PaintReadOnlyIcon(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; + struct CheckboxGroup { EntityOutlinerCheckBox m_default; @@ -372,10 +376,17 @@ namespace AzToolsFramework // this is a cache, and is hence mutable mutable QRect m_cachedBoundingRectOfTallCharacter; - const QColor m_selectedColor = QColor(255, 255, 255, 45); - const QColor m_hoverColor = QColor(255, 255, 255, 30); + inline static const QColor s_selectedColor = QColor(255, 255, 255, 45); + inline static const QColor s_hoverColor = QColor(255, 255, 255, 30); + + inline static const QColor s_readOnlyBackgroundColor = QColor("#444444"); + inline static const QPoint s_readOnlyOffset = QPoint(10, 10); + inline static const int s_readOnlyRadius = 6; + + QIcon s_readOnlyIcon = QIcon(QString(":/Entity/readonly.svg")); EditorEntityUiInterface* m_editorEntityFrameworkInterface = nullptr; + ReadOnlyEntityPublicInterface* m_readOnlyEntityPublicInterface = nullptr; }; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp index aa6d82e634..1c60b78322 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -565,9 +566,7 @@ namespace AzToolsFramework EditorRequestBus::BroadcastResult(position, &EditorRequestBus::Events::GetWorldPositionAtViewportCenter); } - // Instantiating from context menu always puts the instance at the root level auto createPrefabOutcome = s_prefabPublicInterface->InstantiatePrefab(prefabFilePath, parentId, position); - if (!createPrefabOutcome.IsSuccess()) { WarnUserOfError("Prefab Instantiation Error",createPrefabOutcome.GetError()); @@ -594,15 +593,13 @@ namespace AzToolsFramework } else { - // otherwise return since it needs to be inside an authored prefab - return; + EditorRequestBus::BroadcastResult(position, &EditorRequestBus::Events::GetWorldPositionAtViewportCenter); } - // Instantiating from context menu always puts the instance at the root level auto createPrefabOutcome = s_prefabPublicInterface->InstantiatePrefab(prefabAssetPath, parentId, position); if (!createPrefabOutcome.IsSuccess()) { - WarnUserOfError("Prefab Instantiation Error", createPrefabOutcome.GetError()); + WarnUserOfError("Procedural Prefab Instantiation Error", createPrefabOutcome.GetError()); } } } @@ -1268,7 +1265,14 @@ namespace AzToolsFramework } else { - s_editorEntityUiInterface->RegisterEntity(entityId, m_prefabUiHandler.GetHandlerId()); + if (s_prefabPublicInterface->IsOwnedByProceduralPrefabInstance(entityId)) + { + s_editorEntityUiInterface->RegisterEntity(entityId, m_proceduralPrefabUiHandler.GetHandlerId()); + } + else + { + s_editorEntityUiInterface->RegisterEntity(entityId, m_prefabUiHandler.GetHandlerId()); + } // Register entity as a container s_containerEntityInterface->RegisterEntityAsContainer(entityId); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.h index 808a0c2408..8589bee942 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.h @@ -18,10 +18,11 @@ #include #include #include - #include #include #include +#include +#include #include @@ -92,12 +93,18 @@ namespace AzToolsFramework void ExecuteSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference) override; private: - // Used to handle the UI for the level root + // Used to handle the UI for the level root. LevelRootUiHandler m_levelRootUiHandler; - // Used to handle the UI for prefab entities + // Used to handle the UI for prefab entities. PrefabUiHandler m_prefabUiHandler; + // Used to handle the UI for procedural prefab entities. + ProceduralPrefabUiHandler m_proceduralPrefabUiHandler; + + // Ensures entities owned by procedural prefab instances are marked as read-only correctly. + ProceduralPrefabReadOnlyHandler m_proceduralPrefabReadOnlyHandler; + // Context menu item handlers static void ContextMenu_CreatePrefab(AzToolsFramework::EntityIdList selectedEntities); static void ContextMenu_InstantiatePrefab(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp index 8b56b26508..cc0018753e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp @@ -23,17 +23,6 @@ namespace AzToolsFramework { AzFramework::EntityContextId PrefabUiHandler::s_editorEntityContextId = AzFramework::EntityContextId::CreateNull(); - const QColor PrefabUiHandler::m_backgroundColor = QColor("#444444"); - const QColor PrefabUiHandler::m_backgroundHoverColor = QColor("#5A5A5A"); - const QColor PrefabUiHandler::m_backgroundSelectedColor = QColor("#656565"); - const QColor PrefabUiHandler::m_prefabCapsuleColor = QColor("#1E252F"); - const QColor PrefabUiHandler::m_prefabCapsuleDisabledColor = QColor("#35383C"); - const QColor PrefabUiHandler::m_prefabCapsuleEditColor = QColor("#4A90E2"); - const QString PrefabUiHandler::m_prefabIconPath = QString(":/Entity/prefab.svg"); - const QString PrefabUiHandler::m_prefabEditIconPath = QString(":/Entity/prefab_edit.svg"); - const QString PrefabUiHandler::m_prefabEditOpenIconPath = QString(":/Entity/prefab_edit_open.svg"); - const QString PrefabUiHandler::m_prefabEditCloseIconPath = QString(":/Entity/prefab_edit_close.svg"); - PrefabUiHandler::PrefabUiHandler() { m_prefabPublicInterface = AZ::Interface::Get(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.h index bb1c646dbe..a1c624f85a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.h @@ -46,7 +46,7 @@ namespace AzToolsFramework void OnOutlinerItemCollapse(const QModelIndex& index) const override; bool OnEntityDoubleClick(AZ::EntityId entityId) const override; - private: + protected: Prefab::PrefabFocusPublicInterface* m_prefabFocusPublicInterface = nullptr; Prefab::PrefabPublicInterface* m_prefabPublicInterface = nullptr; @@ -56,17 +56,17 @@ namespace AzToolsFramework static AzFramework::EntityContextId s_editorEntityContextId; - static constexpr int m_prefabCapsuleRadius = 6; - static constexpr int m_prefabBorderThickness = 2; - static const QColor m_backgroundColor; - static const QColor m_backgroundHoverColor; - static const QColor m_backgroundSelectedColor; - static const QColor m_prefabCapsuleColor; - static const QColor m_prefabCapsuleDisabledColor; - static const QColor m_prefabCapsuleEditColor; - static const QString m_prefabIconPath; - static const QString m_prefabEditIconPath; - static const QString m_prefabEditOpenIconPath; - static const QString m_prefabEditCloseIconPath; + int m_prefabCapsuleRadius = 6; + int m_prefabBorderThickness = 2; + QColor m_backgroundColor = QColor("#444444"); + QColor m_backgroundHoverColor = QColor("#5A5A5A"); + QColor m_backgroundSelectedColor = QColor("#656565"); + QColor m_prefabCapsuleColor = QColor("#1E252F"); + QColor m_prefabCapsuleDisabledColor = QColor("#35383C"); + QColor m_prefabCapsuleEditColor = QColor("#4A90E2"); + QString m_prefabIconPath = QString(":/Entity/prefab.svg"); + QString m_prefabEditIconPath = QString(":/Entity/prefab_edit.svg"); + QString m_prefabEditOpenIconPath = QString(":/Entity/prefab_edit_open.svg"); + QString m_prefabEditCloseIconPath = QString(":/Entity/prefab_edit_close.svg"); }; } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.cpp new file mode 100644 index 0000000000..ed962ef4ad --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.cpp @@ -0,0 +1,68 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * 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 AzToolsFramework +{ + namespace Prefab + { + ProceduralPrefabReadOnlyHandler::ProceduralPrefabReadOnlyHandler() + { + m_prefabPublicInterface = AZ::Interface::Get(); + AZ_Assert( + m_prefabPublicInterface != nullptr, + "ProceduralPrefabReadOnlyHandler requires a PrefabPublicInterface instance on Initialize."); + + m_prefabFocusPublicInterface = AZ::Interface::Get(); + AZ_Assert( + m_prefabFocusPublicInterface != nullptr, + "ProceduralPrefabReadOnlyHandler requires a PrefabFocusPublicInterface instance on Initialize."); + + AzFramework::EntityContextId editorEntityContextId = AzFramework::EntityContextId::CreateNull(); + EditorEntityContextRequestBus::BroadcastResult(editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId); + + ReadOnlyEntityQueryRequestBus::Handler::BusConnect(editorEntityContextId); + + // Refresh the whole read-only cache + if (auto readOnlyEntityQueryInterface = AZ::Interface::Get()) + { + readOnlyEntityQueryInterface->RefreshReadOnlyStateForAllEntities(); + } + } + + ProceduralPrefabReadOnlyHandler ::~ProceduralPrefabReadOnlyHandler() + { + ReadOnlyEntityQueryRequestBus::Handler::BusDisconnect(); + } + + void ProceduralPrefabReadOnlyHandler::IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) + { + if(m_prefabPublicInterface->IsOwnedByProceduralPrefabInstance(entityId)) + { + // All entities nested inside a procedural prefabs should always be marked as read-only. + if (!m_prefabPublicInterface->IsInstanceContainerEntity(entityId)) + { + isReadOnly = true; + } + + // The container entity of a procedural prefab should only be marked as read-only when the prefab is being edited. + if (m_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(entityId)) + { + isReadOnly = true; + } + } + } + + } // namespace Prefab +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.h new file mode 100644 index 0000000000..a4d13752bd --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabReadOnlyHandler.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 AzToolsFramework +{ + namespace Prefab + { + class PrefabFocusPublicInterface; + class PrefabPublicInterface; + + //! Ensures entities in a procedural prefab are correctly reported as read-only. + class ProceduralPrefabReadOnlyHandler + : public ReadOnlyEntityQueryRequestBus::Handler + { + public: + AZ_CLASS_ALLOCATOR(ProceduralPrefabReadOnlyHandler, AZ::SystemAllocator, 0); + AZ_RTTI(AzToolsFramework::ProceduralPrefabReadOnlyHandler, "{A2D72461-8CA3-45EE-81D2-4976BC0B6AE9}"); + + ProceduralPrefabReadOnlyHandler(); + ~ProceduralPrefabReadOnlyHandler() override; + + // ReadOnlyEntityQueryRequestBus overrides ... + void IsReadOnly(const AZ::EntityId& entityId, bool& isReadOnly) override; + + private: + PrefabPublicInterface* m_prefabPublicInterface = nullptr; + PrefabFocusPublicInterface* m_prefabFocusPublicInterface = nullptr; + }; + + } // namespace Prefab +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.cpp new file mode 100644 index 0000000000..57b41d3a4b --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.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 + +#include + +namespace AzToolsFramework +{ + ProceduralPrefabUiHandler::ProceduralPrefabUiHandler() + { + m_prefabCapsuleColor = QColor("#361561"); + m_prefabCapsuleDisabledColor = QColor("#4B3455"); + m_prefabCapsuleEditColor = QColor("#361561"); + m_prefabIconPath = QString(":/Entity/prefab_edit.svg"); + m_prefabEditOpenIconPath = QString(":/Entity/prefab_edit_open_readonly.svg"); + } + + QString ProceduralPrefabUiHandler::GenerateItemTooltip(AZ::EntityId entityId) const + { + if (AZ::IO::Path path = m_prefabPublicInterface->GetOwningInstancePrefabPath(entityId); !path.empty()) + { + return QObject::tr("Double click to inspect.\n%1").arg(path.Native().data()); + } + return QString(); + } +} diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.h new file mode 100644 index 0000000000..2b8c90e0eb --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/Procedural/ProceduralPrefabUiHandler.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 + +#include + +namespace AzToolsFramework +{ + namespace Prefab + { + class PrefabFocusPublicInterface; + class PrefabPublicInterface; + }; + + //! Implements the Editor UI for Procedural Prefabs. + class ProceduralPrefabUiHandler + : public PrefabUiHandler + { + public: + AZ_CLASS_ALLOCATOR(ProceduralPrefabUiHandler, AZ::SystemAllocator, 0); + AZ_RTTI(AzToolsFramework::ProceduralPrefabUiHandler, "{3A3DF9FF-9C2E-4439-B7B4-72173B5A3502}", PrefabUiHandler); + + ProceduralPrefabUiHandler(); + ~ProceduralPrefabUiHandler() override = default; + + QString GenerateItemTooltip(AZ::EntityId entityId) const override; + }; +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp index fa419d5f14..8104aee4fd 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp @@ -45,6 +45,7 @@ AZ_POP_DISABLE_WARNING #include #include #include +#include #include #include #include @@ -497,6 +498,9 @@ namespace AzToolsFramework m_prefabPublicInterface = AZ::Interface::Get(); AZ_Assert(m_prefabPublicInterface != nullptr, "EntityPropertyEditor requires a PrefabPublicInterface instance on Initialize."); + m_readOnlyEntityPublicInterface = AZ::Interface::Get(); + AZ_Assert(m_readOnlyEntityPublicInterface != nullptr, "EntityPropertyEditor requires a ReadOnlyEntityPublicInterface instance on Initialize."); + setObjectName("EntityPropertyEditor"); setAcceptDrops(true); @@ -535,10 +539,6 @@ namespace AzToolsFramework model->setItem(row, 0, m_comboItems[row]); } m_gui->m_statusComboBox->setModel(model); - m_gui->m_statusComboBox->setStyleSheet("QComboBox {border: 0px; border-radius:3px; background-color:#555555; color:white}" - "QComboBox:on {background-color:#e9e9e9; color:black; border:0px}" - "QComboBox::down-arrow:on {image: url(:/stylesheet/img/dropdowns/black_down_arrow.png)}" - "QComboBox::drop-down {border-radius: 3p}"); AzQtComponents::ComboBox::addCustomCheckStateStyle(m_gui->m_statusComboBox); EnableEditor(true); m_sceneIsNew = true; @@ -565,6 +565,12 @@ namespace AzToolsFramework AZ::EntitySystemBus::Handler::BusConnect(); EntityPropertyEditorRequestBus::Handler::BusConnect(); EditorWindowUIRequestBus::Handler::BusConnect(); + + AzFramework::EntityContextId editorEntityContextId = AzFramework::EntityContextId::CreateNull(); + EditorEntityContextRequestBus::BroadcastResult( + editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId); + ReadOnlyEntityPublicNotificationBus::Handler::BusConnect(editorEntityContextId); + m_spacer = nullptr; m_emptyIcon = QIcon(); @@ -614,6 +620,7 @@ namespace AzToolsFramework { qApp->removeEventFilter(this); + ReadOnlyEntityPublicNotificationBus::Handler::BusDisconnect(); EditorWindowUIRequestBus::Handler::BusDisconnect(); EntityPropertyEditorRequestBus::Handler::BusDisconnect(); ToolsApplicationEvents::Bus::Handler::BusDisconnect(); @@ -973,7 +980,7 @@ namespace AzToolsFramework m_gui->m_entityDetailsLabel->setVisible(false); // If we're in edit mode, make the name field editable. - m_gui->m_entityNameEditor->setReadOnly(!m_gui->m_componentListContents->isEnabled()); + m_gui->m_entityNameEditor->setReadOnly(!m_gui->m_componentListContents->isEnabled() || m_selectionContainsReadOnlyEntity); // get the name of the entity. auto entity = GetSelectedEntityById(entityId); @@ -1062,6 +1069,12 @@ namespace AzToolsFramework bool EntityPropertyEditor::CanAddComponentsToSelection(const SelectionEntityTypeInfo& selectionEntityTypeInfo) const { + if (m_selectionContainsReadOnlyEntity) + { + // Can't add components if there is a read only entity in the selection + return false; + } + if (selectionEntityTypeInfo == SelectionEntityTypeInfo::Mixed || selectionEntityTypeInfo == SelectionEntityTypeInfo::None) { @@ -1126,6 +1139,17 @@ namespace AzToolsFramework m_selectedEntityIds.clear(); GetSelectedEntities(m_selectedEntityIds); + // Check if any of the selected entities are marked as read only + m_selectionContainsReadOnlyEntity = false; + for (const auto& entityId : m_selectedEntityIds) + { + if (m_readOnlyEntityPublicInterface->IsReadOnly(entityId)) + { + m_selectionContainsReadOnlyEntity = true; + break; + } + } + SourceControlFileInfo scFileInfo; ToolsApplicationRequests::Bus::BroadcastResult(scFileInfo, &ToolsApplicationRequests::GetSceneSourceControlInfo); @@ -1681,6 +1705,12 @@ namespace AzToolsFramework componentEditor->UpdateExpandability(); componentEditor->InvalidateAll(!componentInFilter ? m_filterString.c_str() : nullptr); + // If we are in read only mode, then show the components as disabled + if (m_selectionContainsReadOnlyEntity) + { + componentEditor->mockDisabledState(true); + } + if (!componentEditor->GetPropertyEditor()->HasFilteredOutNodes() || componentEditor->GetPropertyEditor()->HasVisibleNodes()) { for (AZ::Component* componentInstance : componentInstances) @@ -3077,6 +3107,7 @@ namespace AzToolsFramework } } + m_gui->m_statusComboBox->setDisabled(m_selectionContainsReadOnlyEntity); m_gui->m_statusComboBox->setVisible(!m_isSystemEntityEditor && !m_isLevelEntityEditor); m_gui->m_statusComboBox->style()->unpolish(m_gui->m_statusComboBox); m_gui->m_statusComboBox->style()->polish(m_gui->m_statusComboBox); @@ -3304,7 +3335,8 @@ namespace AzToolsFramework const auto& componentsToEdit = GetSelectedComponents(); const bool hasComponents = !m_selectedEntityIds.empty() && !componentsToEdit.empty(); - const bool allowRemove = hasComponents && AreComponentsRemovable(componentsToEdit); + // Don't allow components to be removed/cut/enabled/disabled if read only + const bool allowRemove = hasComponents && AreComponentsRemovable(componentsToEdit) && !m_selectionContainsReadOnlyEntity; const bool allowCopy = hasComponents && AreComponentsCopyable(componentsToEdit); m_actionToDeleteComponents->setEnabled(allowRemove); @@ -3366,6 +3398,12 @@ namespace AzToolsFramework return false; } + if (m_selectionContainsReadOnlyEntity) + { + // Can't paste components if there is a read only entity in the selection + return false; + } + // Grab component data from clipboard, if exists const QMimeData* mimeData = ComponentMimeData::GetComponentMimeDataFromClipboard(); @@ -5727,6 +5765,14 @@ namespace AzToolsFramework SaveComponentEditorState(); } + void EntityPropertyEditor::OnReadOnlyEntityStatusChanged(const AZ::EntityId& entityId, [[maybe_unused]] bool readOnly) + { + if (IsEntitySelected(entityId)) + { + UpdateContents(); + } + } + void EntityPropertyEditor::OnEditorModeActivated( [[maybe_unused]] const AzToolsFramework::ViewportEditorModesInterface& editorModeState, AzToolsFramework::ViewportEditorMode mode) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx index 8dd0ffc4ee..254b70996b 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -62,6 +63,7 @@ namespace AzToolsFramework class ComponentPaletteWidget; class ComponentModeCollectionInterface; struct SourceControlFileInfo; + class ReadOnlyEntityPublicInterface; namespace AssetBrowser { @@ -116,6 +118,7 @@ namespace AzToolsFramework , public AZ::EntitySystemBus::Handler , public AZ::TickBus::Handler , private EditorWindowUIRequestBus::Handler + , private ReadOnlyEntityPublicNotificationBus::Handler { Q_OBJECT; public: @@ -253,6 +256,9 @@ namespace AzToolsFramework // EditorWindowRequestBus overrides void SetEditorUiEnabled(bool enable) override; + // ReadOnlyEntityPublicNotificationBus overrides ... + void OnReadOnlyEntityStatusChanged(const AZ::EntityId& entityId, bool readOnly) override; + bool IsEntitySelected(const AZ::EntityId& id) const; bool IsSingleEntitySelected(const AZ::EntityId& id) const; @@ -623,6 +629,9 @@ namespace AzToolsFramework Prefab::PrefabPublicInterface* m_prefabPublicInterface = nullptr; bool m_prefabsAreEnabled = false; + ReadOnlyEntityPublicInterface* m_readOnlyEntityPublicInterface = nullptr; + bool m_selectionContainsReadOnlyEntity = false; + // Reordering row widgets within the RPE. static constexpr float MoveFadeSeconds = 0.5f; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.ui b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.ui index 8a86d429f1..b7cb5a0156 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.ui +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.ui @@ -191,7 +191,7 @@ - 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/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/UnitTest/AzToolsFrameworkTestHelpers.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h index 1e29f1dbce..77a3639871 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 @@ -235,6 +237,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 8f8bd3e3f9..df96836bde 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.cpp @@ -64,23 +64,12 @@ namespace AzToolsFramework return circleBoundWidth; } - AZ::Vector3 FindClosestPickIntersection( - AzFramework::ViewportId viewportId, const AzFramework::ScreenPoint& screenPoint, const float rayLength, const float defaultDistance) + AZ::Vector3 FindClosestPickIntersection(const AzFramework::RenderGeometry::RayRequest& rayRequest, const float defaultDistance) { - using AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus; - AzToolsFramework::ViewportInteraction::ProjectedViewportRay viewportRay{}; - ViewportInteractionRequestBus::EventResult( - viewportRay, viewportId, &ViewportInteractionRequestBus::Events::ViewportScreenToWorldRay, screenPoint); - - AzFramework::RenderGeometry::RayRequest ray; - ray.m_startWorldPosition = viewportRay.origin; - ray.m_endWorldPosition = viewportRay.origin + viewportRay.direction * rayLength; - ray.m_onlyVisible = true; - AzFramework::RenderGeometry::RayResult renderGeometryIntersectionResult; AzFramework::RenderGeometry::IntersectorBus::EventResult( renderGeometryIntersectionResult, AzToolsFramework::GetEntityContextId(), - &AzFramework::RenderGeometry::IntersectorBus::Events::RayIntersect, ray); + &AzFramework::RenderGeometry::IntersectorBus::Events::RayIntersect, rayRequest); // attempt a ray intersection with any visible mesh and return the intersection position if successful if (renderGeometryIntersectionResult) @@ -89,7 +78,32 @@ namespace AzToolsFramework } else { - return viewportRay.origin + viewportRay.direction * defaultDistance; + 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.origin; + rayRequest.m_endWorldPosition = viewportRay.origin + viewportRay.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 aa97eb361e..aec2d3fbca 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h @@ -15,13 +15,19 @@ #include #include #include +#include #include #include namespace AzFramework { struct ScreenPoint; -} + + namespace RenderGeometry + { + struct RayRequest; + } +} // namespace AzFramework namespace AzToolsFramework { @@ -177,6 +183,26 @@ namespace AzToolsFramework //! Type to inherit to implement ViewportInteractionRequests. using ViewportInteractionRequestBus = AZ::EBus; + //! 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 AzToolsFramework::ViewportInteraction::ProjectedViewportRay{ rayOrigin, rayDirection }; + } + + //! 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 { @@ -228,10 +254,6 @@ namespace AzToolsFramework class MainEditorViewportInteractionRequests { public: - //! 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. @@ -337,9 +359,18 @@ namespace AzToolsFramework //! 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..f8550b1a29 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.cpp @@ -0,0 +1,123 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * 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"; + + 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); + } +} // 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..f5371b6035 --- /dev/null +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportSettings.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * 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); +} // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.cpp index 0a7bed6b18..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,8 +17,21 @@ #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 { + float GetDefaultEntityPlacementDistance() + { + return ed_defaultEntityPlacementDistance; + } + AZ::Vector3 CalculateCenterOffset(const AZ::EntityId entityId, const EditorTransformComponentSelectionRequests::Pivot pivot) { if (Centered(pivot)) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h index 5c9f47fdd3..b3a6c6afd4 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h @@ -60,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 d3540f8c09..f54da3b089 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 @@ -33,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -231,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) @@ -243,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( @@ -923,26 +925,6 @@ namespace AzToolsFramework } } - 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) @@ -1038,6 +1020,7 @@ namespace AzToolsFramework EditorManipulatorCommandUndoRedoRequestBus::Handler::BusConnect(entityContextId); EditorContextMenuBus::Handler::BusConnect(); ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusConnect(ViewportUi::DefaultViewportId); + ReadOnlyEntityPublicNotificationBus::Handler::BusConnect(entityContextId); CreateTransformModeSelectionCluster(); CreateSpaceSelectionCluster(); @@ -1073,6 +1056,7 @@ namespace AzToolsFramework m_pivotOverrideFrame.Reset(); + ReadOnlyEntityPublicNotificationBus::Handler::BusDisconnect(); ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusDisconnect(); EditorContextMenuBus::Handler::BusConnect(); EditorManipulatorCommandUndoRedoRequestBus::Handler::BusDisconnect(); @@ -1286,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(); }); @@ -1321,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(); }); @@ -1343,6 +1327,39 @@ namespace AzToolsFramework EndRecordManipulatorCommand(); }); + // surface + translationManipulators->InstallSurfaceManipulatorMouseDownCallback( + [this, manipulatorEntityIds]([[maybe_unused]] const SurfaceManipulator::Action& action) + { + BuildSortedEntityIdVectorFromEntityIdMap(m_entityIdManipulators.m_lookups, manipulatorEntityIds->m_entityIds); + + InitializeTranslationLookup(m_entityIdManipulators); + + m_axisPreview.m_translation = m_entityIdManipulators.m_manipulators->GetLocalTransform().GetTranslation(); + m_axisPreview.m_orientation = QuaternionFromTransformNoScaling(m_entityIdManipulators.m_manipulators->GetLocalTransform()); + + // see comment [ref 1.] above + BeginRecordManipulatorCommand(); + }); + + translationManipulators->InstallSurfaceManipulatorMouseMoveCallback( + [this, prevModifiers, manipulatorEntityIds](const SurfaceManipulator::Action& action) mutable + { + UpdateTranslationManipulator( + action, manipulatorEntityIds->m_entityIds, m_entityIdManipulators, m_pivotOverrideFrame, prevModifiers, + m_transformChangedInternally, m_spaceCluster.m_spaceLock); + }); + + translationManipulators->InstallSurfaceManipulatorMouseUpCallback( + [this, manipulatorEntityIds]([[maybe_unused]] const SurfaceManipulator::Action& action) + { + AzToolsFramework::EditorTransformChangeNotificationBus::Broadcast( + &AzToolsFramework::EditorTransformChangeNotificationBus::Events::OnEntityTransformChanged, + manipulatorEntityIds->m_entityIds); + + EndRecordManipulatorCommand(); + }); + // transfer ownership m_entityIdManipulators.m_manipulators = AZStd::move(translationManipulators); } @@ -1363,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 @@ -1395,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(); }); @@ -1522,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 { @@ -1867,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)) { @@ -1879,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)) { @@ -1973,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) @@ -3605,6 +3626,18 @@ namespace AzToolsFramework 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); + } + ); + } } void EditorTransformComponentSelection::OnTransformChanged( @@ -3812,6 +3845,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 10f83db739..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); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake b/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake index bdf6abe141..6922ad26a2 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake @@ -159,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 @@ -502,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 @@ -762,6 +768,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 diff --git a/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.cpp b/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.cpp index fa5a6b344a..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 @@ -62,4 +64,51 @@ namespace UnitTest { 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 358a9f810a..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 @@ -44,4 +45,21 @@ namespace UnitTest 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/EditorTransformComponentSelectionTests.cpp b/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp index f4077e992b..859cc67c41 100644 --- a/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp @@ -1663,7 +1663,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) @@ -2973,4 +2973,176 @@ namespace UnitTest 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.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 93010aa63d..228dea6b7c 100644 --- a/Code/Framework/AzToolsFramework/Tests/EditorVertexSelectionTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/EditorVertexSelectionTests.cpp @@ -10,22 +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 { @@ -42,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); @@ -68,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 @@ -112,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); } } @@ -188,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{}); /////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -197,8 +243,7 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// } - using EditorVertexSelectionManipulatorFixture = - IndirectCallManipulatorViewportInteractionFixtureMixin; + using EditorVertexSelectionManipulatorFixture = IndirectCallManipulatorViewportInteractionFixtureMixin; TEST_F(EditorVertexSelectionManipulatorFixture, CannotDeleteAllVertices) { @@ -206,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) { @@ -267,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; @@ -300,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/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/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/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/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/TransformComponent.cpp b/Code/Framework/AzToolsFramework/Tests/TransformComponent.cpp index 4fbebc8526..3849ed23c9 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 @@ -1063,4 +1066,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/EntityOutlinerTests.cpp b/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp index 78cdcf9d38..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 @@ -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/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/aztoolsframeworktests_files.cmake b/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake index 99a998abb8..1a8819b188 100644 --- a/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake +++ b/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake @@ -28,6 +28,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 @@ -66,6 +69,7 @@ set(FILES Prefab/PrefabFocus/PrefabFocusTests.cpp Prefab/MockPrefabFileIOActionValidator.cpp Prefab/MockPrefabFileIOActionValidator.h + Prefab/PrefabDeleteTests.cpp Prefab/PrefabDuplicateTests.cpp Prefab/PrefabEntityAliasTests.cpp Prefab/PrefabInstanceToTemplatePropagatorTests.cpp @@ -100,6 +104,7 @@ set(FILES Prefab/SpawnableSortEntitiesTests.cpp Prefab/PrefabScriptingTests.cpp Prefab/ProceduralPrefabAssetTests.cpp + PropertyIntCtrlCommonTests.cpp PropertyIntCtrlCommonTests.h PropertyIntSliderCtrlTests.cpp PropertyIntSpinCtrlTests.cpp @@ -135,5 +140,6 @@ set(FILES Viewport/ViewportUiDisplayTests.cpp Viewport/ViewportUiManagerTests.cpp Viewport/ViewportUiWidgetManagerTests.cpp + Viewport/ViewportInteractionTests.cpp Visibility/EditorVisibilityTests.cpp ) 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/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/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/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/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 d97c800763..6fdc8b52fe 100644 --- a/Code/Legacy/CryCommon/ISystem.h +++ b/Code/Legacy/CryCommon/ISystem.h @@ -427,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); } // @@ -811,14 +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 ILevelSystem* GetILevelSystem() = 0; virtual ICmdLine* GetICmdLine() = 0; virtual ILog* GetILog() = 0; @@ -829,13 +828,6 @@ struct ISystem virtual IRemoteConsole* GetIRemoteConsole() = 0; virtual ISystemEventDispatcher* GetISystemEventDispatcher() = 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; ////////////////////////////////////////////////////////////////////////// @@ -860,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; @@ -911,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: @@ -937,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 @@ -973,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; @@ -1027,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 @@ -1042,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 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 26938cade3..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*); - 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/Mocks/ISystemMock.h b/Code/Legacy/CryCommon/Mocks/ISystemMock.h index 4b6669614b..e1c0e0d206 100644 --- a/Code/Legacy/CryCommon/Mocks/ISystemMock.h +++ b/Code/Legacy/CryCommon/Mocks/ISystemMock.h @@ -52,7 +52,7 @@ 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(GetILevelSystem, @@ -75,12 +75,6 @@ public: IRemoteConsole * ()); MOCK_METHOD0(GetISystemEventDispatcher, ISystemEventDispatcher * ()); - MOCK_METHOD1(SetForceNonDevMode, - void(bool bValue)); - MOCK_CONST_METHOD0(GetForceNonDevMode, - bool()); - MOCK_CONST_METHOD0(WasInDevMode, - bool()); MOCK_CONST_METHOD0(IsDevMode, bool()); MOCK_METHOD3(CreateXmlNode, @@ -93,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, @@ -115,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, @@ -127,8 +115,6 @@ public: ILocalizationManager * ()); MOCK_METHOD0(GetNoiseGen, CPNoise3 * ()); - MOCK_METHOD0(GetUpdateCounter, - uint64()); MOCK_METHOD1(RegisterErrorObserver, bool(IErrorObserver * errorObserver)); MOCK_METHOD1(UnregisterErrorObserver, @@ -139,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, @@ -167,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/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/WinBase.cpp b/Code/Legacy/CryCommon/WinBase.cpp index 4436f24281..3445637d28 100644 --- a/Code/Legacy/CryCommon/WinBase.cpp +++ b/Code/Legacy/CryCommon/WinBase.cpp @@ -53,21 +53,8 @@ #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 @@ -81,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 @@ -232,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) @@ -369,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]; @@ -401,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; } @@ -550,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) @@ -697,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 @@ -775,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))) ////////////////////////////////////////////////////////////////////////// @@ -904,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) @@ -960,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"); @@ -1006,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) @@ -1087,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 } @@ -1171,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 @@ -1194,190 +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 -) -{ - 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] = '/'; - } - } - - if ((pAdjustedFilename) == (char*)-1) - { - return false; - } - -#if !defined(LINUX) && !defined(APPLE) && !defined(DEFINE_SKIP_WILDCARD_CHECK) // fix the parent path anyhow. - char* slash = strrchr(pAdjustedFilename, '/'); - char* name = pAdjustedFilename; - if (slash) - { - name = slash + 1; - *slash = 0; - } - // 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; - } - // Scan for the file. - if (slash) - { - *slash = '/'; - } -#endif - - -#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 d3e13525d7..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,8 +28,6 @@ set(FILES ISerialize.h IShader.h ISplines.h - IStatObj.h - StatObjBus.h ISystem.h ITexture.h IValidator.h @@ -104,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/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 6e61e64c4b..64aa7ce1ca 100644 --- a/Code/Legacy/CryCommon/platform_impl.cpp +++ b/Code/Legacy/CryCommon/platform_impl.cpp @@ -178,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 } @@ -281,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/LevelSystem/LevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp index 8945761184..6027e9c474 100644 --- a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp @@ -27,7 +27,6 @@ #include #include "MainThreadRenderRequestBus.h" -#include #include #include #include @@ -882,12 +881,6 @@ 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; [[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp index b91c8f2ca9..69e0b0c2a6 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp @@ -19,7 +19,6 @@ #include #include "MainThreadRenderRequestBus.h" -#include #include #include #include @@ -558,12 +557,6 @@ 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; [[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; diff --git a/Code/Legacy/CrySystem/System.cpp b/Code/Legacy/CrySystem/System.cpp index bb48e69cec..c1ef60414f 100644 --- a/Code/Legacy/CrySystem/System.cpp +++ b/Code/Legacy/CrySystem/System.cpp @@ -116,7 +116,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) #include #include #include -#include #include @@ -209,20 +208,7 @@ CSystem::CSystem(SharedEnvironmentInstance* pSharedEnvironment) 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_pLocalizationManager = NULL; @@ -230,18 +216,9 @@ CSystem::CSystem(SharedEnvironmentInstance* pSharedEnvironment) #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; @@ -256,22 +233,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; @@ -293,7 +259,6 @@ CSystem::CSystem(SharedEnvironmentInstance* pSharedEnvironment) m_bHasRenderedErrorMessage = false; - m_pDataProbe = nullptr; #if AZ_LEGACY_CRYSYSTEM_TRAIT_USE_MESSAGE_HANDLER RegisterWindowMessageHandler(this); #endif @@ -339,48 +304,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; } @@ -440,14 +372,7 @@ void CSystem::ShutDown() m_pSystemEventDispatcher->OnSystemEvent(ESYSTEM_EVENT_FULL_SHUTDOWN, 0, 0); } - 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) { @@ -464,31 +389,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; @@ -556,14 +463,6 @@ bool CSystem::IsQuitting() const return wasExitMainLoopRequested; } -////////////////////////////////////////////////////////////////////////// -void CSystem::SetIProcess(IProcess* process) -{ - m_pProcess = process; - //if (m_pProcess) - //m_pProcess->SetPMessage(""); -} - ////////////////////////////////////////////////////////////////////////// ISystem* CSystem::GetCrySystem() { @@ -659,7 +558,6 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode) AZ_TRACE_METHOD(); - m_nUpdateCounter++; #ifndef EXCLUDE_UPDATE_ON_CONSOLE if (m_pUserCallback) { @@ -952,13 +850,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) @@ -1035,22 +936,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) { @@ -1135,34 +1032,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) { @@ -1201,12 +1070,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) { @@ -1401,23 +1264,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) { @@ -1601,11 +1447,6 @@ bool CSystem::HandleMessage([[maybe_unused]] HWND hWnd, UINT uMsg, WPARAM wParam #endif -std::shared_ptr CSystem::CreateLocalFileIO() -{ - return std::make_shared(); -} - ILevelSystem* CSystem::GetILevelSystem() { return m_pLevelSystem; diff --git a/Code/Legacy/CrySystem/System.h b/Code/Legacy/CrySystem/System.h index d48b1797d3..664f5385fa 100644 --- a/Code/Legacy/CrySystem/System.h +++ b/Code/Legacy/CrySystem/System.h @@ -78,9 +78,6 @@ 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 ////////////////////////////////////////////////////////////////////////// @@ -98,30 +95,12 @@ namespace Audio struct IAudioSystem; struct IMusicSystem; } // namespace Audio -struct IDataProbe; #define PHSYICS_OBJECT_ENTITY 0 -#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; @@ -129,33 +108,16 @@ struct SSystemCVars int sys_dump_aux_threads; int sys_WER; int sys_dump_type; - int sys_ai; - int sys_entitysystem; int sys_trackview; 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; @@ -239,9 +201,8 @@ public: ////////////////////////////////////////////////////////////////////////// // 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; @@ -256,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; } //@} @@ -269,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. @@ -278,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; ////////////////////////////////////////////////////////////////////////// @@ -288,9 +245,6 @@ 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) @@ -300,7 +254,6 @@ public: #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; @@ -330,8 +283,6 @@ private: void CreateSystemVars(); void CreateAudioVars(); - void FreeLib(AZStd::unique_ptr& hLibModule); - void QueryVersionInfo(); void LogVersion(); void LogBuildInfo(); @@ -341,7 +292,6 @@ private: static void SystemVersionChanged(ICVar* pCVar); #endif // #ifndef _RELEASE - bool ReLaunchMediaCenter(); void UpdateAudioSystems(); void AddCVarGroupDirectory(const AZStd::string& sPath) override; @@ -357,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; } // ------------------------------------------------------------- @@ -373,47 +316,30 @@ 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; - 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. - - //! current active process - IProcess* m_pProcess; + 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; @@ -432,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; @@ -451,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) @@ -491,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 @@ -509,28 +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; // 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. diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp index c5039f57e9..f612972a1a 100644 --- a/Code/Legacy/CrySystem/SystemInit.cpp +++ b/Code/Legacy/CrySystem/SystemInit.cpp @@ -52,7 +52,6 @@ #include #include -#include #include #include #include @@ -77,7 +76,6 @@ #include #include #include -#include #include #include "XConsole.h" @@ -737,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) @@ -1095,11 +1103,6 @@ AZ_POP_DISABLE_WARNING InlineInitializationProcessing("CSystem::Init Level System"); - if (m_env.pLyShine) - { - m_env.pLyShine->PostInit(); - } - InlineInitializationProcessing("CSystem::Init InitLmbrAWS"); // Az to Cry console binding @@ -1193,18 +1196,6 @@ 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."); @@ -1220,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 @@ -1242,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 { @@ -1299,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" @@ -1318,55 +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"); - #if defined(AZ_RESTRICTED_PLATFORM) #define AZ_RESTRICTED_SECTION SYSTEMINIT_CPP_SECTION_17 #include AZ_RESTRICTED_FILE(SystemInit_cpp) @@ -1377,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, @@ -1420,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. @@ -1441,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, @@ -1457,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 @@ -1470,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" @@ -1513,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, diff --git a/Code/Legacy/CrySystem/SystemWin32.cpp b/Code/Legacy/CrySystem/SystemWin32.cpp index 2303ff286e..270cbbcb9f 100644 --- a/Code/Legacy/CrySystem/SystemWin32.cpp +++ b/Code/Legacy/CrySystem/SystemWin32.cpp @@ -383,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/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/Tools/AssetProcessor/assetprocessor_static_files.cmake b/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake index aa1d85d433..400a3f7ba5 100644 --- a/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake +++ b/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake @@ -92,8 +92,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 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/utilities/ApplicationManagerBase.cpp b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp index eb230ce336..499e5fe4f7 100644 --- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp @@ -1482,7 +1482,7 @@ bool ApplicationManagerBase::WaitForBuilderExit(AzFramework::ProcessWatcher* pro AZ::u32 exitCode = 0; bool finishedOK = false; QElapsedTimer ticker; - CommunicatorTracePrinter tracer(processWatcher->GetCommunicator(), "AssetBuilder"); + ProcessCommunicatorTracePrinter tracer(processWatcher->GetCommunicator(), "AssetBuilder"); ticker.start(); diff --git a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp index 751afc1a5d..aa462f7590 100644 --- a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp @@ -164,7 +164,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(); } diff --git a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.h b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.h index 657e4c7788..440f0b3709 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. @@ -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; }; diff --git a/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp index 1174e2500c..f6b7c07a91 100644 --- a/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp @@ -132,6 +132,12 @@ namespace AssetProcessor // 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); diff --git a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp index ae70ee7fe5..6bcd0dec01 100644 --- a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp @@ -1182,7 +1182,11 @@ namespace AssetUtilities } } + // 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; } 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/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/Resources/ProjectManager.qss b/Code/Tools/ProjectManager/Resources/ProjectManager.qss index 426f409581..1fc808b72c 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; } @@ -604,11 +609,6 @@ QProgressBar::chunk { stop: 0 #951D1F, stop: 1.0 #C92724); } -#gemCatalogDialogSubTitle { - font-size:14px; - font-weight:600; -} - /************** Filter Tag widget **************/ #FilterTagWidgetTextLabel { diff --git a/Code/Tools/ProjectManager/Source/ExternalLinkDialog.cpp b/Code/Tools/ProjectManager/Source/ExternalLinkDialog.cpp new file mode 100644 index 0000000000..122a5cbf5a --- /dev/null +++ b/Code/Tools/ProjectManager/Source/ExternalLinkDialog.cpp @@ -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 + * + */ + +#include +#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) + { + auto settingsRegistry = AZ::SettingsRegistry::Get(); + if (settingsRegistry) + { + QString settingsKey = GetExternalLinkWarningKey(); + settingsRegistry->Set(settingsKey.toStdString().c_str(), state); + SaveProjectManagerSettings(); + } + } +} // 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/GemCatalogScreen.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp index 1d4f354fb5..5bc0b26ca5 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp @@ -294,7 +294,7 @@ namespace O3DE::ProjectManager } else if (numChangedDependencies > 1) { - notification += tr("%1 Gem %2").arg(QString(numChangedDependencies), tr("dependencies")); + notification += tr("%1 Gem %2").arg(numChangedDependencies).arg(tr("dependencies")); } notification += (added ? tr(" activated") : tr(" deactivated")); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h index 5c1bc90c6e..23e95cf487 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h @@ -73,10 +73,10 @@ 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 diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.cpp index 1408e29b6d..679d9c576f 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.cpp @@ -31,7 +31,7 @@ namespace O3DE::ProjectManager // Body QLabel* subTitleLabel = new QLabel(tr("Are you sure you want to uninstall %1?").arg(gemName)); - subTitleLabel->setObjectName("gemCatalogDialogSubTitle"); + subTitleLabel->setObjectName("dialogSubTitle"); layout->addWidget(subTitleLabel); layout->addSpacing(10); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp index 82d205aab5..d973dd3749 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp @@ -32,7 +32,7 @@ namespace O3DE::ProjectManager // Body QLabel* subTitleLabel = new QLabel(tr("%1 to the latest version of %2?").arg( updateAvaliable ? tr("Update") : tr("Force update"), gemName)); - subTitleLabel->setObjectName("gemCatalogDialogSubTitle"); + subTitleLabel->setObjectName("dialogSubTitle"); layout->addWidget(subTitleLabel); layout->addSpacing(10); diff --git a/Code/Tools/ProjectManager/Source/LinkWidget.cpp b/Code/Tools/ProjectManager/Source/LinkWidget.cpp index 9c8c78ed37..f25e38db67 100644 --- a/Code/Tools/ProjectManager/Source/LinkWidget.cpp +++ b/Code/Tools/ProjectManager/Source/LinkWidget.cpp @@ -7,6 +7,11 @@ */ #include +#include +#include + +#include + #include #include #include @@ -26,7 +31,29 @@ 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; + auto settingsRegistry = AZ::SettingsRegistry::Get(); + + if (settingsRegistry) + { + QString settingsKey = GetExternalLinkWarningKey(); + settingsRegistry->Get(skipDialog, settingsKey.toStdString().c_str()); + } + + 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/ProjectButtonWidget.cpp b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp index 3225c14266..39980e1d11 100644 --- a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp @@ -28,6 +28,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -109,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); } } @@ -201,52 +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("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); }); - 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 ccb644c458..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; @@ -108,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/ProjectManagerSettings.cpp b/Code/Tools/ProjectManager/Source/ProjectManagerSettings.cpp index 3049a6d70c..66480aab3e 100644 --- a/Code/Tools/ProjectManager/Source/ProjectManagerSettings.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectManagerSettings.cpp @@ -6,7 +6,7 @@ * */ -#include "ProjectManagerSettings.h" +#include #include #include @@ -51,4 +51,9 @@ namespace O3DE::ProjectManager { return QString("%1/Projects/%2/BuiltSuccessfully").arg(ProjectManagerKeyPrefix).arg(projectName); } + + QString GetExternalLinkWarningKey() + { + return QString("%1/SkipExternalLinkWarning").arg(ProjectManagerKeyPrefix); + } } diff --git a/Code/Tools/ProjectManager/Source/ProjectManagerSettings.h b/Code/Tools/ProjectManager/Source/ProjectManagerSettings.h index 3454909062..93cfbc5ceb 100644 --- a/Code/Tools/ProjectManager/Source/ProjectManagerSettings.h +++ b/Code/Tools/ProjectManager/Source/ProjectManagerSettings.h @@ -18,4 +18,5 @@ namespace O3DE::ProjectManager void SaveProjectManagerSettings(); QString GetProjectBuiltSuccessfullyKey(const QString& projectName); + QString GetExternalLinkWarningKey(); } diff --git a/Code/Tools/ProjectManager/project_manager_files.cmake b/Code/Tools/ProjectManager/project_manager_files.cmake index 43c11edacc..468e8dcbc5 100644 --- a/Code/Tools/ProjectManager/project_manager_files.cmake +++ b/Code/Tools/ProjectManager/project_manager_files.cmake @@ -78,6 +78,8 @@ set(FILES 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 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/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/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/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/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/Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h 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/Include/Private/Authorization/AWSCognitoAuthorizationController.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.h 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/awsclientauth_files.cmake b/Gems/AWSClientAuth/Code/awsclientauth_files.cmake index 3b07b710e7..5de71210af 100644 --- a/Gems/AWSClientAuth/Code/awsclientauth_files.cmake +++ b/Gems/AWSClientAuth/Code/awsclientauth_files.cmake @@ -7,46 +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/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.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/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/ClientAuthAWSCredentials.cpp - Source/Authorization/AWSCognitoAuthorizationController.cpp - Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.cpp 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/AWSCore/Code/CMakeLists.txt b/Gems/AWSCore/Code/CMakeLists.txt index be7d975016..974f3f03bf 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 @@ -71,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 @@ -93,7 +93,7 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) awscore_editor_shared_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -112,7 +112,7 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) awscore_resourcemappingtool_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE Gem::AWSCore.Editor.Static @@ -156,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 @@ -190,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 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/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/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/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/Include/Private/Editor/UI/AWSCoreResourceMappingToolAction.h b/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreResourceMappingToolAction.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreResourceMappingToolAction.h rename to Gems/AWSCore/Code/Source/Editor/UI/AWSCoreResourceMappingToolAction.h diff --git a/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingConstants.h b/Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingConstants.h similarity index 100% rename from Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingConstants.h rename to Gems/AWSCore/Code/Source/ResourceMapping/AWSResourceMappingConstants.h 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/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/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/Public/MetricsAttribute.h b/Gems/AWSMetrics/Code/Include/MetricsAttribute.h similarity index 100% rename from Gems/AWSMetrics/Code/Include/Public/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/awsmetrics_files.cmake b/Gems/AWSMetrics/Code/awsmetrics_files.cmake index b1a3a647df..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/Public/MetricsAttribute.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/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/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/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/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/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..f6dfc0aab4 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,6 +67,8 @@ 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; }; @@ -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; } 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 83cf79ed61..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); @@ -53,8 +63,10 @@ float3 GetBackLighting(Surface surface, LightingData lightingData, float3 lightI float litRatio = 1.0 - shadowRatio; if (litRatio) { - result = TransmissionKernel(surface.transmission.thickness * transmissionParams.w, rcp(transmissionParams.xyz)) * - saturate(dot(-surface.normal, dirToLight)) * lightIntensity * 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..aecb89eb92 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 @@ -76,23 +76,23 @@ void ApplyDecal(uint currDecalIndex, inout Surface surface) { 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/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 3254b8e4ed..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); @@ -121,4 +121,3 @@ void ApplyIBL(Surface surface, inout LightingData lightingData) } } } - 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..a98221f60c 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 @@ -256,15 +256,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 +326,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 +376,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 +398,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. @@ -397,7 +454,7 @@ void LtcQuadEvaluate( // 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 +485,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 +570,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/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 3b8379e7fa..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 @@ -15,6 +15,7 @@ #include "BicubicPcfFilters.azsli" #include "Shadow.azsli" #include "NormalOffsetShadows.azsli" +#include "ESM.azsli" // ProjectedShadow calculates shadowed area projected from a light. class ProjectedShadow @@ -190,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) ); } @@ -229,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 { 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/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader index 56009d56ab..e7f4577c9a 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 e9893c96da..2565261d62 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 d195b08c34..a1db8345e4 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 47789d9b9b..2d4897e451 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/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/Code/Source/ImGui/ImGuiPass.cpp b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp index 0ff8d2c165..d3615bfaa9 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp @@ -68,6 +68,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 +104,6 @@ namespace AZ Init(); ImGui::NewFrame(); - TickBus::Handler::BusConnect(); AzFramework::InputChannelEventListener::Connect(); AzFramework::InputTextEventListener::Connect(); } @@ -127,7 +128,6 @@ namespace AZ AzFramework::InputTextEventListener::BusDisconnect(); AzFramework::InputChannelEventListener::BusDisconnect(); - TickBus::Handler::BusDisconnect(); } ImGuiContext* ImGuiPass::GetContext() @@ -140,14 +140,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,6 +460,7 @@ namespace AZ void ImGuiPass::Init() { + auto imguiContextScope = ImguiContextScope(m_imguiContext); auto& io = ImGui::GetIO(); // ImGui IO Setup @@ -421,7 +469,6 @@ namespace AZ { io.KeyMap[static_cast(i)] = static_cast(i); } - io.NavActive = true; // Touch input const AzFramework::InputDevice* inputDevice = nullptr; @@ -434,6 +481,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 +629,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/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp index c0b25697a3..298aefe8df 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp @@ -127,7 +127,7 @@ namespace AZ { 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(); 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/Source/RHI/Factory.cpp b/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp index 82b0a13c86..ce0f4ce44b 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,8 @@ 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"); #endif } @@ -202,6 +207,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/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/RHI/CommandList.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp index 1ee35c513a..07cf3bf8ad 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp @@ -97,7 +97,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 +107,7 @@ namespace AZ { FlushBarriers(); PIXEndEvent(); - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXEndEvent(GetCommandList()); } 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/RayTracingShaderTable.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp index 0a9ea63d2f..c84c440c92 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp @@ -86,7 +86,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/Scope.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp index cea072954a..b29018a2ac 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp @@ -311,7 +311,7 @@ namespace AZ PIXBeginEvent(0xFFFF00FF, GetId().GetCStr()); - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXBeginEvent(commandList.GetCommandList(), 0xFFFF00FF, GetId().GetCStr()); } @@ -428,7 +428,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/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/SwapChain.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp index 47c92d97fb..67f4834524 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/SwapChain.cpp @@ -483,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() @@ -496,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/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/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/Source/RPI.Public/Culling.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp index 07a62eba1f..9dd4cf99b1 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Culling.cpp @@ -283,7 +283,7 @@ namespace AZ const Scene& scene, View& view, Frustum& frustum, - void* maskedOcclusionCulling) + [[maybe_unused]]void* maskedOcclusionCulling) { AZStd::shared_ptr worklistData = AZStd::make_shared(); worklistData->m_debugCtx = &debugCtx; @@ -516,7 +516,7 @@ namespace AZ } #endif - void CullingScene::ProcessCullablesCommon(const Scene& scene, View& view, AZ::Frustum& frustum, void*& maskedOcclusionCulling) + void CullingScene::ProcessCullablesCommon(const Scene& scene, View& view, AZ::Frustum& frustum, [[maybe_unused]]void*& maskedOcclusionCulling) { AZ_PROFILE_SCOPE(RPI, "CullingScene::ProcessCullablesCommon() - %s", view.GetName().GetCStr()); 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..4a135ab6d6 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 --- 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 45838a5378..3393897936 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h @@ -116,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: diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp index 0f21dcb70e..ec365d7a6a 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp @@ -175,7 +175,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( diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp index 759f939382..505ff70122 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp @@ -146,11 +146,17 @@ namespace AtomToolsFramework if (auto existingScene = scene->FindSubsystem()) { m_viewportContext->SetRenderScene(*existingScene); - if (auto auxGeomFP = existingScene->get()->GetFeatureProcessor()) + + // 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()) { - m_auxGeom = auxGeomFP->GetOrCreateDrawQueueForView(m_defaultCamera.get()); + if (auto auxGeomFP = existingScene->get()->GetFeatureProcessor()) + { + m_auxGeom = auxGeomFP->GetOrCreateDrawQueueForView(m_defaultCamera.get()); + } + return; } - return; } AZ::RPI::ScenePtr atomScene; @@ -395,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 index 1a015c167c..7ae3175e03 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ViewportInteractionImpl.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ViewportInteractionImpl.cpp @@ -50,10 +50,7 @@ namespace AtomToolsFramework AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportInteractionImpl::ViewportScreenToWorldRay( const AzFramework::ScreenPoint& screenPosition) { - const AzFramework::CameraState cameraState = GetCameraState(); - const AZ::Vector3 rayOrigin = AzFramework::ScreenToWorld(screenPosition, cameraState); - const AZ::Vector3 rayDirection = (rayOrigin - cameraState.m_position).GetNormalized(); - return AzToolsFramework::ViewportInteraction::ProjectedViewportRay{ rayOrigin, rayDirection }; + return AzToolsFramework::ViewportInteraction::ViewportScreenToWorldRay(GetCameraState(), screenPosition); } float ViewportInteractionImpl::DeviceScalingFactor() 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/Utils/Code/Tests/PngFileTests.cpp b/Gems/Atom/Utils/Code/Tests/PngFileTests.cpp index 1c5b844204..b60939b39b 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"; 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/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/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp index 38679432ea..fa7a0cf2bf 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp @@ -73,7 +73,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) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp index 4c78a0afd7..4addbde3ef 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/OcclusionCullingPlane/OcclusionCullingPlaneComponentController.cpp @@ -59,12 +59,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/SharedPreview/SharedPreviewUtils.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.cpp index d0e288d239..7fbe374286 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.cpp @@ -22,9 +22,9 @@ namespace AZ { namespace SharedPreviewUtils { - AZStd::unordered_set GetSupportedAssetTypes() + AZStd::vector GetSupportedAssetTypes() { - return { RPI::AnyAsset::RTTI_Type(), RPI::MaterialAsset::RTTI_Type(), RPI::ModelAsset::RTTI_Type() }; + return { RPI::ModelAsset::RTTI_Type(), RPI::MaterialAsset::RTTI_Type(), RPI::AnyAsset::RTTI_Type() }; } bool IsSupportedAssetType(AzToolsFramework::Thumbnailer::SharedThumbnailKey key) @@ -46,11 +46,15 @@ namespace AZ foundIt, &AzToolsFramework::AssetSystemRequestBus::Events::GetAssetsProducedBySourceUUID, sourceKey->GetSourceUuid(), productsAssetInfo); - for (const auto& assetInfo : productsAssetInfo) + // 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) { - if (supportedTypeIds.find(assetInfo.m_assetType) != supportedTypeIds.end()) + for (const auto& assetInfo : productsAssetInfo) { - return assetInfo; + if (assetInfo.m_assetType == typeId) + { + return assetInfo; + } } } return AZ::Data::AssetInfo(); @@ -59,7 +63,8 @@ namespace AZ // if it's a product thumbnail key just return its assetId AZ::Data::AssetInfo assetInfo; auto productKey = azrtti_cast(key.data()); - if (productKey && supportedTypeIds.find(productKey->GetAssetType()) != supportedTypeIds.end()) + if (productKey && + AZStd::find(supportedTypeIds.begin(), supportedTypeIds.end(), productKey->GetAssetType()) != supportedTypeIds.end()) { AZ::Data::AssetCatalogRequestBus::BroadcastResult( assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, productKey->GetAssetId()); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h index 28c9809d6d..d215271936 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h @@ -21,7 +21,7 @@ namespace AZ namespace SharedPreviewUtils { //! 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); diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp index a6dc818fc5..421e5828b1 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp @@ -23,6 +23,7 @@ #include #include #include +#include namespace AZ::Render { @@ -45,6 +46,14 @@ 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()); @@ -212,6 +221,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) { @@ -227,18 +243,29 @@ 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); } 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); } @@ -251,6 +278,12 @@ namespace AZ::Render 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)); @@ -273,9 +306,17 @@ namespace AZ::Render 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, skeletonColor); - auxGeom->DrawSphere(nodeWorldPos, boneScale, skeletonColor); + auxGeom->DrawCylinder(centerWorldPos, boneDirection, boneScale, cylinderSize, renderColor); + auxGeom->DrawSphere(nodeWorldPos, boneScale, renderColor); } } @@ -597,6 +638,10 @@ namespace AZ::Render 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(); @@ -607,7 +652,6 @@ namespace AZ::Render 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_color = jointNameColor; m_drawParams.m_scale = AZ::Vector2(BaseFontSize); m_drawParams.m_hAlign = AzFramework::TextHorizontalAlignment::Right; m_drawParams.m_monospace = false; @@ -624,6 +668,14 @@ namespace AZ::Render 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()); } } @@ -640,6 +692,10 @@ namespace AZ::Render 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) { @@ -649,7 +705,12 @@ namespace AZ::Render static const float axisBoneScale = 50.0f; const float size = CalculateBoneScale(actorInstance, joint) * constPreScale * axisBoneScale; AZ::Transform worldTM = pose->GetWorldSpaceTransform(jointIndex).ToAZTransform(); - RenderLineAxis(debugDisplay, worldTM, size, false /*selected*/); + bool selected = false; + if (cachedSelectedJointIndices && cachedSelectedJointIndices->find(jointIndex) != cachedSelectedJointIndices->end()) + { + selected = true; + } + RenderLineAxis(debugDisplay, worldTM, size, selected); } } diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h index d3a6bc44f3..3c0258cfef 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h @@ -84,6 +84,7 @@ namespace AZ::Render 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; diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp index 396042c9f6..ef6ff4681a 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp @@ -128,6 +128,7 @@ namespace EMStudio m_groundEntity->CreateComponent(AZ::Render::MeshComponentTypeId); m_groundEntity->CreateComponent(AZ::Render::MaterialComponentTypeId); m_groundEntity->CreateComponent(azrtti_typeid()); + m_groundEntity->Init(); m_groundEntity->Activate(); Reinit(); diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.cpp index 7bb8d49418..0cf6dd70b3 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 @@ -109,6 +111,13 @@ namespace EMStudio cameraButton->setIcon(QIcon(":/EMotionFXAtom/Camera_category.svg")); addWidget(cameraButton); } + + LoadSettings(); + } + + AnimViewportToolBar::~AnimViewportToolBar() + { + SaveSettings(); } void AnimViewportToolBar::CreateViewOptionEntry( @@ -144,4 +153,23 @@ 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); + } + + 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 1443c54ee9..98b07f07dd 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.h +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.h @@ -22,9 +22,11 @@ namespace EMStudio { public: AnimViewportToolBar(QWidget* parent = nullptr); - ~AnimViewportToolBar() = default; + ~AnimViewportToolBar(); void SetRenderFlags(EMotionFX::ActorRenderFlagBitset renderFlags); + void LoadSettings(); + void SaveSettings(); private: void CreateViewOptionEntry( diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/synthetic_env.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/synthetic_env.py index 33ac6c6814..2d0685b67d 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/synthetic_env.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/synthetic_env.py @@ -508,7 +508,7 @@ def init_ly_pyside(env_dict=_SYNTH_ENV_DICT): site.addsitedir(str(QTFORPYTHON_PATH)) O3DE_BIN_PATH = Path.joinpath(O3DE_DEV, - 'windows_vs2019', + 'windows', 'bin', 'profile').resolve() os.environ["DYNACONF_O3DE_BIN_PATH"] = str(O3DE_BIN_PATH) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py index 5578bcd577..a9cf5e8ee5 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py @@ -532,7 +532,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, 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/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/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/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/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/QConnectionsWidget.cpp b/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp index 25981d2abd..ce7a49ae1e 100644 --- a/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp @@ -128,6 +128,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/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 9efbd1d881..992434ff79 100644 --- a/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp +++ b/Gems/AudioSystem/Code/Source/Engine/FileCacheManager.cpp @@ -819,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/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/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/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/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/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 50f3a1f73f..3078978d2c 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.cpp @@ -74,7 +74,7 @@ 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); @@ -131,7 +131,7 @@ 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(); 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 881604c7ff..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); @@ -195,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(); 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/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/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/RenderPlugin/RenderPlugin.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp index c74cb3cb0f..2c9e84c9b9 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 @@ -933,6 +933,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/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/emotionfx_files.cmake b/Gems/EMotionFX/Code/EMotionFX/emotionfx_files.cmake index 9947850471..8135f14f12 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 @@ -349,6 +350,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/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/GraphCanvas/Code/Source/GraphCanvas.cpp b/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp index dfcb106777..ebc15023cc 100644 --- a/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp +++ b/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp @@ -382,6 +382,9 @@ namespace GraphCanvas m_translationAssets.push_back(assetId); } }; + + m_translationAssets.clear(); + AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::EnumerateAssets, nullptr, collectAssetsCb, postEnumerateCb); } diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp index 1b01f7885d..01a661684a 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationBuilder.cpp @@ -30,16 +30,7 @@ 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()); } diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp index 80e488f3dc..754267b27d 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp @@ -15,39 +15,39 @@ namespace GraphCanvas 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 { - AZStd::string existingValue = translationFormat->m_database[finalKey.c_str()]; + 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 with value: %s (proposed: %s)", finalKey.c_str(), it.GetString(), existingValue.c_str(), it.GetString()); + const AZStd::string error = AZStd::string::format("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()); AZ_Error("TranslationSerializer", false, error.c_str()); } } 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; } } @@ -60,18 +60,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) { + itemKey = key; + // if there is a "base" member within the object, then use it, otherwise use the index - if (array[i].IsObject()) + 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 { @@ -79,9 +82,7 @@ namespace GraphCanvas } } - AddEntryToDatabase(itemKey, "", array[i], translationFormat); - - itemKey = key; + AddEntryToDatabase(itemKey, "", element, translationFormat); } } } @@ -114,42 +115,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_Error("TranslationDatabase", false, "Every entry in the Translation data must have a key: %s", contextStr.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("."); @@ -167,7 +158,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/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/ImGui/Code/Source/ImGuiManager.cpp b/Gems/ImGui/Code/Source/ImGuiManager.cpp index b30eda8825..f90aa60a88 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.cpp +++ b/Gems/ImGui/Code/Source/ImGuiManager.cpp @@ -172,7 +172,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 +226,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 +235,7 @@ void ImGui::ImGuiManager::SetDpiScalingFactor(float dpiScalingFactor) float ImGui::ImGuiManager::GetDpiScalingFactor() const { + ImGui::ImGuiContextScope contextScope(m_imguiContext); ImGuiIO& io = ImGui::GetIO(); return io.FontGlobalScale; } @@ -406,7 +407,7 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) // Cycle through ImGui Menu Bar States on Home button press if (inputChannelId == InputDeviceKeyboard::Key::NavigationHome) { - ToggleThroughImGuiVisibleState(-1); + ToggleThroughImGuiVisibleState(); } // Cycle through Standalone Editor Window States @@ -453,19 +454,10 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) } // Handle Controller Inputs - int inputControllerIndex = -1; - bool controllerInput = false; 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()) @@ -476,7 +468,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()) { @@ -488,7 +480,7 @@ bool ImGuiManager::OnInputChannelEventFiltered(const InputChannel& inputChannel) m_menuBarStatusChanged = false; } } - if (inputChannelId == InputDeviceGamepad::Button::R3) + if (inputChannelId == InputDeviceGamepad::Button::R1) { if (inputChannel.IsStateBegan()) { @@ -502,7 +494,7 @@ 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 @@ -627,14 +619,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. @@ -669,7 +660,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()) @@ -686,12 +676,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 6a4d4bc6f9..0d8a3e0edd 100644 --- a/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.cpp +++ b/Gems/ImGui/Code/Source/LYCommonMenu/ImGuiLYAssetExplorer.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -137,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 @@ -159,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); @@ -176,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 "); @@ -195,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); @@ -228,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(); } @@ -381,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(); @@ -404,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); @@ -443,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) { @@ -471,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) { @@ -489,7 +488,7 @@ namespace ImGui ImGui::TreePop(); // End Mesh Tree } - else + else { ImGuiUpdate_DrawMeshMouseOver(meshInstanceList); @@ -558,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()); @@ -589,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/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp index ce9eab5f7e..e58ea77373 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp @@ -104,6 +104,8 @@ #include #include +#include + namespace LandscapeCanvasEditor { static const int NODE_OFFSET_X_PIXELS = 350; @@ -201,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) { @@ -1303,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) @@ -1379,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; @@ -1401,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); } 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/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/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/Code/CMakeLists.txt b/Gems/LmbrCentral/Code/CMakeLists.txt index b047a9f65e..2df0bd0632 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 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/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/LmbrCentral.cpp b/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp index ad90c16f43..84ef11b35d 100644 --- a/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp +++ b/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp @@ -77,6 +77,7 @@ #include "Shape/CompoundShapeComponent.h" #include "Shape/SplineComponent.h" #include "Shape/PolygonPrismShapeComponent.h" +#include "Shape/ReferenceShapeComponent.h" namespace LmbrCentral { @@ -203,6 +204,7 @@ namespace LmbrCentral CapsuleShapeComponent::CreateDescriptor(), TubeShapeComponent::CreateDescriptor(), CompoundShapeComponent::CreateDescriptor(), + ReferenceShapeComponent::CreateDescriptor(), SplineComponent::CreateDescriptor(), PolygonPrismShapeComponent::CreateDescriptor(), NavigationSystemComponent::CreateDescriptor(), diff --git a/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp b/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp index 61b8c8f73d..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" @@ -73,6 +74,7 @@ namespace LmbrCentral EditorCylinderShapeComponent::CreateDescriptor(), EditorCapsuleShapeComponent::CreateDescriptor(), EditorCompoundShapeComponent::CreateDescriptor(), + EditorReferenceShapeComponent::CreateDescriptor(), EditorSplineComponent::CreateDescriptor(), EditorPolygonPrismShapeComponent::CreateDescriptor(), EditorCommentComponent::CreateDescriptor(), diff --git a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp similarity index 70% rename from Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp rename to Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp index 2fe8ae1e28..aca4fbc3b0 100644 --- a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp @@ -10,11 +10,12 @@ #include #include #include +#include -namespace Vegetation +namespace LmbrCentral { void EditorReferenceShapeComponent::Reflect(AZ::ReflectContext* context) { - ReflectSubClass(context, 1, &EditorVegetationComponentBaseVersionConverter); + ReflectSubClass(context, 1, &EditorWrappedComponentBaseVersionConverter); } } diff --git a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h similarity index 59% rename from Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h rename to Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h index d0f9bf1ea0..fd98809bcc 100644 --- a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h @@ -8,24 +8,24 @@ #pragma once -#include -#include +#include +#include -namespace Vegetation +namespace LmbrCentral { class EditorReferenceShapeComponent - : public EditorVegetationComponentBase + : public EditorWrappedComponentBase { public: - using BaseClassType = EditorVegetationComponentBase; + using BaseClassType = EditorWrappedComponentBase; 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_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/Vegetation.svg"; - static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/Vegetation.svg"; + 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 99% rename from Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp rename to Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp index 620e43457d..7ed79fe3a3 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) 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/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/include/LmbrCentral/Rendering/MeshAsset.h b/Gems/LmbrCentral/Code/include/LmbrCentral/Rendering/MeshAsset.h index 66e992890e..b4cefa8502 100644 --- a/Gems/LmbrCentral/Code/include/LmbrCentral/Rendering/MeshAsset.h +++ b/Gems/LmbrCentral/Code/include/LmbrCentral/Rendering/MeshAsset.h @@ -10,7 +10,6 @@ #include #include -#include namespace LmbrCentral { @@ -18,13 +17,8 @@ namespace LmbrCentral : 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/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h b/Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h similarity index 81% rename from Gems/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h rename to Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h index d6f517117b..2aec1a7614 100644 --- a/Gems/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h +++ b/Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h @@ -11,8 +11,11 @@ #include #include -namespace Vegetation +namespace LmbrCentral { + // Type ID for Reference EditorReferenceShapeComponent + static const char* EditorReferenceShapeComponentTypeId = "{21BC79CA-C2F4-428F-AF2E-B76E233D4254}"; + class ReferenceShapeRequests : public AZ::ComponentBus { diff --git a/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake index aea2f493c7..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 diff --git a/Gems/LmbrCentral/Code/lmbrcentral_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_files.cmake index 20a366b5f7..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,6 +87,8 @@ 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 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 index c0f1ffd9ec..97e5d87829 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake @@ -24,5 +24,6 @@ set(FILES Tests/SpawnerComponentTest.cpp Tests/SplineComponentTests.cpp Tests/DiskShapeTest.cpp + Tests/ReferenceShapeTests.cpp Source/LmbrCentral.cpp ) 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/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/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.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..0746a5213f 100644 --- a/Gems/LyShine/Code/Editor/ViewportWidget.cpp +++ b/Gems/LyShine/Code/Editor/ViewportWidget.cpp @@ -454,29 +454,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 +976,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 100% rename from Code/Legacy/CryCommon/LyShine/Animation/IUiAnimation.h rename to Gems/LyShine/Code/Include/LyShine/Animation/IUiAnimation.h 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/Code/Legacy/CryCommon/LyShine/IDraw2d.h b/Gems/LyShine/Code/Include/LyShine/IDraw2d.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/IDraw2d.h rename to Gems/LyShine/Code/Include/LyShine/IDraw2d.h 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/Code/Legacy/CryCommon/LyShine/IRenderGraph.h b/Gems/LyShine/Code/Include/LyShine/IRenderGraph.h similarity index 87% rename from Code/Legacy/CryCommon/LyShine/IRenderGraph.h rename to Gems/LyShine/Code/Include/LyShine/IRenderGraph.h index 716e0f7417..0e7c127677 100644 --- a/Code/Legacy/CryCommon/LyShine/IRenderGraph.h +++ b/Gems/LyShine/Code/Include/LyShine/IRenderGraph.h @@ -7,9 +7,8 @@ */ #pragma once -#include -#include #include +#include namespace AZ { @@ -42,10 +41,6 @@ namespace LyShine //! 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; @@ -53,7 +48,7 @@ namespace LyShine //! 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; + virtual LyShine::UiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) = 0; //---- Functions for supporting masking (used during creation of the graph, not rendering ) ---- diff --git a/Code/Legacy/CryCommon/LyShine/ISprite.h b/Gems/LyShine/Code/Include/LyShine/ISprite.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/ISprite.h rename to Gems/LyShine/Code/Include/LyShine/ISprite.h 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/UiAnimationSystem.cpp b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp index 13a4ddb425..c8818836d6 100644 --- a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp +++ b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp @@ -22,7 +22,6 @@ #include #include #include -#include ////////////////////////////////////////////////////////////////////////// namespace diff --git a/Gems/LyShine/Code/Source/Draw2d.cpp b/Gems/LyShine/Code/Source/Draw2d.cpp index 9a97f27592..f2c7c360d2 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; + }; } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -739,7 +747,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 }; @@ -804,7 +812,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 +865,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..d19bc3f92d 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() { 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/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..c7baf82fc0 100644 --- a/Gems/LyShine/Code/Source/RenderGraph.cpp +++ b/Gems/LyShine/Code/Source/RenderGraph.cpp @@ -154,7 +154,7 @@ namespace LyShine // [LYSHINE_ATOM_TODO][ATOM-15073] - need to 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 +163,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 +174,9 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - DynUiPrimitiveList& PrimitiveListRenderNode::GetPrimitives() const + LyShine::UiPrimitiveList& PrimitiveListRenderNode::GetPrimitives() const { - return const_cast(m_primitives); + return const_cast(m_primitives); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -198,7 +198,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 +222,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 +665,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 +698,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - void RenderGraph::AddPrimitiveAtom(DynUiPrimitive* primitive, const AZ::Data::Instance& texture, + void RenderGraph::AddPrimitiveAtom(LyShine::UiPrimitive* primitive, const AZ::Data::Instance& texture, bool isClampTextureMode, bool isTextureSRGB, bool isTexturePremultipliedAlpha, BlendMode blendMode) { AZStd::vector* renderNodeList = m_renderNodeListStack.top(); @@ -778,7 +771,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - void RenderGraph::AddAlphaMaskPrimitiveAtom(DynUiPrimitive* primitive, + void RenderGraph::AddAlphaMaskPrimitiveAtom(LyShine::UiPrimitive* primitive, AZ::Data::Instance contentAttachmentImage, AZ::Data::Instance maskAttachmentImage, bool isClampTextureMode, @@ -862,7 +855,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 +1147,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 +1331,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..36a9e63c5f 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,9 @@ 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 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; @@ -280,11 +276,11 @@ namespace LyShine // ~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, + void AddPrimitiveAtom(LyShine::UiPrimitive* 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 AddAlphaMaskPrimitiveAtom(LyShine::UiPrimitive* primitive, AZ::Data::Instance contentAttachmentImage, AZ::Data::Instance maskAttachmentImage, bool isClampTextureMode, @@ -333,8 +329,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 d9a0775cc1..65da7fa159 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 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..964ce1d0fa 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 diff --git a/Gems/LyShine/Code/Source/UiCanvasManager.cpp b/Gems/LyShine/Code/Source/UiCanvasManager.cpp index f2397248b6..d17b868bbc 100644 --- a/Gems/LyShine/Code/Source/UiCanvasManager.cpp +++ b/Gems/LyShine/Code/Source/UiCanvasManager.cpp @@ -12,7 +12,6 @@ #include "UiCanvasComponent.h" #include "UiGameEntityContext.h" -#include #include #include diff --git a/Gems/LyShine/Code/Source/UiFaderComponent.cpp b/Gems/LyShine/Code/Source/UiFaderComponent.cpp index cfca774612..62acbc30ef 100644 --- a/Gems/LyShine/Code/Source/UiFaderComponent.cpp +++ b/Gems/LyShine/Code/Source/UiFaderComponent.cpp @@ -503,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 }; @@ -602,7 +602,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) { 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/UiImageComponent.cpp b/Gems/LyShine/Code/Source/UiImageComponent.cpp index fac8a83c71..c47d4b6ea1 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) { @@ -463,7 +461,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) { @@ -1535,7 +1533,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 +1592,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 +1651,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 +1699,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 +1752,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 +1914,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 +1930,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 +1948,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 +1966,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 +2051,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 +2100,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 +2116,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 +2135,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 +2207,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 +2233,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 +2250,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 +2286,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 +2302,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..554a0383c1 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())); } @@ -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) { @@ -540,7 +540,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 +554,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 +570,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..ebe611d547 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 @@ -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 }; @@ -761,7 +760,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) { 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 25498fc316..e55b310e4a 100644 --- a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp +++ b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp @@ -833,7 +833,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)) { @@ -1845,7 +1845,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/UiTextComponent.cpp b/Gems/LyShine/Code/Source/UiTextComponent.cpp index ec17e93529..825f3869fd 100644 --- a/Gems/LyShine/Code/Source/UiTextComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextComponent.cpp @@ -1053,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 //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1823,7 +1840,7 @@ 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 @@ -4078,16 +4095,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(); @@ -4148,7 +4168,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()); @@ -4197,15 +4217,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(); 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 9a55a3feeb..0e65256b92 100644 --- a/Gems/LyShine/Code/Source/UiTextInputComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextInputComponent.cpp @@ -17,7 +17,6 @@ #include -#include #include #include #include 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/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/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..2c8cb3df49 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 @@ -371,7 +369,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/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/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp index 8f11985cba..0657b2306e 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,13 +242,21 @@ 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() @@ -286,7 +316,7 @@ namespace Multiplayer editorNetworkInterface->Listen(editorsv_port); // Launch the editor-server - m_serverProcess = LaunchEditorServer(); + LaunchEditorServer(); } else { @@ -393,4 +423,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/MultiplayerSystemComponent.h b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.h index d839407fb0..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 diff --git a/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp index 058517d5dc..c1e4d22b50 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp @@ -17,6 +17,12 @@ namespace Multiplayer void MultiplayerToolsSystemComponent::Reflect(AZ::ReflectContext* context) { + if (AZ::SerializeContext* serialize = azrtti_cast(context)) + { + serialize->Class() + ->Version(0); + } + NetworkPrefabProcessor::Reflect(context); } diff --git a/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h b/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h index c352dc2bbf..380a344f6d 100644 --- a/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h +++ b/Gems/Multiplayer/Code/Tests/CommonBenchmarkSetup.h @@ -198,7 +198,7 @@ namespace Multiplayer } }; - class BenchmarkNetworkEntityManager : public MockNetworkEntityManager + class BenchmarkNetworkEntityManager : public Multiplayer::INetworkEntityManager { public: BenchmarkNetworkEntityManager() : m_authorityTracker(*this) {} @@ -235,6 +235,54 @@ namespace Multiplayer return InvalidNetEntityId; } + 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 {}; + } + 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; NetworkEntityAuthorityTracker m_authorityTracker; MultiplayerComponentRegistry m_multiplayerComponentRegistry; diff --git a/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp b/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp index e5e75d88a3..b91b3e5bb9 100644 --- a/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp +++ b/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp @@ -27,10 +27,10 @@ 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); diff --git a/Gems/PhysX/Code/Editor/DebugDraw.cpp b/Gems/PhysX/Code/Editor/DebugDraw.cpp index 90a1eb6004..a54230ec38 100644 --- a/Gems/PhysX/Code/Editor/DebugDraw.cpp +++ b/Gems/PhysX/Code/Editor/DebugDraw.cpp @@ -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/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/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/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/Profiler/Code/Source/CpuProfilerImpl.h b/Gems/Profiler/Code/Source/CpuProfilerImpl.h index 6611fbd1e5..c97e45e69c 100644 --- a/Gems/Profiler/Code/Source/CpuProfilerImpl.h +++ b/Gems/Profiler/Code/Source/CpuProfilerImpl.h @@ -150,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..1cb13fe4ac 100644 --- a/Gems/Profiler/Code/Source/ImGuiCpuProfiler.cpp +++ b/Gems/Profiler/Code/Source/ImGuiCpuProfiler.cpp @@ -23,9 +23,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) @@ -435,6 +439,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 +454,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 +473,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) @@ -642,21 +653,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 +734,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/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 1d330c90df..2675855e4b 100644 --- a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp +++ b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp @@ -34,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/scene_api/actor_group.py b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/actor_group.py new file mode 100644 index 0000000000..dd9f1f8729 --- /dev/null +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/actor_group.py @@ -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 +""" + +import json +import uuid +import os, sys + +sys.path.append(os.path.dirname(__file__)) +import physics_data + +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) -> any: + jsonDOM = self.to_dict() + return json.dumps(jsonDOM, cls=RuleEncoder, indent=1) + +class RuleEncoder(json.JSONEncoder): + """ + A helper class to encode the Python classes with to a Python dictionary + + Methods + ------- + + encode(obj) + Converts contents to a Python dictionary for the JSONEncoder + + """ + 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) + +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 + """ + 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 = self.__dict__ + data['id'] = f"{{{str(self.id)}}}" + # rename 'typename' to '$type' + data['$type'] = self.typename + data.pop('typename') + return data + +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 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 = physics_data.CharacterColliderConfiguration() + self.ragdollConfig = physics_data.RagdollConfiguration() + self.clothConfig = physics_data.CharacterColliderConfiguration() + self.simulatedObjectColliderConfig = 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 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. + + Methods + ------- + + to_dict() + Converts contents to a Python dictionary + """ + 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 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 + +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 = '' 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..8dea8d8b3a --- /dev/null +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/physics_data.py @@ -0,0 +1,580 @@ +""" +Copyright (c) Contributors to the Open 3D Engine Project. +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..173558d784 100755 --- a/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/scene_data.py +++ b/Gems/PythonAssetBuilder/Editor/Scripts/scene_api/scene_data.py @@ -4,8 +4,11 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ -import azlmbr.scene as sceneApi +import typing import json +import azlmbr.scene as sceneApi +from enum import Enum, IntEnum + # Wraps the AZ.SceneAPI.Containers.SceneGraph.NodeIndex internal class class SceneGraphNodeIndex: @@ -24,6 +27,7 @@ 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: @@ -35,6 +39,7 @@ class SceneGraphName(): def get_name(self) -> str: return self.name.GetName() + # Wraps AZ.SceneAPI.Containers.SceneGraph class class SceneGraph(): def __init__(self, sceneGraphInstance) -> None: @@ -90,13 +95,26 @@ class SceneGraph(): def get_node_content(self, node): return self.sceneGraph.GetNodeContent(node) + +class PrimitiveShape(IntEnum): + BEST_FIT = 0 + SPHERE = 1 + BOX = 2 + CAPSULE = 3 + + +class DecompositionMode(IntEnum): + VOXEL = 0 + TETRAHEDRON = 1 + + # Contains a dictionary to contain and export AZ.SceneAPI.Containers.SceneManifest class SceneManifest(): def __init__(self): self.manifest = {'values': []} - def add_mesh_group(self, name) -> dict: - meshGroup = {} + def add_mesh_group(self, name: str) -> dict: + meshGroup = {} meshGroup['$type'] = '{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup' meshGroup['name'] = name meshGroup['nodeSelectionList'] = {'selectedNodes': [], 'unselectedNodes': []} @@ -104,7 +122,7 @@ class SceneManifest(): self.manifest['values'].append(meshGroup) return meshGroup - def add_prefab_group(self, name, id, json) -> dict: + def add_prefab_group(self, name: str, id: str, json: dict) -> dict: prefabGroup = {} prefabGroup['$type'] = '{99FE3C6F-5B55-4D8B-8013-2708010EC715} PrefabGroup' prefabGroup['name'] = name @@ -113,30 +131,401 @@ class SceneManifest(): self.manifest['values'].append(prefabGroup) return prefabGroup - def mesh_group_select_node(self, meshGroup, nodeName): - meshGroup['nodeSelectionList']['selectedNodes'].append(nodeName) + def mesh_group_select_node(self, mesh_group: dict, node_name: str) -> None: + mesh_group['nodeSelectionList']['selectedNodes'].append(node_name) - def mesh_group_unselect_node(self, meshGroup, nodeName): - meshGroup['nodeSelectionList']['unselectedNodes'].append(nodeName) + def mesh_group_unselect_node(self, mesh_group: dict, node_name: str) -> None: + mesh_group['nodeSelectionList']['unselectedNodes'].append(node_name) - 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 mesh_group_add_advanced_coordinate_system(self, mesh_group: dict, origin_node_name: str, translation: object, + rotation: object, scale: float) -> None: + origin_rule = { + '$type': 'CoordinateSystemRule', + 'useAdvancedData': True, + 'originNodeName': '' if origin_node_name is None else 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: + commentRule = { + '$type': 'CommentRule', + 'comment': comment + } + mesh_group['rules']['rules'].append(commentRule) + + 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: str, inverse_masses_channel: int, + motion_constraints_stream_name: str, motion_constraints_channel: int, + backstop_stream_name: str, backstop_offset_channel: int, + backstop_radius_channel: int) -> None: + """ + Adds a Cloth rule. 0 = Red, 1 = Green, 2 = Blue, 3 = Alpha + :param mesh_group: Mesh Group to add the cloth rule to + :param cloth_node_name: Name of the node that the rule applies to + :param inverse_masses_stream_name: Name of the color stream to use for inverse masses + :param inverse_masses_channel: Color channel (index) for inverse masses + :param motion_constraints_stream_name: Name of the color stream to use for motion constraints + :param motion_constraints_channel: Color channel (index) for motion constraints + :param backstop_stream_name: Name of the color stream to use for backstop + :param backstop_offset_channel: Color channel (index) for backstop offset value + :param backstop_radius_channel: Color chnanel (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'] = 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'] = motion_constraints_channel + cloth_rule['backstopStreamName'] = self.__default_or_value(backstop_stream_name, 'None') + if backstop_offset_channel is not None: + cloth_rule['backstopOffsetChannel'] = backstop_offset_channel + if backstop_radius_channel is not None: + cloth_rule['backstopRadiusChannel'] = 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 + :param mesh_group: Mesh Group to add the rule to + :return: 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 + :param lod_rule: LOD rule to add the LOD level to + :return: 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 + :param lod: LOD level to add the node to + :param 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 + :param lod: LOD rule to add the node to + :param 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, merge_meshes: bool, + use_custom_normals: bool, + vertex_color_stream: str) -> None: + """ + Adds an Advanced Mesh rule + :param mesh_group: Mesh Group to add the rule to + :param use_32bit_vertices: False = 16bit vertex position precision. True = 32bit vertex position precision + :param merge_meshes: Merge all meshes into a single mesh + :param use_custom_normals: True = use normals from DCC tool. False = average normals + :param vertex_color_stream: Color stream name to use for Vertex Coloring + """ + rule = { + '$type': 'StaticMeshAdvancedRule', + 'use32bitVertices': self.__default_or_value(use_32bit_vertices, False), + 'mergeMeshes': self.__default_or_value(merge_meshes, True), + 'useCustomNormals': self.__default_or_value(use_custom_normals, True) + } + + 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, weight_threshold: float) -> None: + """ + Adds a Skin rule + :param mesh_group: Mesh Group to add the rule to + :param max_weights_per_vertex: Max number of joints that can influence a vertex + :param weight_threshold: Weight values below this value will be treated as 0 + """ + rule = { + '$type': 'SkinRule', + 'maxWeightsPerVertex': self.__default_or_value(max_weights_per_vertex, 4), + 'weightThreshold': self.__default_or_value(weight_threshold, 0.001) + } + + mesh_group['rules']['rules'].append(rule) + + def mesh_group_add_tangent_rule(self, mesh_group: dict, tangent_space: int, tspace_method: int) -> None: + """ + Adds a Tangent rule to control tangent space generation + :param mesh_group: Mesh Group to add the rule to + :param tangent_space: Tangent space source. 0 = Scene, 1 = MikkT Tangent Generation + :param tspace_method: MikkT Generation method. 0 = TSpace, 1 = TSpaceBasic + """ + rule = { + '$type': 'TangentsRule', + 'tangentSpace': self.__default_or_value(tangent_space, 1), + 'tSpaceMethod': self.__default_or_value(tspace_method, 0) + } + + mesh_group['rules']['rules'].append(rule) + + def __add_physx_base_mesh_group(self, name: str, physics_material: typing.Optional[str]) -> 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. + + :param name: Name of the mesh group. + :param merge_meshes: When true, all selected nodes will be merged into a single collision mesh. + :param weld_vertices: When true, mesh welding is performed. Clean mesh must be enabled. + :param disable_clean_mesh: When true, mesh cleaning is disabled. This makes cooking faster. + :param force_32bit_indices: When true, 32-bit indices will always be created regardless of triangle count. + :param 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. + :param build_triangle_adjacencies: When true, the triangle adjacency information is created. + :param 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. + :param 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. + :param physics_material: Configure which physics material to use. + :return: 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. + + :param name: Name of the mesh group. + :param 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. + :param 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. + :param use_16bit_indices: Denotes the use of 16-bit vertex indices in Convex triangles or polygons. + :param 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. + :param quantize_input: Quantizes the input vertices using the k-means clustering. + :param 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. + :param shift_vertices: Convex hull input vertices are shifted to be around origin to provide better + computation stability + :param 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. + :param 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. + :param physics_material: Configure which physics material to use. + :return: 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 + + :param name: Name of the mesh group. + :param 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. + :param 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. + :param physics_material: Configure which physics material to use. + :return: 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. + + :param mesh_group: Mesh group to configure decomposition for. + :param max_convex_hulls: Controls the maximum number of hulls to generate. + :param max_num_vertices_per_convex_hull: Controls the maximum number of triangles per convex hull. + :param concavity: Maximum concavity of each approximate convex hull. + :param resolution: Maximum number of voxels generated during the voxelization stage. + :param mode: Select voxel-based approximate convex decomposition or tetrahedron-based + approximate convex decomposition. + :param alpha: Controls the bias toward clipping along symmetry planes. + :param beta: Controls the bias toward clipping along revolution axes. + :param min_volume_per_convex_hull: Controls the adaptive sampling of the generated convex hulls. + :param plane_downsampling: Controls the granularity of the search for the best clipping plane. + :param convex_hull_downsampling: Controls the precision of the convex hull generation process + during the clipping plane selection stage. + :param pca: Enable or disable normalizing the mesh before applying the convex decomposition. + :param 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 + + :param mesh_group: Mesh group to add to. + :param 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 + + :param mesh_group: Mesh group to add to. + :param 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 + + :param mesh_group: Mesh group to add to. + :param selected: List of node paths to add to the selected list. + :param 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 + + :param mesh_group: Mesh group to add the rule to. + :param 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/QtForPython/Code/Source/Platform/Linux/InitializeEmbeddedPyside2.h b/Gems/QtForPython/Code/Source/Platform/Linux/InitializeEmbeddedPyside2.h index 094a4f8548..dfdf2a66dc 100644 --- a/Gems/QtForPython/Code/Source/Platform/Linux/InitializeEmbeddedPyside2.h +++ b/Gems/QtForPython/Code/Source/Platform/Linux/InitializeEmbeddedPyside2.h @@ -15,6 +15,7 @@ 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 { @@ -24,9 +25,11 @@ namespace QtForPython 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); @@ -56,5 +59,6 @@ namespace QtForPython void* m_libPythonLibraryFile; void* m_libPyside2LibraryFile; void* m_libShibokenLibraryFile; + void* m_libQt5TestLibraryFile; }; } // namespace QtForPython 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/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/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/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/Entity Transform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity Transform.names deleted file mode 100644 index 389c88d709..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity Transform.names +++ /dev/null @@ -1,45 +0,0 @@ -{ - "entries": [ - { - "base": "Entity Transform", - "context": "BehaviorClass", - "variant": "", - "details": { - "name": "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": "Entity Transform::Rotate", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "const EntityId&", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "const Vector3&" - } - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialData.names index c7e5b5814d..9f6af426d0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialData.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialData.names @@ -5,8 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Material Data", - "category": "Rendering" + "name": "Material Data" }, "methods": [ { @@ -433,6 +432,7 @@ }, { "base": "GetNormal", + "context": "Getter", "details": { "name": "Get Normal" }, @@ -440,13 +440,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Normal" } } ] }, { "base": "GetDiffuse", + "context": "Getter", "details": { "name": "Get Diffuse" }, @@ -454,13 +455,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Diffuse" } } ] }, { "base": "GetSpecular", + "context": "Getter", "details": { "name": "Get Specular" }, @@ -468,13 +470,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Specular" } } ] }, { "base": "GetBump", + "context": "Getter", "details": { "name": "Get Bump" }, @@ -482,13 +485,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Bump" } } ] }, { "base": "GetEmissive", + "context": "Getter", "details": { "name": "Get Emissive" }, @@ -496,13 +500,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Emissive" } } ] }, { "base": "GetRoughness", + "context": "Getter", "details": { "name": "Get Roughness" }, @@ -510,13 +515,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Roughness" } } ] }, { "base": "GetBaseColor", + "context": "Getter", "details": { "name": "Get Base Color" }, @@ -524,13 +530,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Base Color" } } ] }, { "base": "GetAmbientOcclusion", + "context": "Getter", "details": { "name": "Get Ambient Occlusion" }, @@ -538,13 +545,14 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Ambient Occlusion" } } ] }, { "base": "GetMetallic", + "context": "Getter", "details": { "name": "Get Metallic" }, @@ -552,7 +560,7 @@ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Metallic" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names index 4b529d8dda..bfa6c885cb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Matrix3x4" + "name": "Matrix 3x 4" }, "methods": [ { @@ -13,21 +13,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateZero" + "tooltip": "When signaled, this will invoke Create Zero" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateZero is invoked" + "tooltip": "Signaled after Create Zero is invoked" }, "details": { - "name": "Create Zero", - "tooltip": "Creates a Matrix3x4 with all values zero" + "name": "Create Zero" }, "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -44,14 +43,13 @@ "tooltip": "Signaled after Set Rotation Part From Quaternion is invoked" }, "details": { - "name": "Set Rotation Part From Quaternion", - "tooltip": "Sets the 3x3 part of the matrix from a quaternion" + "name": "Set Rotation Part From Quaternion" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { @@ -74,32 +72,25 @@ "tooltip": "Signaled after Create From Columns is invoked" }, "details": { - "name": "Create From Columns", - "tooltip": "Constructs from individual columns" + "name": "Create From Columns" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 1" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 2" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 3" - } - }, - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Column 4" + "name": "Vector 3" } } ], @@ -107,7 +98,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -124,26 +115,19 @@ "tooltip": "Signaled after Is Close is invoked" }, "details": { - "name": "Is Close", - "tooltip": "Tests element-wise whether this matrix is close to another matrix, within the specified tolerance" + "name": "Is Close" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "A" - } - }, - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "B" + "name": "Matrix 3x 4" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Tolerance" + "name": "float" } } ], @@ -151,7 +135,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Is Close" + "name": "bool" } } ] @@ -168,20 +152,13 @@ "tooltip": "Signaled after Is Orthogonal is invoked" }, "details": { - "name": "Is Orthogonal", - "tooltip": "Tests if the 3x3 part of the matrix is orthogonal" + "name": "Is Orthogonal" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Tolerance" + "name": "float" } } ], @@ -189,7 +166,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Is Orthogonal" + "name": "bool" } } ] @@ -206,14 +183,13 @@ "tooltip": "Signaled after Orthogonalize is invoked" }, "details": { - "name": "Orthogonalize", - "tooltip": "Modifies the basis vectors of the matrix to be orthogonal and unit length" + "name": "Orthogonalize" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } } ] @@ -223,29 +199,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Create From Matrix3x3" + "tooltip": "When signaled, this will invoke Create From Matrix 3x 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Create From Matrix3x3 is invoked" + "tooltip": "Signaled after Create From Matrix 3x 3 is invoked" }, "details": { - "name": "Create From Matrix3x3", - "tooltip": "Constructs from a Matrix3x3, with translation set to zero" + "name": "Create From Matrix 3x 3" }, - "params": [ - { - "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", - "details": { - "name": "Matrix3x3" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -262,22 +229,13 @@ "tooltip": "Signaled after Retrieve Scale is invoked" }, "details": { - "name": "Retrieve Scale", - "tooltip": "Gets the scale part of the transformation (the length of the basis vectors)" + "name": "Retrieve Scale" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Scale" + "name": "Vector 3" } } ] @@ -287,29 +245,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Create Rotation X" + "tooltip": "When signaled, this will invoke Create RotationX" }, "exit": { "name": "Out", - "tooltip": "Signaled after Create Rotation X is invoked" + "tooltip": "Signaled after Create RotationX is invoked" }, "details": { - "name": "Create Rotation X", - "tooltip": "Sets the matrix to be a rotation around the X-axis, specified in radians" + "name": "Create RotationX" }, - "params": [ - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Angle (Radians)" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -319,26 +268,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Create From Matrix3x3 And Translation" + "tooltip": "When signaled, this will invoke Create From Matrix 3x 3 And Translation" }, "exit": { "name": "Out", - "tooltip": "Signaled after Create From Matrix3x3 And Translation is invoked" + "tooltip": "Signaled after Create From Matrix 3x 3 And Translation is invoked" }, "details": { - "name": "Create From Matrix3x3 And Translation" + "name": "Create From Matrix 3x 3 And Translation" }, "params": [ - { - "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", - "details": { - "name": "Matrix3x3" - } - }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ], @@ -346,7 +289,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -356,28 +299,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ToString" + "tooltip": "When signaled, this will invoke To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after ToString is invoked" + "tooltip": "Signaled after To String is invoked" }, "details": { "name": "To String" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "String" + "name": "AZ Std::basic_string, allocator>" } } ] @@ -394,22 +329,13 @@ "tooltip": "Signaled after Extract Scale is invoked" }, "details": { - "name": "Extract Scale", - "tooltip": "Gets the scale part of the transformation as in RetrieveScale, and also removes this scaling from the matrix" + "name": "Extract Scale" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Scale" + "name": "Vector 3" } } ] @@ -428,19 +354,11 @@ "details": { "name": "Get Transpose" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Transpose" + "name": "Matrix 3x 4" } } ] @@ -457,14 +375,13 @@ "tooltip": "Signaled after Invert Fast is invoked" }, "details": { - "name": "Invert Fast", - "tooltip": "Inverts the transformation represented by the matrix, assuming the 3x3 part is orthogonal" + "name": "Invert Fast" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Inverted" + "name": "Matrix 3x 4" } } ] @@ -481,26 +398,19 @@ "tooltip": "Signaled after Create From Rows is invoked" }, "details": { - "name": "Create From Rows", - "tooltip": "Constructs from individual rows" + "name": "Create From Rows" }, "params": [ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 1" + "name": "Vector 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 2" - } - }, - { - "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", - "details": { - "name": "Row 3" + "name": "Vector 4" } } ], @@ -508,7 +418,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -525,22 +435,13 @@ "tooltip": "Signaled after Create Translation is invoked" }, "details": { - "name": "Create Translation", - "tooltip": "Sets the matrix to be a translation matrix, with 3x3 part set to the identity" + "name": "Create Translation" }, - "params": [ - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Translation" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -550,29 +451,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTranspose3x3" + "tooltip": "When signaled, this will invoke Get Transpose 3x 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTranspose3x3 is invoked" + "tooltip": "Signaled after Get Transpose 3x 3 is invoked" }, "details": { - "name": "Get Transpose 3x3", - "tooltip": "Gets the matrix obtained by transposing the 3x3 part of the matrix, leaving the translation untouched" + "name": "Get Transpose 3x 3" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Transpose" + "name": "Matrix 3x 4" } } ] @@ -589,26 +481,25 @@ "tooltip": "Signaled after Set Column is invoked" }, "details": { - "name": "Set Column", - "tooltip": "Sets the specified column" + "name": "Set Column" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Column Index" + "name": "int" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Vector 3" } } ] @@ -625,20 +516,13 @@ "tooltip": "Signaled after Get Row is invoked" }, "details": { - "name": "Get Row", - "tooltip": "Gets the specified row" + "name": "Get Row" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Row Index" + "name": "int" } } ], @@ -646,7 +530,7 @@ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Vector 4" } } ] @@ -656,29 +540,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetInverseFast" + "tooltip": "When signaled, this will invoke Get Inverse Fast" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetInverseFast is invoked" + "tooltip": "Signaled after Get Inverse Fast is invoked" }, "details": { - "name": "GetInverseFast", - "tooltip": "Gets the inverse of the transformation represented by the matrix.\nThis function works for any matrix, even if they have scaling or skew.\nIf the 3x3 part of the matrix is orthogonal then \ref GetInverseFast is much faster" + "name": "Get Inverse Fast" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Inverse" + "name": "Matrix 3x 4" } } ] @@ -695,23 +570,13 @@ "tooltip": "Signaled after Get Orthogonalized is invoked" }, "details": { - "name": "Get Orthogonalized", - "tooltip": "Returns an orthogonal matrix based on this matrix" - + "name": "Get Orthogonalized" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Orthogonalized" + "name": "Matrix 3x 4" } } ] @@ -721,27 +586,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Multiply3x3" + "tooltip": "When signaled, this will invoke Multiply 3x 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Multiply3x3 is invoked" + "tooltip": "Signaled after Multiply 3x 3 is invoked" }, "details": { - "name": "Multiply 3x3", - "tooltip": "Post-multiplies the matrix by a vector, using only the 3x3 part of the matrix" + "name": "Multiply 3x 3" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Vector 3" } } ], @@ -749,7 +607,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Result" + "name": "Vector 3" } } ] @@ -766,22 +624,13 @@ "tooltip": "Signaled after Is Finite is invoked" }, "details": { - "name": "Is Finite", - "tooltip": "Checks whether the elements of the matrix are all finite" + "name": "Is Finite" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Is Finite" + "name": "bool" } } ] @@ -798,22 +647,13 @@ "tooltip": "Signaled after Create From Quaternion is invoked" }, "details": { - "name": "Create From Quaternion", - "tooltip": "Sets the matrix from a quaternion, with translation set to zero" + "name": "Create From Quaternion" }, - "params": [ - { - "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", - "details": { - "name": "Quaternion" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -830,38 +670,37 @@ "tooltip": "Signaled after Set Basis And Translation is invoked" }, "details": { - "name": "Set Basis And Translation", - "tooltip": "Sets the three basis vectors and the translation" + "name": "Set Basis And Translation" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis X" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Y" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Z" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ] @@ -871,27 +710,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Multiply Vector4" + "tooltip": "When signaled, this will invoke Multiply Vector 4" }, "exit": { "name": "Out", - "tooltip": "Signaled after Multiply Vector4 is invoked" + "tooltip": "Signaled after Multiply Vector 4 is invoked" }, "details": { - "name": "Multiply Vector4", - "tooltip": "Operator for transforming a Vector4" + "name": "Multiply Vector 4" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Vector 4" } } ], @@ -899,7 +731,7 @@ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Result" + "name": "Vector 4" } } ] @@ -916,22 +748,13 @@ "tooltip": "Signaled after Create Scale is invoked" }, "details": { - "name": "Create Scale", - "tooltip": "Sets the matrix to be a scale matrix, with translation set to zero" + "name": "Create Scale" }, - "params": [ - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Scale" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -948,22 +771,13 @@ "tooltip": "Signaled after Create Diagonal is invoked" }, "details": { - "name": "Create Diagonal", - "tooltip": "Sets the matrix to be a diagonal matrix, with translation set to zero" + "name": "Create Diagonal" }, - "params": [ - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Diagonal" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -980,22 +794,13 @@ "tooltip": "Signaled after Get Translation is invoked" }, "details": { - "name": "Get Translation", - "tooltip": "Gets the translation" + "name": "Get Translation" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ] @@ -1012,14 +817,13 @@ "tooltip": "Signaled after Invert Full is invoked" }, "details": { - "name": "Invert Full", - "tooltip": "Inverts the transformation represented by the matrix\nThis function works for any matrix, even if they have scaling or skew\nIf the 3x3 part of the matrix is orthogonal then \ref InvertFast is much faster" + "name": "Invert Full" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Inverted" + "name": "Matrix 3x 4" } } ] @@ -1036,38 +840,37 @@ "tooltip": "Signaled after Set Columns is invoked" }, "details": { - "name": "Set Columns", - "tooltip": "Sets all the columns of the matrix" + "name": "Set Columns" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 1" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 2" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 3" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 4" + "name": "Vector 3" } } ] @@ -1084,32 +887,31 @@ "tooltip": "Signaled after Set Element is invoked" }, "details": { - "name": "Set Element", - "tooltip": "Sets the element in the specified row and column\nAccessing individual elements can be slower than working with entire rows" + "name": "Set Element" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Row" + "name": "int" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Column" + "name": "int" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Value" + "name": "float" } } ] @@ -1126,20 +928,13 @@ "tooltip": "Signaled after Equal is invoked" }, "details": { - "name": "Equal", - "tooltip": "Compares if two Matrix3x4 are equal" + "name": "Equal" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "A" - } - }, - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "B" + "name": "Matrix 3x 4" } } ], @@ -1147,7 +942,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Equal" + "name": "bool" } } ] @@ -1157,29 +952,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Determinant 3x3" + "tooltip": "When signaled, this will invoke Get Determinant 3x 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Determinant 3x3 is invoked" + "tooltip": "Signaled after Get Determinant 3x 3 is invoked" }, "details": { - "name": "Get Determinant 3x3", - "tooltip": "Calculates the determinant of the 3x3 part of the matrix" + "name": "Get Determinant 3x 3" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Determinant" + "name": "float" } } ] @@ -1196,38 +982,37 @@ "tooltip": "Signaled after Get Columns is invoked" }, "details": { - "name": "Get Columns", - "tooltip": "Gets all the columns of the matrix" + "name": "Get Columns" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 1" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 2" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 3" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column 4" + "name": "Vector 3" } } ] @@ -1237,39 +1022,38 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetRows" + "tooltip": "When signaled, this will invoke Set Rows" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetRows is invoked" + "tooltip": "Signaled after Set Rows is invoked" }, "details": { - "name": "SetRows", - "tooltip": "Sets all rows of the matrix" + "name": "Set Rows" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 1" + "name": "Vector 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 2" + "name": "Vector 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 3" + "name": "Vector 4" } } ] @@ -1286,20 +1070,13 @@ "tooltip": "Signaled after Get Multiplied By Scale is invoked" }, "details": { - "name": "Get Multiplied By Scale", - "tooltip": "Gets a copy of the Matrix3x4 and multiplies it by the specified scale" + "name": "Get Multiplied By Scale" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Scale" + "name": "Vector 3" } } ], @@ -1307,7 +1084,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1317,29 +1094,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Create Rotation Z" + "tooltip": "When signaled, this will invoke Create RotationZ" }, "exit": { "name": "Out", - "tooltip": "Signaled after Create Rotation Z is invoked" + "tooltip": "Signaled after Create RotationZ is invoked" }, "details": { - "name": "CreateRotationZ", - "tooltip": "Sets the matrix to be a rotation around the Z-axis, specified in radians" + "name": "Create RotationZ" }, - "params": [ - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Angle (Radians)" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1356,20 +1124,13 @@ "tooltip": "Signaled after Create From Quaternion And Translation is invoked" }, "details": { - "name": "Create From Quaternion And Translation", - "tooltip": "Sets the matrix from a quaternion and a translation" + "name": "Create From Quaternion And Translation" }, "params": [ - { - "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", - "details": { - "name": "Quaternion" - } - }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ], @@ -1377,7 +1138,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1387,27 +1148,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Row As Vector3" + "tooltip": "When signaled, this will invoke Get Row As Vector 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Row As Vector3 is invoked" + "tooltip": "Signaled after Get Row As Vector 3 is invoked" }, "details": { - "name": "Get Row As Vector3", - "tooltip": "Gets the specified row as a Vector3" + "name": "Get Row As Vector 3" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Row" + "name": "int" } } ], @@ -1415,7 +1169,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Result" + "name": "Vector 3" } } ] @@ -1425,27 +1179,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Multiply Matrix3x4" + "tooltip": "When signaled, this will invoke Multiply Matrix 3x 4" }, "exit": { "name": "Out", - "tooltip": "Signaled after Multiply Matrix3x4 is invoked" + "tooltip": "Signaled after Multiply Matrix 3x 4 is invoked" }, "details": { - "name": "Multiply Matrix3x4", - "tooltip": "Operator for matrix-matrix multiplication" + "name": "Multiply Matrix 3x 4" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" - } - }, - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Multiplicand" + "name": "Matrix 3x 4" } } ], @@ -1453,7 +1200,30 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "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" } } ] @@ -1470,32 +1240,31 @@ "tooltip": "Signaled after Get Rows is invoked" }, "details": { - "name": "GetRows", - "tooltip": "Gets all rows of the matrix" + "name": "Get Rows" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 1" + "name": "Vector 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 2" + "name": "Vector 4" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Row 3" + "name": "Vector 4" } } ] @@ -1512,22 +1281,13 @@ "tooltip": "Signaled after Clone is invoked" }, "details": { - "name": "Clone", - "tooltip": "Returns a deep copy of the provided Matrix3x4" + "name": "Clone" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Clone" + "name": "Matrix 3x 4" } } ] @@ -1537,27 +1297,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Multiply Vector3" + "tooltip": "When signaled, this will invoke Multiply Vector 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Multiply Vector3 is invoked" + "tooltip": "Signaled after Multiply Vector 3 is invoked" }, "details": { - "name": "Multiply Vector3", - "tooltip": "perator for transforming a Vector3" + "name": "Multiply Vector 3" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Vector 3" } } ], @@ -1565,7 +1318,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Result" + "name": "Vector 3" } } ] @@ -1582,14 +1335,13 @@ "tooltip": "Signaled after Create Identity is invoked" }, "details": { - "name": "Create Identity", - "tooltip": "Creates an identity Matrix3x4" + "name": "Create Identity" }, "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1599,45 +1351,44 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetBasisAndTranslation" + "tooltip": "When signaled, this will invoke Get Basis And Translation" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetBasisAndTranslation is invoked" + "tooltip": "Signaled after Get Basis And Translation is invoked" }, "details": { - "name": "GetBasisAndTranslation", - "tooltip": "Gets the three basis vectors and the translation" + "name": "Get Basis And Translation" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis X" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Y" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Basis Z" + "name": "Vector 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "name": "Vector 3" } } ] @@ -1654,22 +1405,13 @@ "tooltip": "Signaled after Create From Value is invoked" }, "details": { - "name": "Create From Value", - "tooltip": "Constructs a matrix with all components set to the specified value" + "name": "Create From Value" }, - "params": [ - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Value" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1686,26 +1428,19 @@ "tooltip": "Signaled after Get Element is invoked" }, "details": { - "name": "Get Element", - "tooltip": "Gets the element in the specified row and column\nAccessing individual elements can be slower than working with entire rows" + "name": "Get Element" }, "params": [ { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Source" + "name": "int" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Row" - } - }, - { - "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", - "details": { - "name": "Column" + "name": "int" } } ], @@ -1713,7 +1448,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Value" + "name": "float" } } ] @@ -1723,21 +1458,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Transpose 3x3" + "tooltip": "When signaled, this will invoke Transpose 3x 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Transpose 3x3 is invoked" + "tooltip": "Signaled after Transpose 3x 3 is invoked" }, "details": { - "name": "Transpose 3x3", - "tooltip": "Gets the matrix obtained by transposing the 3x3 part of the matrix, leaving the translation untouched" + "name": "Transpose 3x 3" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } } ] @@ -1754,14 +1488,13 @@ "tooltip": "Signaled after Transpose is invoked" }, "details": { - "name": "Transpose", - "tooltip": "Transposes the 3x3 part of the matrix, and sets the translation part to zero" + "name": "Transpose" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } } ] @@ -1771,29 +1504,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Create Rotation Y" + "tooltip": "When signaled, this will invoke Create RotationY" }, "exit": { "name": "Out", - "tooltip": "Signaled after Create Rotation Y is invoked" + "tooltip": "Signaled after Create RotationY is invoked" }, "details": { - "name": "Create Rotation Y", - "tooltip": "Sets the matrix to be a rotation around the Y-axis, specified in radians" + "name": "Create RotationY" }, - "params": [ - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Angle (Radians)" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1803,33 +1527,32 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetRow" + "tooltip": "When signaled, this will invoke Set Row" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetRow is invoked" + "tooltip": "Signaled after Set Row is invoked" }, "details": { - "name": "Set Row", - "tooltip": "Sets the specified row" + "name": "Set Row" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Row Index" + "name": "int" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Vector 4" } } ] @@ -1846,22 +1569,13 @@ "tooltip": "Signaled after Get Inverse Full is invoked" }, "details": { - "name": "Get Inverse Full", - "tooltip": "Gets the inverse of the transformation represented by the matrix\nThis function works for any matrix, even if they have scaling or skew\nIf the 3x3 part of the matrix is orthogonal then \ref GetInverseFast is much faster" + "name": "Get Inverse Full" }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Result" + "name": "Matrix 3x 4" } } ] @@ -1878,20 +1592,13 @@ "tooltip": "Signaled after Get Column is invoked" }, "details": { - "name": "Get Column", - "tooltip": "Gets the specified column" + "name": "Get Column" }, "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Column Index" + "name": "int" } } ], @@ -1899,7 +1606,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Column" + "name": "Vector 3" } } ] @@ -1915,183 +1622,6 @@ "name": "Out", "tooltip": "Signaled after Set Translation is invoked" }, - "details": { - "name": "Set Translation", - "tooltip": "Sets the translation" - }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Translation" - } - } - ] - }, - { - "base": "basisX", - "context": "Getter", - "details": { - "name": "Get Basis X" - }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], - "results": [ - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Basis X" - } - } - ] - }, - { - "base": "basisX", - "context": "Setter", - "details": { - "name": "Set Basis X" - }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Basis X" - } - } - ] - }, - { - "base": "basisY", - "context": "Getter", - "details": { - "name": "Get Basis Y" - }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], - "results": [ - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Basis Y" - } - } - ] - }, - { - "base": "basisY", - "context": "Setter", - "details": { - "name": "Set Basis Y" - }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Basis Y" - } - } - ] - }, - { - "base": "basisZ", - "context": "Getter", - "details": { - "name": "Get Basis Z" - }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], - "results": [ - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Basis Z" - } - } - ] - }, - { - "base": "basisZ", - "context": "Setter", - "details": { - "name": "Set Basis Z" - }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - }, - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Basis Z" - } - } - ] - }, - { - "base": "translation", - "context": "Getter", - "details": { - "name": "Get Translation" - }, - "params": [ - { - "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", - "details": { - "name": "Source" - } - } - ], - "results": [ - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Translation" - } - } - ] - }, - { - "base": "translation", - "context": "Setter", "details": { "name": "Set Translation" }, @@ -2099,13 +1629,237 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Source" + "name": "Matrix 3x 4" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation" + "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" } } ] 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 index 011315360d..d8c016db0f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetworkTestPlayerComponentNetworkInput.names @@ -5,8 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Network Test Player Component Network Input", - "category": "Automated Testing" + "name": "Network Test Player Component Network Input" }, "methods": [ { @@ -27,13 +26,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Forward Back" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "Left Right" + "name": "left Right" } } ], @@ -47,9 +40,9 @@ ] }, { - "base": "FwdBack", + "base": "GetFwdBack", "details": { - "name": "Get Forward Back" + "name": "Get Fwd Back" }, "params": [ { @@ -63,15 +56,15 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Forward Back" + "name": "Fwd Back" } } ] }, { - "base": "FwdBack", + "base": "SetFwdBack", "details": { - "name": "Set Forward Back" + "name": "Set Fwd Back" }, "params": [ { @@ -83,13 +76,13 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Forward Back" + "name": "Fwd Back" } } ] }, { - "base": "LeftRight", + "base": "GetLeftRight", "details": { "name": "Get Left Right" }, @@ -111,7 +104,7 @@ ] }, { - "base": "LeftRight", + "base": "SetLeftRight", "details": { "name": "Set Left Right" }, diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceShapeConfig.names index c312519f02..d52ef119df 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceShapeConfig.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ReferenceShapeConfig.names @@ -5,19 +5,32 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "ReferenceShapeConfig" + "name": "Reference Shape Config" }, "methods": [ { - "base": "shapeEntityId", + "base": "GetshapeEntityId", + "context": "Getter", "details": { - "name": "ReferenceShapeConfig::shapeEntityId::Getter" + "name": "Getshape Entity Id" }, "params": [ { "typeid": "{3E49974D-2EE0-4AF9-92B9-229A22B515C3}", "details": { - "name": "ReferenceShapeConfig*" + "name": "Vegetation Reference Shape" + } + }, + { + "typeid": "", + "details": { + "name": "shape Entity Id" + } + }, + { + "typeid": "", + "details": { + "name": "" } } ], @@ -25,28 +38,29 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } ] }, { - "base": "shapeEntityId", + "base": "SetshapeEntityId", + "context": "Setter", "details": { - "name": "ReferenceShapeConfig::shapeEntityId::Setter" + "name": "Setshape Entity Id" }, "params": [ { "typeid": "{3E49974D-2EE0-4AF9-92B9-229A22B515C3}", "details": { - "name": "ReferenceShapeConfig*" + "name": "Vegetation Reference Shape" } }, { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "shape Entity Id", "tooltip": "Entity Unique Id" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Unit Testing.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Unit Testing.names deleted file mode 100644 index 160f0563c1..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Unit Testing.names +++ /dev/null @@ -1,471 +0,0 @@ -{ - "entries": [ - { - "base": "Unit Testing", - "context": "BehaviorClass", - "variant": "", - "details": { - "name": "Unit Testing", - "category": "Tests" - }, - "methods": [ - { - "base": "ExpectLessThanEqual", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectLessThanEqual" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectLessThanEqual is invoked" - }, - "details": { - "name": "Expect Less Than Equal", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Reference" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectGreaterThanEqual", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectGreaterThanEqual" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectGreaterThanEqual is invoked" - }, - "details": { - "name": "Unit Testing::Expect Greater Than Equal", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Reference" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "MarkComplete", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke MarkComplete" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after MarkComplete is invoked" - }, - "details": { - "name": "Mark Complete", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectTrue", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectTrue" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectTrue is invoked" - }, - "details": { - "name": "Expect True", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "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", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectFalse", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectFalse" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectFalse is invoked" - }, - "details": { - "name": "Expect False", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectEqual", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectEqual" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectEqual is invoked" - }, - "details": { - "name": "Expect Equal", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", - "details": { - "name": "Reference" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectLessThan", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectLessThan" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectLessThan is invoked" - }, - "details": { - "name": "Expect Less Than", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Candidate" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "Reference" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "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", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectNotEqual", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectNotEqual" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectNotEqual is invoked" - }, - "details": { - "name": "Expect Not Equal", - "category": "Other" - }, - "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": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", - "details": { - "name": "Aabb" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "ExpectGreaterThan", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ExpectGreaterThan" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ExpectGreaterThan is invoked" - }, - "details": { - "name": "Expect Greater Than", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "double" - } - }, - { - "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", - "details": { - "name": "double" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - }, - { - "base": "AddFailure", - "context": "Unit Testing", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke AddFailure" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after AddFailure is invoked" - }, - "details": { - "name": "Add Failure", - "category": "Other" - }, - "params": [ - { - "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", - "details": { - "name": "Entity Id", - "tooltip": "Entity Unique Id" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "Report" - } - } - ] - } - ] - } - ] -} \ 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/Nodes/Containers_AddElementatEnd.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_AddElementatEnd.names index 30d402f254..2b32364681 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_AddElementatEnd.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_AddElementatEnd.names @@ -7,31 +7,30 @@ "details": { "name": "Add Element at End", "category": "Containers", - "tooltip": "Adds the provided element at the end of the container", - "subtitle": "Containers" + "tooltip": "Adds the provided element at the end of the container" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Container", + "base": "DataOutput_Container_0", "details": { "name": "Container" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ClearAllElements.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ClearAllElements.names index 4e071c5e32..fad702a8f4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ClearAllElements.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ClearAllElements.names @@ -7,30 +7,29 @@ "details": { "name": "Clear All Elements", "category": "Containers", - "tooltip": "Eliminates all the elements in the container", - "subtitle": "Containers" + "tooltip": "Eliminates all the elements in the container" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Container", + "base": "DataOutput_Container_0", "details": { "name": "Container" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Erase.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Erase.names index 601836b23d..eb5c846fc8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Erase.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Erase.names @@ -7,38 +7,37 @@ "details": { "name": "Erase", "category": "Containers", - "tooltip": "Erase the element at the specified Index or with the specified Key", - "subtitle": "Containers" + "tooltip": "Erase the element at the specified Index or with the specified Key" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Container", + "base": "DataOutput_Container_0", "details": { "name": "Container" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" } }, { - "base": "Output_Element Not Found", + "base": "Output_Element Not Found_1", "details": { "name": "Element Not Found", "tooltip": "Triggered if the specified element was not found" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names index 817bbf8e17..d20095fcf4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names @@ -11,34 +11,34 @@ }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signaled upon node entry" } }, { - "base": "Input_Break", + "base": "Input_Break_1", "details": { "name": "Break", "tooltip": "Stops the iteration when signaled" } }, { - "base": "Output_Each", + "base": "Output_Each_0", "details": { "name": "Each", "tooltip": "Signalled after each element of the container" } }, { - "base": "Output_Finished", + "base": "Output_Finished_1", "details": { "name": "Finished", "tooltip": "The container has been fully iterated over" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetElement.names index fab464a029..0eba48907e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetElement.names @@ -7,32 +7,31 @@ "details": { "name": "Get Element", "category": "Containers", - "tooltip": "Returns the element at the specified Index or Key", - "subtitle": "Containers" + "tooltip": "Returns the element at the specified Index or Key" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" } }, { - "base": "Output_Key Not Found", + "base": "Output_Key Not Found_1", "details": { "name": "Key Not Found", "tooltip": "Triggered if the specified key was not found" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetFirstElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetFirstElement.names index fa616642b4..ebbbcfeb31 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetFirstElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetFirstElement.names @@ -7,25 +7,24 @@ "details": { "name": "Get First Element", "category": "Containers", - "tooltip": "Retrieves the first element in the container", - "subtitle": "Containers" + "tooltip": "Retrieves the first element in the container" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetLastElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetLastElement.names index 2c13a87d7b..715fedfff5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetLastElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetLastElement.names @@ -7,25 +7,24 @@ "details": { "name": "Get Last Element", "category": "Containers", - "tooltip": "Get Last Element", - "subtitle": "Containers" + "tooltip": "Get Last Element" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetSize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetSize.names index 1f7dbdad03..20c6ae2825 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetSize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_GetSize.names @@ -7,30 +7,29 @@ "details": { "name": "Get Size", "category": "Containers", - "tooltip": "Get the number of elements in the specified container", - "subtitle": "Containers" + "tooltip": "Get the number of elements in the specified container" }, "slots": [ { - "base": "DataOutput_Size", + "base": "DataOutput_Size_0", "details": { "name": "Size" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Insert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Insert.names index 347510eeeb..abf140df6f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Insert.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_Insert.names @@ -7,31 +7,30 @@ "details": { "name": "Insert", "category": "Containers", - "tooltip": "Inserts an element into the container at the specified Index or Key", - "subtitle": "Containers" + "tooltip": "Inserts an element into the container at the specified Index or Key" }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Container", + "base": "DataOutput_Container_0", "details": { "name": "Container" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_IsEmpty.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_IsEmpty.names index a3254521e2..9b87e1d329 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_IsEmpty.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_IsEmpty.names @@ -7,44 +7,43 @@ "details": { "name": "Is Empty", "category": "Containers", - "tooltip": "Returns whether the container is empty", - "subtitle": "Containers" + "tooltip": "Returns whether the container is empty" }, "slots": [ { - "base": "DataOutput_Is Empty", + "base": "DataOutput_Is Empty_0", "details": { "name": "Is Empty" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "Output_True", + "base": "Output_True_1", "details": { "name": "True", "tooltip": "The container is empty" } }, { - "base": "Output_False", + "base": "Output_False_2", "details": { "name": "False", "tooltip": "The container is not empty" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_AZEventHandler.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_AZEventHandler.names index af1e8efe7a..bfd0c9954a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_AZEventHandler.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_AZEventHandler.names @@ -11,35 +11,35 @@ }, "slots": [ { - "base": "Input_Connect", + "base": "Input_Connect_0", "details": { "name": "Connect", "tooltip": "Connect the AZ Event to this AZ Event Handler." } }, { - "base": "Input_Disconnect", + "base": "Input_Disconnect_1", "details": { "name": "Disconnect", "tooltip": "Disconnect current AZ Event from this AZ Event Handler." } }, { - "base": "Output_On Connected", + "base": "Output_On Connected_0", "details": { "name": "On Connected", "tooltip": "Signaled when a connection has taken place." } }, { - "base": "Output_On Disconnected", + "base": "Output_On Disconnected_1", "details": { "name": "On Disconnected", "tooltip": "Signaled when this event handler is disconnected." } }, { - "base": "Output_OnEvent", + "base": "Output_OnEvent_2", "details": { "name": "OnEvent", "tooltip": "Triggered when the AZ Event invokes Signal() function." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_EventHandler.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_EventHandler.names index 1a09bb23d9..1cde29ec96 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_EventHandler.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_EventHandler.names @@ -11,35 +11,35 @@ }, "slots": [ { - "base": "Input_Connect", + "base": "Input_Connect_0", "details": { "name": "Connect", "tooltip": "Connect this event handler to the specified entity." } }, { - "base": "Input_Disconnect", + "base": "Input_Disconnect_1", "details": { "name": "Disconnect", "tooltip": "Disconnect this event handler." } }, { - "base": "Output_OnConnected", + "base": "Output_OnConnected_0", "details": { "name": "OnConnected", "tooltip": "Signaled when a connection has taken place." } }, { - "base": "Output_OnDisconnected", + "base": "Output_OnDisconnected_1", "details": { "name": "OnDisconnected", "tooltip": "Signaled when this event handler is disconnected." } }, { - "base": "Output_OnFailure", + "base": "Output_OnFailure_2", "details": { "name": "OnFailure", "tooltip": "Signaled when it is not possible to connect this handler." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_FunctionDefinition.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_FunctionDefinition.names index da666253e6..3c9379ef22 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_FunctionDefinition.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_FunctionDefinition.names @@ -7,18 +7,17 @@ "details": { "name": "Function Definition", "category": "Core", - "tooltip": "Represents either an execution entry or exit node.", - "subtitle": "Core" + "tooltip": "Represents either an execution entry or exit node." }, "slots": [ { - "base": "Input_ ", + "base": "Input_ _0", "details": { "name": " " } }, { - "base": "Output_ ", + "base": "Output_ _0", "details": { "name": " " } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_MethodOverloaded.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_MethodOverloaded.names index 8c778bf0b6..62a4d815a5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_MethodOverloaded.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_MethodOverloaded.names @@ -5,7 +5,7 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MethodOverloaded", + "name": "Method Overloaded", "category": "Core", "tooltip": "MethodOverloaded" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_Nodeling.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_Nodeling.names index 58dd499c58..99ed9ebda3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_Nodeling.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_Nodeling.names @@ -7,8 +7,7 @@ "details": { "name": "Nodeling", "category": "Core", - "tooltip": "Represents either an execution entry or exit node", - "subtitle": "Core" + "tooltip": "Represents either an execution entry or exit node" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_ReceiveScriptEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_ReceiveScriptEvent.names index ee0a92ccae..685dd56da2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_ReceiveScriptEvent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_ReceiveScriptEvent.names @@ -11,35 +11,35 @@ }, "slots": [ { - "base": "Input_Connect", + "base": "Input_Connect_0", "details": { "name": "Connect", "tooltip": "Connect this event handler to the specified entity." } }, { - "base": "Input_Disconnect", + "base": "Input_Disconnect_1", "details": { "name": "Disconnect", "tooltip": "Disconnect this event handler." } }, { - "base": "Output_OnConnected", + "base": "Output_OnConnected_0", "details": { "name": "OnConnected", "tooltip": "Signaled when a connection has taken place." } }, { - "base": "Output_OnDisconnected", + "base": "Output_OnDisconnected_1", "details": { "name": "OnDisconnected", "tooltip": "Signaled when this event handler is disconnected." } }, { - "base": "Output_OnFailure", + "base": "Output_OnFailure_2", "details": { "name": "OnFailure", "tooltip": "Signaled when it is not possible to connect this handler." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_SendScriptEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_SendScriptEvent.names index d5faa52c52..52d949446c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_SendScriptEvent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Core_SendScriptEvent.names @@ -11,14 +11,14 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Fires the specified ScriptEvent when signaled" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Trigged after the ScriptEvent has been signaled and returns" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Add.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Add.names index e78805904d..46833c3e0c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Add.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Add.names @@ -7,38 +7,37 @@ "details": { "name": "Add", "category": "Deprecated", - "tooltip": "This node is deprecated, use Add (+), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Add (+), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix3x3: A", + "base": "DataInput_A_0", "details": { - "name": "Matrix3x3: A" + "name": "A" } }, { - "base": "DataInput_Matrix3x3: B", + "base": "DataInput_B_1", "details": { - "name": "Matrix3x3: B" + "name": "B" } }, { - "base": "DataOutput_Result: Matrix3x3", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByNumber.names index 32e7e9b9ca..be77f24b3d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByNumber.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "DivideByNumber", + "name": "Divide By Number", "category": "Deprecated", - "tooltip": "returns matrix created from multiply the source matrix by 1/Divisor", - "subtitle": "Deprecated" + "tooltip": "returns matrix created from multiply the source matrix by 1/Divisor" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix3x3: Source", + "base": "DataInput_Source_0", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "base": "DataInput_Number: Divisor", + "base": "DataInput_Divisor_1", "details": { - "name": "Number: Divisor" + "name": "Divisor" } }, { - "base": "DataOutput_Result: Matrix3x3", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByVector.names index d0fbd8fefb..9eebba003c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByVector.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_DivideByVector.names @@ -1,44 +1,43 @@ { "entries": [ { - "base": "{57BA2085-2225-5E7E-B132-9CCD0AFC55EA}", + "base": "{DF3A38B7-2C72-5CE5-BB8C-3293C7431F60}", "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "DivideByVector", + "name": "Divide By Vector", "category": "Deprecated", - "tooltip": "This node is deprecated, use Divide (/), it provides contextual type and slot configurations.", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Divide (/), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Numerator", + "base": "DataInput_Numerator_0", "details": { - "name": "Vector3: Numerator" + "name": "Numerator" } }, { - "base": "DataInput_Vector3: Divisor", + "base": "DataInput_Divisor_1", "details": { - "name": "Vector3: Divisor" + "name": "Divisor" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Length.names index 1f534b7480..4e38b41d29 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Length.names @@ -7,32 +7,31 @@ "details": { "name": "Length", "category": "Deprecated", - "tooltip": "This node is deprecated, use the Length node, it provides contextual type and slot configurations", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use the Length node, it provides contextual type and slot configurations" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Quaternion: Source", + "base": "DataInput_Source_0", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByColor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByColor.names index b5330e253a..b25bb7779d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByColor.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByColor.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByColor", + "name": "Multiply By Color", "category": "Deprecated", - "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: A", + "base": "DataInput_A_0", "details": { - "name": "Color: A" + "name": "A" } }, { - "base": "DataInput_Color: B", + "base": "DataInput_B_1", "details": { - "name": "Color: B" + "name": "B" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByMatrix.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByMatrix.names index 934d7deea7..82002c339e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByMatrix.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByMatrix.names @@ -1,44 +1,43 @@ { "entries": [ { - "base": "{FDB0FF00-F185-5CCF-851A-BBD5116C43EC}", + "base": "{29187DB1-2573-5243-86EB-190B64E00C54}", "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByMatrix", + "name": "Multiply By Matrix", "category": "Deprecated", - "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix3x3: A", + "base": "DataInput_A_0", "details": { - "name": "Matrix3x3: A" + "name": "A" } }, { - "base": "DataInput_Matrix3x3: B", + "base": "DataInput_B_1", "details": { - "name": "Matrix3x3: B" + "name": "B" } }, { - "base": "DataOutput_Result: Matrix3x3", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByRotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByRotation.names index fa8a381927..5427a3bc28 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByRotation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByRotation.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByRotation", + "name": "Multiply By Rotation", "category": "Deprecated", - "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Quaternion: A", + "base": "DataInput_A_0", "details": { - "name": "Quaternion: A" + "name": "A" } }, { - "base": "DataInput_Quaternion: B", + "base": "DataInput_B_1", "details": { - "name": "Quaternion: B" + "name": "B" } }, { - "base": "DataOutput_Result: Quaternion", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByTransform.names index 946f79aa5e..85c90f19b5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByTransform.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByTransform", + "name": "Multiply By Transform", "category": "Deprecated", - "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Transform: A", + "base": "DataInput_A_0", "details": { - "name": "Transform: A" + "name": "A" } }, { - "base": "DataInput_Transform: B", + "base": "DataInput_B_1", "details": { - "name": "Transform: B" + "name": "B" } }, { - "base": "DataOutput_Result: Transform", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByVector.names index 70747caf68..1ec5c980e7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByVector.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_MultiplyByVector.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByVector", + "name": "Multiply By Vector", "category": "Deprecated", - "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector4: Source", + "base": "DataInput_Source_0", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "base": "DataInput_Vector4: Multiplier", + "base": "DataInput_Multiplier_1", "details": { - "name": "Vector4: Multiplier" + "name": "Multiplier" } }, { - "base": "DataOutput_Result: Vector4", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Negate.names index 4f209d49d4..134425dd02 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Negate.names @@ -7,32 +7,31 @@ "details": { "name": "Negate", "category": "Deprecated", - "tooltip": "returns Source with every element multiplied by -1", - "subtitle": "Deprecated" + "tooltip": "returns Source with every element multiplied by -1" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: Source", + "base": "DataInput_Source_0", "details": { - "name": "Color: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Subtract.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Subtract.names index ddd6536be0..3190e11862 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Subtract.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Deprecated_Subtract.names @@ -1,44 +1,43 @@ { "entries": [ { - "base": "{C94009EE-73ED-5CA2-B1AC-026EB08D1EF5}", + "base": "{36F01867-D157-5540-ADB8-3E71F96D2187}", "context": "ScriptCanvas::Node", "variant": "", "details": { "name": "Subtract", "category": "Deprecated", - "tooltip": "This node is deprecated, use Subtract (-), it provides contextual type and slots", - "subtitle": "Deprecated" + "tooltip": "This node is deprecated, use Subtract (-), it provides contextual type and slots" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: A", + "base": "DataInput_A_0", "details": { - "name": "Vector3: A" + "name": "A" } }, { - "base": "DataInput_Vector3: B", + "base": "DataInput_B_1", "details": { - "name": "Vector3: B" + "name": "B" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Developer_WrapperMock.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Developer_WrapperMock.names index de6117ff88..f62869bbd5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Developer_WrapperMock.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Developer_WrapperMock.names @@ -5,7 +5,7 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "WrapperMock", + "name": "Wrapper Mock", "category": "Developer", "tooltip": "Node for Mocking Wrapper Node visuals" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names index 582552020f..02ef0059da 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names @@ -7,35 +7,35 @@ "details": { "name": "Get Entity Forward", "category": "Entity/Entity", - "tooltip": "Returns the forward direction vector from the specified entity' world transform, scaled by a given value (O3DE uses Z up, right handed)" + "tooltip": "returns the forward direction vector from the specified entity' world transform, scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_EntityId", + "base": "DataInput_EntityId_0", "details": { "name": "EntityId" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names index 1d8a2958e5..24aa7f38ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names @@ -7,35 +7,35 @@ "details": { "name": "Get Entity Right", "category": "Entity/Entity", - "tooltip": "Returns the right direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" + "tooltip": "returns the right direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_EntityId", + "base": "DataInput_EntityId_0", "details": { "name": "EntityId" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names index 55e4e5c419..ae8642dd03 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names @@ -7,35 +7,35 @@ "details": { "name": "Get Entity Up", "category": "Entity/Entity", - "tooltip": "Returns the up direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" + "tooltip": "returns the up direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_EntityId", + "base": "DataInput_EntityId_0", "details": { "name": "EntityId" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names index 5969f5e851..3908523dfd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names @@ -7,29 +7,29 @@ "details": { "name": "Is Active", "category": "Entity/Entity", - "tooltip": "Returns true if entity with the provided Id is valid and active." + "tooltip": "returns true if entity with the provided Id is valid and active." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Entity Id", + "base": "DataInput_Entity Id_0", "details": { "name": "Entity Id" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names index 5f8783a4d6..577938d029 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names @@ -7,29 +7,29 @@ "details": { "name": "Is Valid", "category": "Entity/Entity", - "tooltip": "Returns true if Source is valid, else false" + "tooltip": "returns true if Source is valid, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names index 1c2d36859d..a26df73e86 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names @@ -7,29 +7,29 @@ "details": { "name": "To String", "category": "Entity/Entity", - "tooltip": "Returns a string representation of Source" + "tooltip": "returns a string representation of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_BranchInputTypeExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_BranchInputTypeExample.names new file mode 100644 index 0000000000..714992620f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_BranchInputTypeExample.names @@ -0,0 +1,70 @@ +{ + "entries": [ + { + "base": "{FDD3D684-2C9A-0C05-D2A3-FD67685D8F26}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Branch Input Type Example", + "category": "Examples", + "tooltip": "Example of branch passing as input by value, pointer and reference." + }, + "slots": [ + { + "base": "Input_Get Internal Vector_0", + "details": { + "name": "Get Internal Vector" + } + }, + { + "base": "Output_On Get Internal Vector_0", + "details": { + "name": "On Get Internal Vector" + } + }, + { + "base": "DataOutput_Result_0", + "details": { + "name": "Result" + } + }, + { + "base": "Input_Branches On Input Type_1", + "details": { + "name": "Branches On Input Type" + } + }, + { + "base": "DataInput_Input Type_0", + "details": { + "name": "Input Type" + } + }, + { + "base": "Output_By Value_1", + "details": { + "name": "By Value" + } + }, + { + "base": "DataOutput_Value Input_1", + "details": { + "name": "Value Input" + } + }, + { + "base": "Output_By Pointer_2", + "details": { + "name": "By Pointer" + } + }, + { + "base": "DataOutput_Pointer Input_2", + "details": { + "name": "Pointer Input" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputTypeExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_InputTypeExample.names similarity index 71% rename from Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputTypeExample.names rename to Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_InputTypeExample.names index 0497af8efc..6ebd476fb1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputTypeExample.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_InputTypeExample.names @@ -5,62 +5,61 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "InputTypeExample", - "category": "Tests", - "tooltip": "Example of passing as input by value, pointer and reference.", - "subtitle": "Tests" + "name": "Input Type Example", + "category": "Examples", + "tooltip": "Example of passing as input by value, pointer and reference." }, "slots": [ { - "base": "Input_Clear By Value", + "base": "Input_Clear By Value_0", "details": { "name": "Clear By Value" } }, { - "base": "DataInput_Value Input", + "base": "DataInput_Value Input_0", "details": { "name": "Value Input" } }, { - "base": "Output_On Clear By Value", + "base": "Output_On Clear By Value_0", "details": { "name": "On Clear By Value" } }, { - "base": "Input_Clear By Pointer", + "base": "Input_Clear By Pointer_1", "details": { "name": "Clear By Pointer" } }, { - "base": "DataInput_Pointer Input", + "base": "DataInput_Pointer Input_1", "details": { "name": "Pointer Input" } }, { - "base": "Output_On Clear By Pointer", + "base": "Output_On Clear By Pointer_1", "details": { "name": "On Clear By Pointer" } }, { - "base": "Input_Clear By Reference", + "base": "Input_Clear By Reference_2", "details": { "name": "Clear By Reference" } }, { - "base": "DataInput_Reference Input", + "base": "DataInput_Reference Input_2", "details": { "name": "Reference Input" } }, { - "base": "Output_On Clear By Reference", + "base": "Output_On Clear By Reference_2", "details": { "name": "On Clear By Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_PropertyExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_PropertyExample.names similarity index 66% rename from Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_PropertyExample.names rename to Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_PropertyExample.names index 8360f6b541..d547017e44 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_PropertyExample.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_PropertyExample.names @@ -5,20 +5,19 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "PropertyExample", - "category": "Tests", - "tooltip": "Example of using properties.", - "subtitle": "Tests" + "name": "Property Example", + "category": "Examples", + "tooltip": "Example of using properties." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_On In", + "base": "Output_On In_0", "details": { "name": "On In" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_ReturnTypeExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_ReturnTypeExample.names similarity index 71% rename from Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_ReturnTypeExample.names rename to Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_ReturnTypeExample.names index 555fc92580..4122975929 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_ReturnTypeExample.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Examples_ReturnTypeExample.names @@ -5,62 +5,61 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ReturnTypeExample", - "category": "Tests", - "tooltip": "Example of returning by value, pointer and reference.", - "subtitle": "Tests" + "name": "Return Type Example", + "category": "Examples", + "tooltip": "Example of returning by value, pointer and reference." }, "slots": [ { - "base": "Input_Return By Value", + "base": "Input_Return By Value_0", "details": { "name": "Return By Value" } }, { - "base": "Output_On Return By Value", + "base": "Output_On Return By Value_0", "details": { "name": "On Return By Value" } }, { - "base": "DataOutput_Value", + "base": "DataOutput_Value_0", "details": { "name": "Value" } }, { - "base": "Input_Return By Pointer", + "base": "Input_Return By Pointer_1", "details": { "name": "Return By Pointer" } }, { - "base": "Output_On Return By Pointer", + "base": "Output_On Return By Pointer_1", "details": { "name": "On Return By Pointer" } }, { - "base": "DataOutput_Pointer", + "base": "DataOutput_Pointer_1", "details": { "name": "Pointer" } }, { - "base": "Input_Return By Reference", + "base": "Input_Return By Reference_2", "details": { "name": "Return By Reference" } }, { - "base": "Output_On Return By Reference", + "base": "Output_On Return By Reference_2", "details": { "name": "On Return By Reference" } }, { - "base": "DataOutput_Reference", + "base": "DataOutput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names index e11a54b639..8ce3fd36df 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names @@ -1,57 +1,43 @@ { "entries": [ { - "base": "{0A2EB488-5A6A-E166-BB62-23FF81499E33}", + "base": "{0B0AC61B-4BBA-42BF-BDCD-DAF2D3CA41A8}", "context": "ScriptCanvas::Node", "variant": "", "details": { "name": "Input Handler", - "category": "Input/Input System", + "category": "Input", "tooltip": "Handle processed input events found in input binding assets" }, "slots": [ { - "base": "Input_Connect Event", - "details": { - "name": "Connect Event", - "tooltip": "Connect to input event name as defined in an input binding asset." - } - }, - { - "base": "DataInput_Event Name", + "base": "DataInput_Event Name_0", "details": { "name": "Event Name" } }, { - "base": "Output_On Connect Event", + "base": "DataOutput_Value_0", "details": { - "name": "On Connect Event", - "tooltip": "Connect to input event name as defined in an input binding asset." + "name": "Value" } }, { - "base": "Output_Pressed", + "base": "Output_Pressed_0", "details": { "name": "Pressed", "tooltip": "Signaled when the input event begins." } }, { - "base": "DataOutput_value", - "details": { - "name": "value" - } - }, - { - "base": "Output_Held", + "base": "Output_Held_1", "details": { "name": "Held", "tooltip": "Signaled while the input event is active." } }, { - "base": "Output_Released", + "base": "Output_Released_2", "details": { "name": "Released", "tooltip": "Signaled when the input event ends." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ExpressionNodeBase.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ExpressionNodeBase.names index 2d9711106c..d68e675a1b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ExpressionNodeBase.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ExpressionNodeBase.names @@ -5,14 +5,13 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ExpressionNodeBase", + "name": "Expression Node Base", "category": "Internal", - "tooltip": "Base class for any node that wants to evaluate user given expressions.", - "subtitle": "Internal" + "tooltip": "Base class for any node that wants to evaluate user given expressions." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ScriptEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ScriptEvent.names index d475d33102..3ba54b226b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ScriptEvent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_ScriptEvent.names @@ -7,8 +7,7 @@ "details": { "name": "Script Event", "category": "Internal", - "tooltip": "Base class for Script Events.", - "subtitle": "Internal" + "tooltip": "Base class for Script Events." } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_StringFormatted.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_StringFormatted.names index 12ad68d7e3..8affe52662 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_StringFormatted.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Internal_StringFormatted.names @@ -5,27 +5,26 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "StringFormatted", + "name": "String Formatted", "category": "Internal", - "tooltip": "Base class for any nodes that use string formatting capabilities.", - "subtitle": "Internal" + "tooltip": "Base class for any nodes that use string formatting capabilities." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/LogicDeprecated_Indexer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/LogicDeprecated_Indexer.names index 21b990bd6e..0c75b39c96 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/LogicDeprecated_Indexer.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/LogicDeprecated_Indexer.names @@ -7,68 +7,67 @@ "details": { "name": "Indexer", "category": "Logic/Deprecated", - "tooltip": "An execution flow gate that activates each input flow in sequential order", - "subtitle": "Deprecated" + "tooltip": "An execution flow gate that activates each input flow in sequential order" }, "slots": [ { - "base": "Input_In0", + "base": "Input_In0_0", "details": { "name": "In0", "tooltip": "Input 0" } }, { - "base": "Input_In1", + "base": "Input_In1_1", "details": { "name": "In1", "tooltip": "Input 1" } }, { - "base": "Input_In2", + "base": "Input_In2_2", "details": { "name": "In2", "tooltip": "Input 2" } }, { - "base": "Input_In3", + "base": "Input_In3_3", "details": { "name": "In3", "tooltip": "Input 3" } }, { - "base": "Input_In4", + "base": "Input_In4_4", "details": { "name": "In4", "tooltip": "Input 4" } }, { - "base": "Input_In5", + "base": "Input_In5_5", "details": { "name": "In5", "tooltip": "Input 5" } }, { - "base": "Input_In6", + "base": "Input_In6_6", "details": { "name": "In6", "tooltip": "Input 6" } }, { - "base": "Input_In7", + "base": "Input_In7_7", "details": { "name": "In7", "tooltip": "Input 7" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled when the node is triggered." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_And.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_And.names index a98ca0b451..4638153291 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_And.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_And.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Any.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Any.names index d323290c96..d049db83ba 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Any.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Any.names @@ -11,13 +11,13 @@ }, "slots": [ { - "base": "Input_Input 0", + "base": "Input_Input 0_0", "details": { "name": "Input 0" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled when the node receives a signal from the selected index" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Break.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Break.names index 9763a75d7c..3c490572fe 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Break.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Break.names @@ -7,18 +7,17 @@ "details": { "name": "Break", "category": "Logic", - "tooltip": "Used to exit a looping structure", - "subtitle": "Logic" + "tooltip": "Used to exit a looping structure" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out 0", + "base": "Output_Out 0_0", "details": { "name": "Out 0", "tooltip": "Output 0" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Cycle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Cycle.names index 0f7c401571..54084c6388 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Cycle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Cycle.names @@ -6,18 +6,17 @@ "variant": "", "details": { "name": "Cycle", - "category": "Logic", - "subtitle": "Logic" + "category": "Logic" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out 0", + "base": "Output_Out 0_0", "details": { "name": "Out 0", "tooltip": "Output 0" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_If.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_If.names index 34d7c6b746..3f24114234 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_If.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_If.names @@ -11,27 +11,27 @@ }, "slots": [ { - "base": "DataInput_Condition", + "base": "DataInput_Condition_0", "details": { "name": "Condition" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the condition provided evaluates to true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the condition provided evaluates to false." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_IsNull.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_IsNull.names index b36abc7903..c7d0c93d12 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_IsNull.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_IsNull.names @@ -11,33 +11,33 @@ }, "slots": [ { - "base": "DataInput_Reference", + "base": "DataInput_Reference_0", "details": { "name": "Reference" } }, { - "base": "DataOutput_Is Null", + "base": "DataOutput_Is Null_0", "details": { "name": "Is Null" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the reference provided is null." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the reference provided is not null." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Multiplexer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Multiplexer.names index a0c6110b96..89789a406d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Multiplexer.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Multiplexer.names @@ -11,69 +11,69 @@ }, "slots": [ { - "base": "DataInput_Index", + "base": "DataInput_Index_0", "details": { "name": "Index" } }, { - "base": "Input_In0", + "base": "Input_In0_0", "details": { "name": "In0", "tooltip": "Input 0" } }, { - "base": "Input_In1", + "base": "Input_In1_1", "details": { "name": "In1", "tooltip": "Input 1" } }, { - "base": "Input_In2", + "base": "Input_In2_2", "details": { "name": "In2", "tooltip": "Input 2" } }, { - "base": "Input_In3", + "base": "Input_In3_3", "details": { "name": "In3", "tooltip": "Input 3" } }, { - "base": "Input_In4", + "base": "Input_In4_4", "details": { "name": "In4", "tooltip": "Input 4" } }, { - "base": "Input_In5", + "base": "Input_In5_5", "details": { "name": "In5", "tooltip": "Input 5" } }, { - "base": "Input_In6", + "base": "Input_In6_6", "details": { "name": "In6", "tooltip": "Input 6" } }, { - "base": "Input_In7", + "base": "Input_In7_7", "details": { "name": "In7", "tooltip": "Input 7" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled when the node receives a signal from the selected index" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Not.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Not.names index 37104685a0..471d1a5660 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Not.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Not.names @@ -11,33 +11,33 @@ }, "slots": [ { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Once.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Once.names index f35f338941..113e1da29f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Once.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Once.names @@ -11,28 +11,28 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Input_Reset", + "base": "Input_Reset_1", "details": { "name": "Reset", "tooltip": "Reset signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" } }, { - "base": "Output_On Reset", + "base": "Output_On Reset_1", "details": { "name": "On Reset", "tooltip": "Triggered when Reset" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Or.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Or.names index 492f4d2a44..e68230a2b1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Or.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Or.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_OrderedSequencer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_OrderedSequencer.names index c82ae5b04f..0d2c73a0d8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_OrderedSequencer.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_OrderedSequencer.names @@ -7,18 +7,17 @@ "details": { "name": "Ordered Sequencer", "category": "Logic", - "tooltip": "Triggers the execution outputs in the specified ordered. The next line will trigger once the first line reaches a break in execution(either through latent node, or a terminal endpoint)", - "subtitle": "Logic" + "tooltip": "Triggers the execution outputs in the specified ordered. The next line will trigger once the first line reaches a break in execution(either through latent node, or a terminal endpoint)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out 0", + "base": "Output_Out 0_0", "details": { "name": "Out 0", "tooltip": "Output 0" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_RandomSignal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_RandomSignal.names index 75094119a8..bd94410c07 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_RandomSignal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_RandomSignal.names @@ -7,24 +7,23 @@ "details": { "name": "Random Signal", "category": "Logic", - "tooltip": "Triggers one of the selected outputs at Random depending on the weights provided.", - "subtitle": "Logic" + "tooltip": "Triggers one of the selected outputs at Random depending on the weights provided." }, "slots": [ { - "base": "DataInput_Weight 1", + "base": "DataInput_Weight 1_0", "details": { "name": "Weight 1" } }, { - "base": "Output_Out 1", + "base": "Output_Out 1_0", "details": { "name": "Out 1" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Sequencer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Sequencer.names index 8856ddd2ac..067a064123 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Sequencer.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Sequencer.names @@ -11,82 +11,82 @@ }, "slots": [ { - "base": "DataInput_Index", + "base": "DataInput_Index_0", "details": { "name": "Index" } }, { - "base": "DataInput_Order", + "base": "DataInput_Order_1", "details": { "name": "Order" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Input_Next", + "base": "Input_Next_1", "details": { "name": "Next", "tooltip": "When next is activated, it enables the next output" } }, { - "base": "Output_Out0", + "base": "Output_Out0_0", "details": { "name": "Out0", "tooltip": "Output 0" } }, { - "base": "Output_Out1", + "base": "Output_Out1_1", "details": { "name": "Out1", "tooltip": "Output 1" } }, { - "base": "Output_Out2", + "base": "Output_Out2_2", "details": { "name": "Out2", "tooltip": "Output 2" } }, { - "base": "Output_Out3", + "base": "Output_Out3_3", "details": { "name": "Out3", "tooltip": "Output 3" } }, { - "base": "Output_Out4", + "base": "Output_Out4_4", "details": { "name": "Out4", "tooltip": "Output 4" } }, { - "base": "Output_Out5", + "base": "Output_Out5_5", "details": { "name": "Out5", "tooltip": "Output 5" } }, { - "base": "Output_Out6", + "base": "Output_Out6_6", "details": { "name": "Out6", "tooltip": "Output 6" } }, { - "base": "Output_Out7", + "base": "Output_Out7_7", "details": { "name": "Out7", "tooltip": "Output 7" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Switch.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Switch.names index 3791eb864e..c1e9f956af 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Switch.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_Switch.names @@ -11,19 +11,19 @@ }, "slots": [ { - "base": "DataInput_Index", + "base": "DataInput_Index_0", "details": { "name": "Index" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out 0", + "base": "Output_Out 0_0", "details": { "name": "Out 0", "tooltip": "Output 0" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_While.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_While.names index a1bd16a211..7cedbd76a4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_While.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Logic_While.names @@ -6,31 +6,30 @@ "variant": "", "details": { "name": "While", - "category": "Logic", - "subtitle": "Logic" + "category": "Logic" }, "slots": [ { - "base": "DataInput_Condition", + "base": "DataInput_Condition_0", "details": { "name": "Condition" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signalled if the condition is false, or if the loop calls the break node" } }, { - "base": "Output_Loop", + "base": "Output_Loop_1", "details": { "name": "Loop", "tooltip": "Signalled if the condition is true, and every time the last node of 'Loop' finishes" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names index 81545f0ba2..738beb9967 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names @@ -5,38 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Add Axis Aligned Bounding Boxes", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB that is the (min(min(A), min(B)), max(max(A), max(B)))", - "subtitle": "Axis Aligned Bounding Box" + "name": "AddAABB", + "category": "Math/AABB", + "tooltip": "returns the AABB that is the (min(min(A), min(B)), max(max(A), max(B)))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: A", + "base": "DataInput_A_0", "details": { - "name": "First" + "name": "A" } }, { - "base": "DataInput_AABB: B", + "base": "DataInput_B_1", "details": { - "name": "Second" + "name": "B" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names index fd88952e19..9269e2f51c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Add Point", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB that is the (min(min(Source), Point), max(max(Source), Point))", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB that is the (min(min(Source), Point), max(max(Source), Point))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector3: Point", + "base": "DataInput_Point_1", "details": { "name": "Point" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names index 874cd39c9f..d658ab4c88 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Apply Transform", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB translated and possibly scaled by the Transform", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB translated and possibly scaled by the Transform" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Transform: Transform", + "base": "DataInput_Transform_1", "details": { "name": "Transform" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names index c9118de014..c32001636a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Center", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the center of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the center of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Center" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names index 2062682005..0addcf10ae 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Clamp", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the largest version of Source that can fit entirely within Clamp", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the largest version of Source that can fit entirely within Clamp" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_AABB: Clamp", + "base": "DataInput_Clamp_1", "details": { "name": "Clamp" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names index 7c208bcdd6..7af4e39a1b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Contains Axis Aligned Bounding Box", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns true if Source contains all of the bounds of Candidate, else false", - "subtitle": "Axis Aligned Bounding Box" + "name": "ContainsAABB", + "category": "Math/AABB", + "tooltip": "returns true if Source contains all of the bounds of Candidate, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_AABB: Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Contains" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names index c3d7c00e94..b2745c2608 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Contains Vector3", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns true if Source contains the Candidate, else false", - "subtitle": "Axis Aligned Bounding Box" + "name": "Contains Vector 3", + "category": "Math/AABB", + "tooltip": "returns true if Source contains the Candidate, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector3: Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Contains" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names index 7c8e0ebb3a..3113b03864 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Distance", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the shortest distance from Point to Source, or zero of Point is contained in Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the shortest distance from Point to Source, or zero of Point is contained in Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector3: Point", + "base": "DataInput_Point_1", "details": { "name": "Point" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Distance" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names index 05390a20e5..6f7cc2934c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Expand", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Source expanded in each axis by the absolute value of each axis in Delta", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Source expanded in each axis by the absolute value of each axis in Delta" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector3: Delta", + "base": "DataInput_Delta_1", "details": { "name": "Delta" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names index db3ddc567f..5cb269e3de 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Extents", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Vector3(Source.Width, Source.Height, Source.Depth)", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Vector3(Source.Width, Source.Height, Source.Depth)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Extents" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names index d1c6a9ca27..5dbba72465 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "From Center Half Extents", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB with Min = Center - HalfExtents, Max = Center + HalfExtents", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB with Min = Center - HalfExtents, Max = Center + HalfExtents" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Center", + "base": "DataInput_Center_0", "details": { "name": "Center" } }, { - "base": "DataInput_Vector3: HalfExtents", + "base": "DataInput_HalfExtents_1", "details": { - "name": "Half Extents" + "name": "HalfExtents" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names index 06a369986d..a6eac59710 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "From Center Radius", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB with Min = Center - Vector3(radius, radius, radius), Max = Center + Vector3(radius, radius, radius)", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB with Min = Center - Vector3(radius, radius, radius), Max = Center + Vector3(radius, radius, radius)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Center", + "base": "DataInput_Center_0", "details": { "name": "Center" } }, { - "base": "DataInput_Number: Radius", + "base": "DataInput_Radius_1", "details": { "name": "Radius" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names index 982b3b8342..7e638dfd5d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "From Min Max", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB from Min and Max if Min <= Max, else returns FromPoint(max)", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB from Min and Max if Min <= Max, else returns FromPoint(max)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Vector3: Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names index 205f2373e4..17404286f0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names @@ -5,34 +5,33 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Oriented Bounding Box", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB which contains Source", - "subtitle": "Axis Aligned Bounding Box" + "name": "FromOBB", + "category": "Math/AABB", + "tooltip": "returns the AABB which contains Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_OBB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names index 7bd74f5e61..6d862421ae 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "From Point", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the AABB with min and max set to Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the AABB with min and max set to Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names index 0eb6d80940..fdeb6fb6b7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Get Max", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Vector3 that is the max value on each axis of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Vector3 that is the max value on each axis of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Max" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names index 8bcf1804db..b73fe74b31 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Get Min", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Vector3 that is the min value on each axis of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Vector3 that is the min value on each axis of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Vector3", + "base": "DataOutput_Result_0", "details": { - "name": "Min" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names index 14a10d9b46..ff2e716d2b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Is Finite", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns true if Source is finite, else false", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns true if Source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Is Finite" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names index 9c6d0dc8ff..2eec8a0a6e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Is Valid", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns ture if Source is valid, that is if Source.min <= Source.max, else false", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns ture if Source is valid, that is if Source.min <= Source.max, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Is Valid" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names index 48c6bd2b60..a4f5209cba 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names @@ -5,28 +5,27 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Invalid Axis Aligned Bounding Box", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns an invalid AABB (min > max), adding any point to it will make it valid", - "subtitle": "Axis Aligned Bounding Box" + "name": "Null", + "category": "Math/AABB", + "tooltip": "returns an invalid AABB (min > max), adding any point to it will make it valid" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "Invalid AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names index 56b83a6eb8..1a69a2d819 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Overlaps", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns true if A overlaps B, else false", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns true if A overlaps B, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: A", + "base": "DataInput_A_0", "details": { - "name": "AABB: A" + "name": "A" } }, { - "base": "DataInput_AABB: B", + "base": "DataInput_B_1", "details": { - "name": "AABB: B" + "name": "B" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names index b0e2985fbb..22152bd4a6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Surface Area", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the sum of the surface area of all six faces of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the sum of the surface area of all six faces of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names index e77bde466f..30d54f3e14 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "To Sphere", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the center and radius of smallest sphere that contains Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the center and radius of smallest sphere that contains Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Center: Vector3", + "base": "DataOutput_Center_0", "details": { - "name": "Center: Vector3" + "name": "Center" } }, { - "base": "DataOutput_Radius: Number", + "base": "DataOutput_Radius_1", "details": { - "name": "Radius: Number" + "name": "Radius" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names index 0be4731085..34c66d8e43 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names @@ -6,39 +6,38 @@ "variant": "", "details": { "name": "Translate", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Source with each point added with Translation", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Source with each point added with Translation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataInput_Vector3: Translation", + "base": "DataInput_Translation_1", "details": { - "name": "Vector3: Translation" + "name": "Translation" } }, { - "base": "DataOutput_Result: AABB", + "base": "DataOutput_Result_0", "details": { - "name": "Result: AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names index f6051e7dc8..0795654fa1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "X Extent", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the X extent (max X - min X) of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the X extent (max X - min X) of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names index eab2924849..277ba3cef5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Y Extent", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Y extent (max Y - min Y) of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Y extent (max Y - min Y) of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names index 4a107a844d..8f477f3325 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names @@ -6,33 +6,32 @@ "variant": "", "details": { "name": "Z Extent", - "category": "Math/Axis Aligned Bounding Box", - "tooltip": "returns the Z extent (max Z - min Z) of Source", - "subtitle": "Axis Aligned Bounding Box" + "category": "Math/AABB", + "tooltip": "returns the Z extent (max Z - min Z) of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_AABB: Source", + "base": "DataInput_Source_0", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot.names index a3eef6a2e7..c3d3a759ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot.names @@ -7,38 +7,37 @@ "details": { "name": "Dot", "category": "Math/Color", - "tooltip": "returns the 4-element dot product of A and B", - "subtitle": "Color" + "tooltip": "returns the 4-element dot product of A and B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: A", + "base": "DataInput_A_0", "details": { - "name": "Color: A" + "name": "A" } }, { - "base": "DataInput_Color: B", + "base": "DataInput_B_1", "details": { - "name": "Color: B" + "name": "B" } }, { - "base": "DataOutput_Result: Number", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names index 7ddb05f4dd..5e548beccf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Dot (RGB)", + "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names index 45e436bce6..327b08382e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names @@ -7,47 +7,47 @@ "details": { "name": "From Values", "category": "Math/Color", - "tooltip": "Returns a Color from the R, G, B, A inputs" + "tooltip": "returns a Color from the R, G, B, A inputs" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_R", + "base": "DataInput_R_0", "details": { "name": "R" } }, { - "base": "DataInput_G", + "base": "DataInput_G_1", "details": { "name": "G" } }, { - "base": "DataInput_B", + "base": "DataInput_B_2", "details": { "name": "B" } }, { - "base": "DataInput_A", + "base": "DataInput_A_3", "details": { "name": "A" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names index c709935b7c..c5ae0aa32e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Vector3", + "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" + "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_RGB", + "base": "DataInput_RGB_0", "details": { "name": "RGB" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names index 61004481db..9364547804 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names @@ -5,40 +5,39 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Vector3 And Number", + "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", - "subtitle": "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: RGB", + "base": "DataInput_RGB_0", "details": { - "name": "Red, Green, Blue" + "name": "RGB" } }, { - "base": "DataInput_Number: A", + "base": "DataInput_A_1", "details": { - "name": "Alpha" + "name": "A" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { - "name": "Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names index b02a810b0f..5c94cfdc4e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names @@ -7,30 +7,29 @@ "details": { "name": "Gamma To Linear", "category": "Math/Color", - "tooltip": "returns Source converted from gamma corrected to linear space", - "subtitle": "Color" + "tooltip": "returns Source converted from gamma corrected to linear space" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names index 7f7038d383..1b3e666878 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names @@ -7,44 +7,43 @@ "details": { "name": "Is Close", "category": "Math/Color", - "tooltip": "Returns true if A is within Tolerance of B, else false", - "subtitle": "Color" + "tooltip": "returns true if A is within Tolerance of B, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: A", + "base": "DataInput_A_0", "details": { - "name": "First" + "name": "A" } }, { - "base": "DataInput_Color: B", + "base": "DataInput_B_1", "details": { - "name": "Second" + "name": "B" } }, { - "base": "DataInput_Number: Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Is Close" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names index 31b2a61f3d..a2efd6ad06 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names @@ -7,38 +7,37 @@ "details": { "name": "Is Zero", "category": "Math/Color", - "tooltip": "returns true if Source is within Tolerance of zero", - "subtitle": "Color" + "tooltip": "returns true if Source is within Tolerance of zero" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Number: Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result: Boolean", + "base": "DataOutput_Result_0", "details": { - "name": "Is Zero" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names index ba7118a997..79de306912 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names @@ -7,29 +7,29 @@ "details": { "name": "Linear To Gamma", "category": "Math/Color", - "tooltip": "Returns Source converted from linear to gamma corrected space" + "tooltip": "returns Source converted from linear to gamma corrected space" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names index 7f67402d65..588c0fd3d6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names @@ -7,38 +7,37 @@ "details": { "name": "Multiply By Number", "category": "Math/Color", - "tooltip": "Returns Source with every elemented multiplied by Multiplier", - "subtitle": "Color" + "tooltip": "returns Source with every elemented multiplied by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Color: Source", + "base": "DataInput_Source_0", "details": { - "name": "Color: Source" + "name": "Source" } }, { - "base": "DataInput_Number: Multiplier", + "base": "DataInput_Multiplier_1", "details": { - "name": "Number: Multiplier" + "name": "Multiplier" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_One.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_One.names index 7034549282..9ea9b55a68 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_One.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_One.names @@ -7,26 +7,25 @@ "details": { "name": "One", "category": "Math/Color", - "tooltip": "returns a Color with every element set to 1", - "subtitle": "Color" + "tooltip": "returns a Color with every element set to 1" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result: Color", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_EqualTo_==_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_EqualTo_==_.names index e3c8499aee..7ee72caed6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_EqualTo_==_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_EqualTo_==_.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThan__.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThan__.names index 36f3163ae4..aad4fffa7c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThan__.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThan__.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThanorEqualTo_=_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThanorEqualTo_=_.names index 68dc66c790..5dd48b7df6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThanorEqualTo_=_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_GreaterThanorEqualTo_=_.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThan___.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThan___.names index 1247a766f5..8d74f9f791 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThan___.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThan___.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThanorEqualTo__=_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThanorEqualTo__=_.names index f0e9e1602f..48329b3495 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThanorEqualTo__=_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_LessThanorEqualTo__=_.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_NotEqualTo_!=_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_NotEqualTo_!=_.names index 6be7dfcbf6..8fedb7632d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_NotEqualTo_!=_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathComparisons_NotEqualTo_!=_.names @@ -11,40 +11,40 @@ }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names index a3682b3751..636371c087 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names @@ -6,30 +6,30 @@ "variant": "", "details": { "name": "From String", - "category": "Math/Tag", - "tooltip": "Returns a Tag from the string" + "category": "Math/Crc32", + "tooltip": "returns a Crc32 from the string" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { - "name": "Text" + "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names index 3d2cd9186f..90ba23eaf8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names @@ -7,41 +7,41 @@ "details": { "name": "From Columns", "category": "Math/Matrix3x3", - "tooltip": "Returns a rotation matrix based on angle around Z axis" + "tooltip": "returns a rotation matrix based on angle around Z axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Column1", + "base": "DataInput_Column1_0", "details": { - "name": "Column 1" + "name": "Column1" } }, { - "base": "DataInput_Column2", + "base": "DataInput_Column2_1", "details": { - "name": "Column 2" + "name": "Column2" } }, { - "base": "DataInput_Column3", + "base": "DataInput_Column3_2", "details": { - "name": "Column 3" + "name": "Column3" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names index 03cfbb8526..a5660a3c6f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names @@ -7,29 +7,29 @@ "details": { "name": "From Cross Product", "category": "Math/Matrix3x3", - "tooltip": "Returns a skew-symmetric cross product matrix based on supplied vector" + "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names index 9725855cf1..b92cdef563 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names @@ -7,29 +7,29 @@ "details": { "name": "From Diagonal", "category": "Math/Matrix3x3", - "tooltip": "Returns a diagonal matrix using the supplied vector" + "tooltip": "returns a diagonal matrix using the supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names index 4f8d7ec9d9..3040b5b8ed 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix4x4", + "name": "From Matrix 4x 4", "category": "Math/Matrix3x3", - "tooltip": "Returns a matrix from the first 3 rows of a Matrix3x3" + "tooltip": "returns a matrix from the first 3 rows of a Matrix3x3" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names index 64c63a37e2..3b381ff3b5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names @@ -7,29 +7,29 @@ "details": { "name": "From Quaternion", "category": "Math/Matrix3x3", - "tooltip": "Returns a rotation matrix using the supplied quaternion" + "tooltip": "returns a rotation matrix using the supplied quaternion" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names index 23275a718e..2289885994 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation X Degrees", + "name": "From RotationX Degrees", "category": "Math/Matrix3x3", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around X-axis" + "tooltip": "returns a rotation matrix representing a rotation in degrees around X-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names index e52288fade..362ff04556 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation Y Degrees", + "name": "From RotationY Degrees", "category": "Math/Matrix3x3", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around Y-axis" + "tooltip": "returns a rotation matrix representing a rotation in degrees around Y-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names index 888a75aff2..bf51a84455 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation Z Degrees", + "name": "From RotationZ Degrees", "category": "Math/Matrix3x3", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around Z-axis" + "tooltip": "returns a rotation matrix representing a rotation in degrees around Z-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names index 3a3cdb722d..879e73fa67 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names @@ -7,41 +7,41 @@ "details": { "name": "From Rows", "category": "Math/Matrix3x3", - "tooltip": "Returns a matrix from three row" + "tooltip": "returns a matrix from three row" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Row1", + "base": "DataInput_Row1_0", "details": { - "name": "Row 1" + "name": "Row1" } }, { - "base": "DataInput_Row2", + "base": "DataInput_Row2_1", "details": { - "name": "Row 2" + "name": "Row2" } }, { - "base": "DataInput_Row3", + "base": "DataInput_Row3_2", "details": { - "name": "Row 3" + "name": "Row3" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names index 3040759f1f..d331aa7cd1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names @@ -7,29 +7,29 @@ "details": { "name": "From Scale", "category": "Math/Matrix3x3", - "tooltip": "Returns a scale matrix using the supplied vector" + "tooltip": "returns a scale matrix using the supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_0", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names index 11a310374e..69982d93ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names @@ -7,29 +7,29 @@ "details": { "name": "From Transform", "category": "Math/Matrix3x3", - "tooltip": "Returns a matrix using the supplied transform" + "tooltip": "returns a matrix using the supplied transform" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Transform", + "base": "DataInput_Transform_0", "details": { "name": "Transform" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names index 60a538ecd7..7e5e053278 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names @@ -7,35 +7,35 @@ "details": { "name": "Get Column", "category": "Math/Matrix3x3", - "tooltip": "Returns vector from matrix corresponding to the Column index" + "tooltip": "returns vector from matrix corresponding to the Column index" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Column", + "base": "DataInput_Column_1", "details": { "name": "Column" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names index 5cb723836e..4fe70dce73 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names @@ -7,43 +7,43 @@ "details": { "name": "Get Columns", "category": "Math/Matrix3x3", - "tooltip": "Returns all columns from matrix" + "tooltip": "returns all columns from matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Column1", + "base": "DataOutput_Column1_0", "details": { - "name": "Column 1" + "name": "Column1" } }, { - "base": "DataOutput_Column2", + "base": "DataOutput_Column2_1", "details": { - "name": "Column 2" + "name": "Column2" } }, { - "base": "DataOutput_Column3", + "base": "DataOutput_Column3_2", "details": { - "name": "Column 3" + "name": "Column3" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names index 3516b89257..ab47e40a1f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names @@ -7,29 +7,29 @@ "details": { "name": "Get Diagonal", "category": "Math/Matrix3x3", - "tooltip": "Returns vector of matrix diagonal values" + "tooltip": "returns vector of matrix diagonal values" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names index 7d9f46c441..efe3dd4ae6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names @@ -7,41 +7,41 @@ "details": { "name": "Get Element", "category": "Math/Matrix3x3", - "tooltip": "Returns scalar from matrix corresponding to the (Row,Column) pair" + "tooltip": "returns scalar from matrix corresponding to the (Row,Column) pair" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Row", + "base": "DataInput_Row_1", "details": { "name": "Row" } }, { - "base": "DataInput_Column", + "base": "DataInput_Column_2", "details": { "name": "Column" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names index f85577a201..e6e954f231 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names @@ -7,35 +7,35 @@ "details": { "name": "Get Row", "category": "Math/Matrix3x3", - "tooltip": "Returns vector from matrix corresponding to the Row index" + "tooltip": "returns vector from matrix corresponding to the Row index" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Row", + "base": "DataInput_Row_1", "details": { "name": "Row" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names index 98834cbfe4..1896cb9da3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names @@ -7,43 +7,43 @@ "details": { "name": "Get Rows", "category": "Math/Matrix3x3", - "tooltip": "Returns all rows from matrix" + "tooltip": "returns all rows from matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Row1", + "base": "DataOutput_Row1_0", "details": { - "name": "Row 1" + "name": "Row1" } }, { - "base": "DataOutput_Row2", + "base": "DataOutput_Row2_1", "details": { - "name": "Row 2" + "name": "Row2" } }, { - "base": "DataOutput_Row3", + "base": "DataOutput_Row3_2", "details": { - "name": "Row 3" + "name": "Row3" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names index c128a22337..33491ec876 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names @@ -7,29 +7,29 @@ "details": { "name": "Invert", "category": "Math/Matrix3x3", - "tooltip": "Returns inverse of Matrix" + "tooltip": "returns inverse of Matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names index 03d72efaf8..7852102617 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Matrix3x3", - "tooltip": "Returns true if each element of both Matrix are equal within some tolerance" + "tooltip": "returns true if each element of both Matrix are equal within some tolerance" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names index 11cf183614..96cd01c1f6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Matrix3x3", - "tooltip": "Returns true if all numbers in matrix is finite" + "tooltip": "returns true if all numbers in matrix is finite" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names index f0e0fba7e1..134e985d08 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names @@ -7,29 +7,29 @@ "details": { "name": "Is Orthogonal", "category": "Math/Matrix3x3", - "tooltip": "Returns true if the matrix is orthogonal" + "tooltip": "returns true if the matrix is orthogonal" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names index 79f5fee679..82442a675d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Number", "category": "Math/Matrix3x3", - "tooltip": "Returns matrix created from multiply the source matrix by Multiplier" + "tooltip": "returns matrix created from multiply the source matrix by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names index bd4f2c6ece..35b4b06bc6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Vector", "category": "Math/Matrix3x3", - "tooltip": "Returns vector created by right left multiplying matrix by supplied vector" + "tooltip": "returns vector created by right left multiplying matrix by supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector", + "base": "DataInput_Vector_1", "details": { "name": "Vector" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names index cb1a2ffc69..4d5778ce63 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names @@ -7,29 +7,29 @@ "details": { "name": "Orthogonalize", "category": "Math/Matrix3x3", - "tooltip": "Returns an orthogonal matrix from the Source matrix" + "tooltip": "returns an orthogonal matrix from the Source matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names index 32dc94b070..7e78ac305f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names @@ -7,29 +7,29 @@ "details": { "name": "To Adjugate", "category": "Math/Matrix3x3", - "tooltip": "Returns the transpose of Matrix of cofactors" + "tooltip": "returns the transpose of Matrix of cofactors" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names index eecd614044..8296a2177e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names @@ -7,29 +7,29 @@ "details": { "name": "To Determinant", "category": "Math/Matrix3x3", - "tooltip": "Returns determinant of Matrix" + "tooltip": "returns determinant of Matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Determinant", + "base": "DataOutput_Determinant_0", "details": { "name": "Determinant" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names index 27680a0107..dc2816e915 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names @@ -7,29 +7,29 @@ "details": { "name": "To Scale", "category": "Math/Matrix3x3", - "tooltip": "Returns scale part of the transformation matrix" + "tooltip": "returns scale part of the transformation matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names index 495a34df7c..a95931218a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names @@ -11,25 +11,25 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names index 036dd90b45..7a65f849a8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names @@ -7,23 +7,23 @@ "details": { "name": "Zero", "category": "Math/Matrix3x3", - "tooltip": "Returns the zero matrix" + "tooltip": "returns the zero matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromColumns.names index 8ff9f22184..ac4641b312 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromColumns.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromColumns.names @@ -5,52 +5,51 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromColumns", + "name": "From Columns", "category": "Math/Matrix4x4", - "tooltip": "returns a rotation matrix based on angle around Z axis", - "subtitle": "Matrix4x4" + "tooltip": "returns a rotation matrix based on angle around Z axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector4: Column1", + "base": "DataInput_Column1_0", "details": { - "name": "Vector4: Column1" + "name": "Column1" } }, { - "base": "DataInput_Vector4: Column2", + "base": "DataInput_Column2_1", "details": { - "name": "Vector4: Column2" + "name": "Column2" } }, { - "base": "DataInput_Vector4: Column3", + "base": "DataInput_Column3_2", "details": { - "name": "Vector4: Column3" + "name": "Column3" } }, { - "base": "DataInput_Vector4: Column4", + "base": "DataInput_Column4_3", "details": { - "name": "Vector4: Column4" + "name": "Column4" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names index 60d8c29b6d..f041a0304c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names @@ -7,29 +7,29 @@ "details": { "name": "From Diagonal", "category": "Math/Matrix4x4", - "tooltip": "Returns a diagonal matrix using the supplied vector" + "tooltip": "returns a diagonal matrix using the supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names index 634489bc27..36a8f92060 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix3x3", + "name": "From Matrix 3x 3", "category": "Math/Matrix4x4", - "tooltip": "Returns a matrix from the from the Matrix3x3" + "tooltip": "returns a matrix from the from the Matrix3x3" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternion.names index abdd77ac84..59acee1602 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternion.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternion.names @@ -5,34 +5,33 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromQuaternion", + "name": "From Quaternion", "category": "Math/Matrix4x4", - "tooltip": "returns a rotation matrix using the supplied quaternion", - "subtitle": "Matrix4x4" + "tooltip": "returns a rotation matrix using the supplied quaternion" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Quaternion: Source", + "base": "DataInput_Source_0", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names index a922fb957d..74aacf6e19 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names @@ -7,35 +7,35 @@ "details": { "name": "From Quaternion And Translation", "category": "Math/Matrix4x4", - "tooltip": "Returns a skew-symmetric cross product matrix based on supplied vector" + "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Rotation", + "base": "DataInput_Rotation_0", "details": { "name": "Rotation" } }, { - "base": "DataInput_Translation", + "base": "DataInput_Translation_1", "details": { "name": "Translation" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names index 092564c7c2..fcd02e86ac 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation X Degrees", + "name": "From RotationX Degrees", "category": "Math/Matrix4x4", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around X-axis" + "tooltip": "returns a rotation matrix representing a rotation in degrees around X-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names index 1b1796ed2f..62a5e6f877 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names @@ -5,34 +5,33 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation Y Degrees", + "name": "From RotationY Degrees", "category": "Math/Matrix4x4", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around Y-axis", - "subtitle": "Matrix4x4" + "tooltip": "returns a rotation matrix representing a rotation in degrees around Y-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Number: Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names index 8b449f02a7..f41b0edc7d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Rotation Z Degrees", + "name": "From RotationZ Degrees", "category": "Math/Matrix4x4", - "tooltip": "Returns a rotation matrix representing a rotation in degrees around Z-axis" + "tooltip": "returns a rotation matrix representing a rotation in degrees around Z-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names index fba64d8d32..0f90d8ba79 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names @@ -7,47 +7,47 @@ "details": { "name": "From Rows", "category": "Math/Matrix4x4", - "tooltip": "Returns a matrix from three row" + "tooltip": "returns a matrix from three row" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Row1", + "base": "DataInput_Row1_0", "details": { - "name": "Row 1" + "name": "Row1" } }, { - "base": "DataInput_Row2", + "base": "DataInput_Row2_1", "details": { - "name": "Row 2" + "name": "Row2" } }, { - "base": "DataInput_Row3", + "base": "DataInput_Row3_2", "details": { - "name": "Row 3" + "name": "Row3" } }, { - "base": "DataInput_Row4", + "base": "DataInput_Row4_3", "details": { - "name": "Row 4" + "name": "Row4" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names index 314a856dbe..9d3e41426c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names @@ -7,32 +7,31 @@ "details": { "name": "From Scale", "category": "Math/Matrix4x4", - "tooltip": "Returns a scale matrix using the supplied vector", - "subtitle": "Matrix4x4" + "tooltip": "returns a scale matrix using the supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Scale", + "base": "DataInput_Scale_0", "details": { - "name": "Vector3: Scale" + "name": "Scale" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names index a9e0062987..adff3f7877 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names @@ -7,32 +7,31 @@ "details": { "name": "From Transform", "category": "Math/Matrix4x4", - "tooltip": "Returns a matrix using the supplied transform", - "subtitle": "Matrix4x4" + "tooltip": "returns a matrix using the supplied transform" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Transform: Transform", + "base": "DataInput_Transform_0", "details": { "name": "Transform" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names index 45af601aea..28288fa217 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names @@ -7,32 +7,31 @@ "details": { "name": "From Translation", "category": "Math/Matrix4x4", - "tooltip": "Returns a skew-symmetric cross product matrix based on supplied vector", - "subtitle": "Matrix4x4" + "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: Source", + "base": "DataInput_Source_0", "details": { - "name": "Translation" + "name": "Source" } }, { - "base": "DataOutput_Result: Matrix4x4", + "base": "DataOutput_Result_0", "details": { - "name": "Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names index fbf0e8d1c2..39572748ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names @@ -7,38 +7,37 @@ "details": { "name": "Get Column", "category": "Math/Matrix4x4", - "tooltip": "Returns vector from matrix corresponding to the Column index", - "subtitle": "Matrix4x4" + "tooltip": "returns vector from matrix corresponding to the Column index" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix4x4: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Number: Column", + "base": "DataInput_Column_1", "details": { "name": "Column" } }, { - "base": "DataOutput_Result: Vector4", + "base": "DataOutput_Result_0", "details": { - "name": "Column" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names index d9f7201afc..9a8c298188 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names @@ -7,50 +7,49 @@ "details": { "name": "Get Columns", "category": "Math/Matrix4x4", - "tooltip": "Returns all columns from matrix", - "subtitle": "Matrix4x4" + "tooltip": "returns all columns from matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix4x4: Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Column1: Vector4", + "base": "DataOutput_Column1_0", "details": { - "name": "Column 1" + "name": "Column1" } }, { - "base": "DataOutput_Column2: Vector4", + "base": "DataOutput_Column2_1", "details": { - "name": "Column 2" + "name": "Column2" } }, { - "base": "DataOutput_Column3: Vector4", + "base": "DataOutput_Column3_2", "details": { - "name": "Column 3" + "name": "Column3" } }, { - "base": "DataOutput_Column4: Vector4", + "base": "DataOutput_Column4_3", "details": { - "name": "Column 4" + "name": "Column4" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names index e1b0efe63c..d1c60e00a7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names @@ -7,29 +7,29 @@ "details": { "name": "Get Diagonal", "category": "Math/Matrix4x4", - "tooltip": "Returns vector of matrix diagonal values" + "tooltip": "returns vector of matrix diagonal values" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names index c5409e7d8f..20eae66177 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names @@ -7,41 +7,41 @@ "details": { "name": "Get Element", "category": "Math/Matrix4x4", - "tooltip": "Returns scalar from matrix corresponding to the (Row,Column) pair" + "tooltip": "returns scalar from matrix corresponding to the (Row,Column) pair" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Row", + "base": "DataInput_Row_1", "details": { "name": "Row" } }, { - "base": "DataInput_Column", + "base": "DataInput_Column_2", "details": { "name": "Column" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names index 09a624c5f3..fcf7b55e3c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names @@ -7,35 +7,35 @@ "details": { "name": "Get Row", "category": "Math/Matrix4x4", - "tooltip": "Returns vector from matrix corresponding to the Row index" + "tooltip": "returns vector from matrix corresponding to the Row index" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Row", + "base": "DataInput_Row_1", "details": { "name": "Row" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names index c189d8f68a..47f4681441 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names @@ -7,47 +7,47 @@ "details": { "name": "Get Rows", "category": "Math/Matrix4x4", - "tooltip": "Returns all rows from matrix" + "tooltip": "returns all rows from matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Row1", + "base": "DataOutput_Row1_0", "details": { "name": "Row1" } }, { - "base": "DataOutput_Row2", + "base": "DataOutput_Row2_1", "details": { "name": "Row2" } }, { - "base": "DataOutput_Row3", + "base": "DataOutput_Row3_2", "details": { "name": "Row3" } }, { - "base": "DataOutput_Row4", + "base": "DataOutput_Row4_3", "details": { "name": "Row4" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names index b035564d83..9ee8dbb79e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetTranslation", + "name": "Get Translation", "category": "Math/Matrix4x4", "tooltip": "returns translation vector from the matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names index 89adc7d466..d69062c969 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names @@ -7,29 +7,29 @@ "details": { "name": "Invert", "category": "Math/Matrix4x4", - "tooltip": "Returns inverse of Matrix" + "tooltip": "returns inverse of Matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names index 9bf12495f9..466f9e3c83 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Matrix4x4", - "tooltip": "Returns true if each element of both Matrix are equal within some tolerance" + "tooltip": "returns true if each element of both Matrix are equal within some tolerance" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names index 9fea9efe33..2438332ba5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Matrix4x4", - "tooltip": "Returns true if all numbers in matrix is finite" + "tooltip": "returns true if all numbers in matrix is finite" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names index 79bb32bbf3..5c6ff232cd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Vector", "category": "Math/Matrix4x4", - "tooltip": "Returns vector created by right left multiplying matrix by supplied vector" + "tooltip": "returns vector created by right left multiplying matrix by supplied vector" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Vector", + "base": "DataInput_Vector_1", "details": { "name": "Vector" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names index eeae11fc39..35b40a84ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names @@ -7,29 +7,29 @@ "details": { "name": "To Scale", "category": "Math/Matrix4x4", - "tooltip": "Returns scale part of the transformation matrix" + "tooltip": "returns scale part of the transformation matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names index 621a831e9a..5552f5743d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names @@ -11,25 +11,25 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names index 3a208bbab5..f131e57d79 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names @@ -11,19 +11,19 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Add.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Add.names index 9e3a0728d6..06a74eb189 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Add.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Add.names @@ -7,38 +7,37 @@ "details": { "name": "Add", "category": "Math/Number/Deprecated", - "tooltip": "Add", - "subtitle": "Deprecated" + "tooltip": "Add" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the arithmetic operation is done." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Divide.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Divide.names index 7f4e449aad..db5af885f4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Divide.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Divide.names @@ -7,38 +7,37 @@ "details": { "name": "Divide", "category": "Math/Number/Deprecated", - "tooltip": "Divide", - "subtitle": "Deprecated" + "tooltip": "Divide" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the arithmetic operation is done." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Multiply.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Multiply.names index 57be0e3fb3..d1755f18c8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Multiply.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Multiply.names @@ -7,38 +7,37 @@ "details": { "name": "Multiply", "category": "Math/Number/Deprecated", - "tooltip": "Multiply", - "subtitle": "Deprecated" + "tooltip": "Multiply" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the arithmetic operation is done." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Subtract.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Subtract.names index 4fa1764fde..8f963de916 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Subtract.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathNumberDeprecated_Subtract.names @@ -7,38 +7,37 @@ "details": { "name": "Subtract", "category": "Math/Number/Deprecated", - "tooltip": "Subtract", - "subtitle": "Deprecated" + "tooltip": "Subtract" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the arithmetic operation is done." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names index 9280f009e8..8776fb9f9a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Axis Aligned Bounding Box", - "category": "Math/Oriented Bounding Box", - "tooltip": "Converts the Source to an Oriented Bounding Box" + "name": "From Aabb", + "category": "Math/OBB", + "tooltip": "converts the Source to an OBB" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names index bc125f2c9d..6bd745fc00 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names @@ -6,42 +6,42 @@ "variant": "", "details": { "name": "From Position Rotation And Half Lengths", - "category": "Math/Oriented Bounding Box", - "tooltip": "returns an Oriented Bounding Box from the position, rotation and half lengths" + "category": "Math/OBB", + "tooltip": "returns an OBB from the position, rotation and half lengths" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Position", + "base": "DataInput_Position_0", "details": { "name": "Position" } }, { - "base": "DataInput_Rotation", + "base": "DataInput_Rotation_1", "details": { "name": "Rotation" } }, { - "base": "DataInput_HalfLengths", + "base": "DataInput_HalfLengths_2", "details": { - "name": "Half Lengths" + "name": "HalfLengths" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names index 5c2860e739..acc9b81354 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Get Axis X", - "category": "Math/Oriented Bounding Box", - "tooltip": "Returns the X-Axis of Source" + "name": "Get AxisX", + "category": "Math/OBB", + "tooltip": "returns the X-Axis of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names index d8d58baa9b..6e5fdd5fe0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Get Axis Y", - "category": "Math/Oriented Bounding Box", - "tooltip": "Returns the Y-Axis of Source" + "name": "Get AxisY", + "category": "Math/OBB", + "tooltip": "returns the Y-Axis of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names index 3f10c5cb1b..fd17b6ab97 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Get Axis Z", - "category": "Math/Oriented Bounding Box", - "tooltip": "Returns the Z-Axis of Source" + "name": "Get AxisZ", + "category": "Math/OBB", + "tooltip": "returns the Z-Axis of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names index 8165f22a9c..d1f99364fb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names @@ -6,30 +6,30 @@ "variant": "", "details": { "name": "Get Position", - "category": "Math/Oriented Bounding Box", - "tooltip": "Returns the position of Source" + "category": "Math/OBB", + "tooltip": "returns the position of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names index 6a60006d56..eb0f6401c5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names @@ -6,30 +6,30 @@ "variant": "", "details": { "name": "Is Finite", - "category": "Math/Oriented Bounding Box", - "tooltip": "Returns true if every element in Source is finite, is false" + "category": "Math/OBB", + "tooltip": "returns true if every element in Source is finite, is false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names index 5353e147be..9a11d578ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names @@ -7,35 +7,35 @@ "details": { "name": "Distance To Point", "category": "Math/Plane", - "tooltip": "Returns the closest distance from Source to Point" + "tooltip": "returns the closest distance from Source to Point" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Point", + "base": "DataInput_Point_1", "details": { "name": "Point" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names index 8fc08635fd..9e201a9994 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names @@ -7,47 +7,47 @@ "details": { "name": "From Coefficients", "category": "Math/Plane", - "tooltip": "Returns the plane that satisfies the equation Ax + By + Cz + D = 0" + "tooltip": "returns the plane that satisfies the equation Ax + By + Cz + D = 0" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_C", + "base": "DataInput_C_2", "details": { "name": "C" } }, { - "base": "DataInput_D", + "base": "DataInput_D_3", "details": { "name": "D" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names index 52e5389e0f..4a0689cd17 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names @@ -7,35 +7,35 @@ "details": { "name": "From Normal And Distance", "category": "Math/Plane", - "tooltip": "Returns the plane with the specified Normal and Distance from the origin" + "tooltip": "returns the plane with the specified Normal and Distance from the origin" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Normal", + "base": "DataInput_Normal_0", "details": { "name": "Normal" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_1", "details": { "name": "Distance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names index 3c33889597..a1b4402320 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names @@ -7,35 +7,35 @@ "details": { "name": "From Normal And Point", "category": "Math/Plane", - "tooltip": "Returns the plane which includes the Point with the specified Normal" + "tooltip": "returns the plane which includes the Point with the specified Normal" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Normal", + "base": "DataInput_Normal_0", "details": { "name": "Normal" } }, { - "base": "DataInput_Point", + "base": "DataInput_Point_1", "details": { "name": "Point" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names index 5673a596f7..f2af07c680 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names @@ -7,29 +7,29 @@ "details": { "name": "Get Distance", "category": "Math/Plane", - "tooltip": "Returns the Source's distance from the origin" + "tooltip": "returns the Source's distance from the origin" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names index 4db582ee90..a8e548c0c9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names @@ -7,29 +7,29 @@ "details": { "name": "Get Normal", "category": "Math/Plane", - "tooltip": "Returns the surface normal of Source" + "tooltip": "returns the surface normal of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names index 36c6e35769..82162af98c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names @@ -7,47 +7,47 @@ "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" + "tooltip": "returns Source's coefficient's (A, B, C, D) in the equation Ax + By + Cz + D = 0" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_A", + "base": "DataOutput_A_0", "details": { "name": "A" } }, { - "base": "DataOutput_B", + "base": "DataOutput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_C", + "base": "DataOutput_C_2", "details": { "name": "C" } }, { - "base": "DataOutput_D", + "base": "DataOutput_D_3", "details": { "name": "D" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names index 6bf24dfac5..ec8d1c181b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Plane", - "tooltip": "Returns true if Source is finite, else false" + "tooltip": "returns true if Source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names index 8ff3251e3b..49d1fe077b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names @@ -7,35 +7,35 @@ "details": { "name": "Project", "category": "Math/Plane", - "tooltip": "Returns the projection of Point onto Source" + "tooltip": "returns the projection of Point onto Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Point", + "base": "DataInput_Point_1", "details": { "name": "Point" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names index d06be76f8c..f1a7d85fd0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names @@ -7,35 +7,35 @@ "details": { "name": "Transform", "category": "Math/Plane", - "tooltip": "Returns Source transformed by Transform" + "tooltip": "returns Source transformed by Transform" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Transform", + "base": "DataInput_Transform_1", "details": { "name": "Transform" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names index 13f58a276b..cf5021610f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names @@ -7,29 +7,29 @@ "details": { "name": "Conjugate", "category": "Math/Quaternion", - "tooltip": "Returns the conjugate of the source, (-x, -y, -z, w)" + "tooltip": "returns the conjugate of the source, (-x, -y, -z, w)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names index bdf1980570..52a1be1d0c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names @@ -10,25 +10,25 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Transform", + "base": "DataInput_Transform_0", "details": { "name": "Transform" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names index 3ea8425186..f8c8f89710 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names @@ -11,37 +11,37 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Pitch", + "base": "DataInput_Pitch_0", "details": { "name": "Pitch" } }, { - "base": "DataInput_Roll", + "base": "DataInput_Roll_1", "details": { "name": "Roll" } }, { - "base": "DataInput_Yaw", + "base": "DataInput_Yaw_2", "details": { "name": "Yaw" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names index dce76a8cc0..d17ba8d861 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names @@ -7,35 +7,35 @@ "details": { "name": "Dot", "category": "Math/Quaternion", - "tooltip": "Returns the Dot product of A and B" + "tooltip": "returns the Dot product of A and B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names index 2007847335..6921811814 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Axis Angle (Degrees)", + "name": "From Axis Angle Degrees", "category": "Math/Quaternion", - "tooltip": "Returns the rotation created from Axis the angle Degrees" + "tooltip": "returns the rotation created from Axis the angle Degrees" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Axis", + "base": "DataInput_Axis_0", "details": { "name": "Axis" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_1", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names index 646714b48d..00dea8ed2c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix3x3", + "name": "From Matrix 3x 3", "category": "Math/Quaternion", - "tooltip": "Returns a rotation created from the 3x3 matrix source" + "tooltip": "returns a rotation created from the 3x3 matrix source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names index b6b38f7297..793b3535e7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix4x4", + "name": "From Matrix 4x 4", "category": "Math/Quaternion", - "tooltip": "Returns a rotation created from the 4x4 matrix source" + "tooltip": "returns a rotation created from the 4x4 matrix source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names index 9fb08ffa2b..7961a836fe 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names @@ -7,29 +7,29 @@ "details": { "name": "From Transform", "category": "Math/Quaternion", - "tooltip": "Returns a rotation created from the rotation part of the transform source" + "tooltip": "returns a rotation created from the rotation part of the transform source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names index ceeebae083..80bf8b6d94 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names @@ -7,29 +7,29 @@ "details": { "name": "Invert Full", "category": "Math/Quaternion", - "tooltip": "Returns the inverse for any rotation, not just unit rotations" + "tooltip": "returns the inverse for any rotation, not just unit rotations" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names index 302acb0e94..962de452f1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Quaternion", - "tooltip": "Returns true if A and B are within Tolerance of each other" + "tooltip": "returns true if A and B are within Tolerance of each other" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names index deda4ab105..53e98df1ca 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Quaternion", - "tooltip": "Returns true if every element in Source is finite" + "tooltip": "returns true if every element in Source is finite" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names index b4cda49248..dbede4c06f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names @@ -7,35 +7,35 @@ "details": { "name": "Is Identity", "category": "Math/Quaternion", - "tooltip": "Returns true if Source is within Tolerance of the Identity rotation" + "tooltip": "returns true if Source is within Tolerance of the Identity rotation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names index 99bde6bd2b..94158d1744 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names @@ -7,35 +7,35 @@ "details": { "name": "Is Zero", "category": "Math/Quaternion", - "tooltip": "Returns true if Source is within Tolerance of the Zero rotation" + "tooltip": "returns true if Source is within Tolerance of the Zero rotation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names index 591b61fb3a..00b3b45081 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names @@ -7,29 +7,29 @@ "details": { "name": "Length Reciprocal", "category": "Math/Quaternion", - "tooltip": "Returns the reciprocal length of Source" + "tooltip": "returns the reciprocal length of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names index 1c50bdc5e6..4a5dff7480 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names @@ -7,29 +7,29 @@ "details": { "name": "Length Squared", "category": "Math/Quaternion", - "tooltip": "Returns the square of the length of Source" + "tooltip": "returns the square of the length of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names index 11bb5d0816..c85e98643f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names @@ -7,41 +7,41 @@ "details": { "name": "Lerp", "category": "Math/Quaternion", - "tooltip": "Returns a the linear interpolation between From and To by the amount T" + "tooltip": "returns a the linear interpolation between From and To by the amount T" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names index d632a64250..0515825242 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Number", "category": "Math/Quaternion", - "tooltip": "Returns the Source with each element multiplied by Multiplier" + "tooltip": "returns the Source with each element multiplied by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names index effceed57e..bfb9c642bd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names @@ -7,29 +7,29 @@ "details": { "name": "Negate", "category": "Math/Quaternion", - "tooltip": "Returns the Source with each element negated" + "tooltip": "returns the Source with each element negated" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names index 83adfd8e38..38d4ab42ec 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names @@ -7,29 +7,29 @@ "details": { "name": "Normalize", "category": "Math/Quaternion", - "tooltip": "Returns the normalized version of Source" + "tooltip": "returns the normalized version of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names index a18c86703c..17098ac745 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotate Vector3", + "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Quaternion", + "base": "DataInput_Quaternion_0", "details": { "name": "Quaternion" } }, { - "base": "DataInput_Vector", + "base": "DataInput_Vector_1", "details": { "name": "Vector" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names index ad554e2364..6b44d7cb7b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation X (Degrees)", + "name": "RotationX Degrees", "category": "Math/Quaternion", - "tooltip": "Creates a rotation of Degrees around the x-axis" + "tooltip": "creates a rotation of Degrees around the x-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names index 047af94ec0..5821211706 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation Y (Degrees)", + "name": "RotationY Degrees", "category": "Math/Quaternion", - "tooltip": "Creates a rotation of Degrees around the y-axis" + "tooltip": "creates a rotation of Degrees around the y-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names index abd872aa1c..0e48e214a1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation Z (Degrees)", + "name": "RotationZ Degrees", "category": "Math/Quaternion", - "tooltip": "Creates a rotation of Degrees around the z-axis" + "tooltip": "creates a rotation of Degrees around the z-axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names index 7bed39e779..e08982faeb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names @@ -7,35 +7,35 @@ "details": { "name": "Shortest Arc", "category": "Math/Quaternion", - "tooltip": "Creates a rotation representing the shortest arc between From and To" + "tooltip": "creates a rotation representing the shortest arc between From and To" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names index f5a9f2333c..eccaf84a6f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names @@ -7,41 +7,41 @@ "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" + "tooltip": "returns the spherical linear interpolation between From and To by the amount T, the result is NOT normalized" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names index 2c0915cb83..1205b6cb84 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names @@ -7,53 +7,53 @@ "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)" + "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_In", + "base": "DataInput_In_2", "details": { "name": "In" } }, { - "base": "DataInput_Out", + "base": "DataInput_Out_3", "details": { "name": "Out" } }, { - "base": "DataInput_T", + "base": "DataInput_T_4", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names index cdfeaaa8e7..cc57f52606 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "To Angle (Degrees)", + "name": "To Angle Degrees", "category": "Math/Quaternion", - "tooltip": "Returns the angle of angle-axis pair that Source represents in degrees" + "tooltip": "returns the angle of angle-axis pair that Source represents in degrees" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names index 74c0f7e2e3..74a47ea568 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names @@ -11,31 +11,31 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names index 3fa603ca9a..3b32743229 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names @@ -11,31 +11,31 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names index 0e3131a398..009fd55a8a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names @@ -7,35 +7,35 @@ "details": { "name": "Random Integer", "category": "Math/Random", - "tooltip": "Returns a random integer [Min, Max]" + "tooltip": "returns a random integer [Min, Max]" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names index f2208525d2..e441a5011e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Random Number", "category": "Math/Random", - "tooltip": "Returns a random real number [Min, Max]" + "tooltip": "returns a random real number [Min, Max]" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names index fb23ddf7c2..fc877f24aa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names @@ -7,53 +7,53 @@ "details": { "name": "Random Point In Arc", "category": "Math/Random", - "tooltip": "Returns a random point in the specified arc" + "tooltip": "returns a random point in the specified arc" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Origin", + "base": "DataInput_Origin_0", "details": { "name": "Origin" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_1", "details": { "name": "Direction" } }, { - "base": "DataInput_Normal", + "base": "DataInput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_3", "details": { "name": "Radius" } }, { - "base": "DataInput_Angle", + "base": "DataInput_Angle_4", "details": { "name": "Angle" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names index a5cd2fdeac..6b65ca9940 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point In Box", "category": "Math/Random", - "tooltip": "Returns a random point in a box" + "tooltip": "returns a random point in a box" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Dimensions", + "base": "DataInput_Dimensions_0", "details": { "name": "Dimensions" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names index e4dbeb4dd3..c87ca2880a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point In Circle", "category": "Math/Random", - "tooltip": "Returns a random point inside the area of a circle" + "tooltip": "returns a random point inside the area of a circle" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names index 4c7270d0f4..756ae87ce1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names @@ -7,35 +7,35 @@ "details": { "name": "Random Point In Cone", "category": "Math/Random", - "tooltip": "Returns a random point in a cone" + "tooltip": "returns a random point in a cone" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataInput_Angle", + "base": "DataInput_Angle_1", "details": { "name": "Angle" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names index 92dcefe8c7..655e5512ee 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names @@ -7,35 +7,35 @@ "details": { "name": "Random Point In Cylinder", "category": "Math/Random", - "tooltip": "Returns a random point in a cylinder" + "tooltip": "returns a random point in a cylinder" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataInput_Height", + "base": "DataInput_Height_1", "details": { "name": "Height" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names index 21d3ca2f96..67e9387d22 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point In Ellipsoid", "category": "Math/Random", - "tooltip": "Returns a random point in an ellipsoid" + "tooltip": "returns a random point in an ellipsoid" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Dimensions", + "base": "DataInput_Dimensions_0", "details": { "name": "Dimensions" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names index 60d4a9cbd8..b135084d49 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point In Sphere", "category": "Math/Random", - "tooltip": "Returns a random point in a sphere" + "tooltip": "returns a random point in a sphere" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names index 82d6f6e156..0c176a2897 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point In Square", "category": "Math/Random", - "tooltip": "Returns a random point in a square" + "tooltip": "returns a random point in a square" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Dimensions", + "base": "DataInput_Dimensions_0", "details": { "name": "Dimensions" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names index 401c3afcb4..33c2b9eec3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names @@ -7,59 +7,59 @@ "details": { "name": "Random Point In Wedge", "category": "Math/Random", - "tooltip": "Returns a random point in the specified wedge" + "tooltip": "returns a random point in the specified wedge" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Origin", + "base": "DataInput_Origin_0", "details": { "name": "Origin" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_1", "details": { "name": "Direction" } }, { - "base": "DataInput_Normal", + "base": "DataInput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_3", "details": { "name": "Radius" } }, { - "base": "DataInput_Height", + "base": "DataInput_Height_4", "details": { "name": "Height" } }, { - "base": "DataInput_Angle", + "base": "DataInput_Angle_5", "details": { "name": "Angle" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names index 39433c405e..16a3a0f396 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point On Circle", "category": "Math/Random", - "tooltip": "Returns a random point on the circumference of a circle" + "tooltip": "returns a random point on the circumference of a circle" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names index 6e54bb7d72..e2f6db1112 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names @@ -7,29 +7,29 @@ "details": { "name": "Random Point On Sphere", "category": "Math/Random", - "tooltip": "Returns a random point on the surface of a sphere" + "tooltip": "returns a random point on the surface of a sphere" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_0", "details": { "name": "Radius" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names index ccae17450c..e4813c0dc5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names @@ -7,35 +7,35 @@ "details": { "name": "Random Quaternion", "category": "Math/Random", - "tooltip": "Returns a random quaternion" + "tooltip": "returns a random quaternion" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names index e1b9340392..22c7e14c01 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names @@ -5,25 +5,25 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Random Unit Vector2", + "name": "Random Unit Vector 2", "category": "Math/Random", - "tooltip": "Returns a random Vector2 direction" + "tooltip": "returns a random Vector2 direction" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names index 06990bde99..e5a11144d9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names @@ -5,25 +5,25 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Random Unit Vector3", + "name": "Random Unit Vector 3", "category": "Math/Random", - "tooltip": "Returns a random Vector3 direction" + "tooltip": "returns a random Vector3 direction" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names index 0128628cb4..07b1d1930d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Random Vector2", + "name": "Random Vector 2", "category": "Math/Random", - "tooltip": "Returns a random Vector2" + "tooltip": "returns a random Vector2" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names index d77f6e96c6..8711307413 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Random Vector3", + "name": "Random Vector 3", "category": "Math/Random", - "tooltip": "Returns a random Vector3" + "tooltip": "returns a random Vector3" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names index df7bd9384f..045f653c45 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Random Vector4", + "name": "Random Vector 4", "category": "Math/Random", - "tooltip": "Returns a random Vector4" + "tooltip": "returns a random Vector4" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_0", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_1", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names index 70826cd581..8c3f7f8cfa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix3x3", + "name": "From Matrix 3x 3", "category": "Math/Transform", - "tooltip": "Returns a transform with from 3x3 matrix and with the translation set to zero" + "tooltip": "returns a transform with from 3x3 matrix and with the translation set to zero" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names index a64be79b93..583e0aa059 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "From Matrix3x3 And Translation", + "name": "From Matrix 3x 3 And Translation", "category": "Math/Transform", - "tooltip": "Returns a transform from the 3x3 matrix and the translation" + "tooltip": "returns a transform from the 3x3 matrix and the translation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Matrix", + "base": "DataInput_Matrix_0", "details": { "name": "Matrix" } }, { - "base": "DataInput_Translation", + "base": "DataInput_Translation_1", "details": { "name": "Translation" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names index db1f5d7706..f8cb3a7033 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names @@ -7,29 +7,29 @@ "details": { "name": "From Rotation", "category": "Math/Transform", - "tooltip": "Returns a transform from the rotation and with the translation set to zero" + "tooltip": "returns a transform from the rotation and with the translation set to zero" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names index 0a44bbe29f..3474a53f52 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names @@ -7,35 +7,35 @@ "details": { "name": "From Rotation And Translation", "category": "Math/Transform", - "tooltip": "Returns a transform from the rotation and the translation" + "tooltip": "returns a transform from the rotation and the translation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Rotation", + "base": "DataInput_Rotation_0", "details": { "name": "Rotation" } }, { - "base": "DataInput_Translation", + "base": "DataInput_Translation_1", "details": { "name": "Translation" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names index 071ead3598..59bbce441f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names @@ -7,29 +7,29 @@ "details": { "name": "From Scale", "category": "Math/Transform", - "tooltip": "Returns a transform which applies the specified uniform Scale, but no rotation or translation" + "tooltip": "returns a transform which applies the specified uniform Scale, but no rotation or translation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_0", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names index 391dfd9bee..20cad0b8f5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names @@ -7,29 +7,29 @@ "details": { "name": "From Translation", "category": "Math/Transform", - "tooltip": "Returns a translation matrix and the rotation set to zero" + "tooltip": "returns a translation matrix and the rotation set to zero" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Translation", + "base": "DataInput_Translation_0", "details": { "name": "Translation" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names index 9356423bc4..1894819e38 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names @@ -7,35 +7,35 @@ "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)" + "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names index 8723a54349..5a3d979a9d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names @@ -7,35 +7,35 @@ "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)" + "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names index 276db70fa1..0d56cee4df 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names @@ -7,29 +7,29 @@ "details": { "name": "Get Translation", "category": "Math/Transform", - "tooltip": "Returns the translation of Source" + "tooltip": "returns the translation of Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names index cf3dbd3e8c..a1baecdfdb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names @@ -7,35 +7,35 @@ "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)" + "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names index 65af93c3d0..936f1f52cb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names @@ -7,41 +7,41 @@ "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" + "tooltip": "returns true if every row of A is within Tolerance of corresponding row in B, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names index f98506dd62..38a8b05377 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Transform", - "tooltip": "Returns true if every row of source is finite, else false" + "tooltip": "returns true if every row of source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names index f4dd80a4a2..f55e2af0bd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names @@ -7,35 +7,35 @@ "details": { "name": "Is Orthogonal", "category": "Math/Transform", - "tooltip": "Returns true if the upper 3x3 matrix of Source is within Tolerance of orthogonal, else false" + "tooltip": "returns true if the upper 3x3 matrix of Source is within Tolerance of orthogonal, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names index f8bcbc41a7..6e38a48fee 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Uniform Scale", "category": "Math/Transform", - "tooltip": "Returns Source multiplied uniformly by Scale" + "tooltip": "returns Source multiplied uniformly by Scale" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_1", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names index d51e766840..ae3f713886 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Multiply By Vector3", + "name": "Multiply By Vector 3", "category": "Math/Transform", - "tooltip": "Returns Source post multiplied by Multiplier" + "tooltip": "returns Source post multiplied by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names index 2e11891d0f..9ccc2c12ff 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Multiply By Vector4", + "name": "Multiply By Vector 4", "category": "Math/Transform", - "tooltip": "Returns Source post multiplied by Multiplier" + "tooltip": "returns Source post multiplied by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names index 94598629b6..6a4691eb4d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names @@ -7,29 +7,29 @@ "details": { "name": "Orthogonalize", "category": "Math/Transform", - "tooltip": "Returns an orthogonal matrix if the Source is almost orthogonal" + "tooltip": "returns an orthogonal matrix if the Source is almost orthogonal" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names index 353eb26615..3483c6b3ce 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation X (Degrees)", + "name": "RotationX Degrees", "category": "Math/Transform", - "tooltip": "Returns a transform representing a rotation Degrees around the X-Axis" + "tooltip": "returns a transform representing a rotation Degrees around the X-Axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names index d5f5469593..57d72f8e16 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation Y (Degrees)", + "name": "RotationY Degrees", "category": "Math/Transform", - "tooltip": "Returns a transform representing a rotation Degrees around the Y-Axis" + "tooltip": "returns a transform representing a rotation Degrees around the Y-Axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names index 8431b15578..8564b42541 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names @@ -5,31 +5,31 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Rotation Z (Degrees)", + "name": "RotationZ Degrees", "category": "Math/Transform", - "tooltip": "Returns a transform representing a rotation Degrees around the Z-Axis" + "tooltip": "returns a transform representing a rotation Degrees around the Z-Axis" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Degrees", + "base": "DataInput_Degrees_0", "details": { "name": "Degrees" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names index 531f0b1b38..a18853d95d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names @@ -7,29 +7,29 @@ "details": { "name": "To Scale", "category": "Math/Transform", - "tooltip": "Returns the uniform scale of the Source" + "tooltip": "returns the uniform scale of the Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names index bd72341c6d..49c80b7cab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names @@ -7,29 +7,29 @@ "details": { "name": "Absolute", "category": "Math/Vector2", - "tooltip": "Returns a vector with the absolute values of the elements of the source" + "tooltip": "returns a vector with the absolute values of the elements of the source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names index 7efe070c80..cdf2bbcdb7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names @@ -7,29 +7,29 @@ "details": { "name": "Angle", "category": "Math/Vector2", - "tooltip": "Returns a unit length vector from an angle in radians" + "tooltip": "returns a unit length vector from an angle in radians" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Angle", + "base": "DataInput_Angle_0", "details": { "name": "Angle" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names index 2a4f580d95..57e7569bc2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names @@ -7,41 +7,41 @@ "details": { "name": "Clamp", "category": "Math/Vector2", - "tooltip": "Returns vector clamped to [min, max] and equal to source if possible" + "tooltip": "returns vector clamped to [min, max] and equal to source if possible" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_1", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_2", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names index 58ef596560..d6eb1a6b5f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names @@ -11,37 +11,37 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_2", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names index 5d6b79ef69..787b44de82 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names @@ -7,35 +7,35 @@ "details": { "name": "Distance", "category": "Math/Vector2", - "tooltip": "Returns the distance from B to A, that is the magnitude of the vector (A - B)" + "tooltip": "returns the distance from B to A, that is the magnitude of the vector (A - B)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names index cc12b409ee..43fab99734 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names @@ -7,35 +7,35 @@ "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)" + "tooltip": "returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names index 19db3eb635..08578bdf77 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names @@ -7,35 +7,35 @@ "details": { "name": "Dot", "category": "Math/Vector2", - "tooltip": "Returns the vector dot product of A dot B" + "tooltip": "returns the vector dot product of A dot B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names index d68a9ffc30..b6078271fe 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names @@ -7,35 +7,35 @@ "details": { "name": "From Values", "category": "Math/Vector2", - "tooltip": "Returns a vector from elements" + "tooltip": "returns a vector from elements" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_X", + "base": "DataInput_X_0", "details": { "name": "X" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names index bcd119556c..fb5cc44f25 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names @@ -7,35 +7,35 @@ "details": { "name": "Get Element", "category": "Math/Vector2", - "tooltip": "Returns the element corresponding to the index (0 -> x) (1 -> y)" + "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Index", + "base": "DataInput_Index_1", "details": { "name": "Index" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names index 4146bc08de..caf90e9d61 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Vector2", - "tooltip": "Returns true if the difference between A and B is less than tolerance, else false" + "tooltip": "returns true if the difference between A and B is less than tolerance, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names index 9b45bb21b7..050662feff 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Vector2", - "tooltip": "Returns true if every element in the source is finite, else false" + "tooltip": "returns true if every element in the source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names index 151baa29b0..9d8dbff14d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names @@ -7,35 +7,35 @@ "details": { "name": "Is Normalized", "category": "Math/Vector2", - "tooltip": "Returns true if the length of the source is within tolerance of 1.0, else false" + "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names index 3f183cfe56..f0b7d32768 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names @@ -7,35 +7,35 @@ "details": { "name": "Is Zero", "category": "Math/Vector2", - "tooltip": "Returns true if A is within tolerance of the zero vector, else false" + "tooltip": "returns true if A is within tolerance of the zero vector, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names index cb76ac347b..f88ed3b3f7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names @@ -7,29 +7,29 @@ "details": { "name": "Length", "category": "Math/Vector2", - "tooltip": "Returns the magnitude of source" + "tooltip": "returns the magnitude of source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names index 112d82d5e3..8691e634d2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names @@ -7,29 +7,29 @@ "details": { "name": "Length Squared", "category": "Math/Vector2", - "tooltip": "Returns the magnitude squared of the source, generally faster than getting the exact length" + "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names index 49711526b7..a1e6ebf739 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names @@ -7,41 +7,41 @@ "details": { "name": "Lerp", "category": "Math/Vector2", - "tooltip": "Returns the linear interpolation (From + ((To - From) * T)" + "tooltip": "returns the linear interpolation (From + ((To - From) * T)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names index d6ff44c21c..5f76551e9d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names @@ -7,35 +7,35 @@ "details": { "name": "Max", "category": "Math/Vector2", - "tooltip": "Returns the vector (max(A.x, B.x), max(A.y, B.y))" + "tooltip": "returns the vector (max(A.x, B.x), max(A.y, B.y))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names index 5563f69c00..737ae89554 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names @@ -7,35 +7,35 @@ "details": { "name": "Min", "category": "Math/Vector2", - "tooltip": "Returns the vector (min(A.x, B.x), min(A.y, B.y))" + "tooltip": "returns the vector (min(A.x, B.x), min(A.y, B.y))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names index f63137d25f..cf592cd151 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Number", "category": "Math/Vector2", - "tooltip": "Returns the vector Source with each element multiplied by Multiplier" + "tooltip": "returns the vector Source with each element multiplied by Multiplier" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names index 1eb48cf3a5..5aa72fe327 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names @@ -7,29 +7,29 @@ "details": { "name": "Negate", "category": "Math/Vector2", - "tooltip": "Returns the vector Source with each element multiplied by -1" + "tooltip": "returns the vector Source with each element multiplied by -1" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names index ae4ee365ef..1dc7e0ac99 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names @@ -7,29 +7,29 @@ "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" + "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names index e6bd531852..2aba28f2ed 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names @@ -7,35 +7,35 @@ "details": { "name": "Project", "category": "Math/Vector2", - "tooltip": "Returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" + "tooltip": "returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names index 4a96a8154e..d2e7b90095 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set X", + "name": "SetX", "category": "Math/Vector2", - "tooltip": "Returns a the vector(X, Source.Y)" + "tooltip": "returns a the vector(X, Source.Y)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_X", + "base": "DataInput_X_1", "details": { "name": "X" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names index bdde07b53c..db6c5072a4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set Y", + "name": "SetY", "category": "Math/Vector2", - "tooltip": "Returns a the vector(Source.X, Y)" + "tooltip": "returns a the vector(Source.X, Y)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names index 26b5579174..24ad2a5b8e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names @@ -7,41 +7,41 @@ "details": { "name": "Slerp", "category": "Math/Vector2", - "tooltip": "Returns a vector that is the spherical linear interpolation T, between From and To" + "tooltip": "returns a vector that is the spherical linear interpolation T, between From and To" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names index f78ec6a232..64488f330a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names @@ -7,29 +7,29 @@ "details": { "name": "To Perpendicular", "category": "Math/Vector2", - "tooltip": "Returns the vector (-Source.y, Source.x), a 90 degree, positive rotation" + "tooltip": "returns the vector (-Source.y, Source.x), a 90 degree, positive rotation" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names index a20c7413d7..4281eb162b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names @@ -7,29 +7,29 @@ "details": { "name": "Absolute", "category": "Math/Vector3", - "tooltip": "Returns a vector with the absolute values of the elements of the source" + "tooltip": "returns a vector with the absolute values of the elements of the source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names index 8f08fb24c2..7f93c15e41 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names @@ -7,35 +7,35 @@ "details": { "name": "Build Tangent Basis", "category": "Math/Vector3", - "tooltip": "Returns a tangent basis from the normal" + "tooltip": "returns a tangent basis from the normal" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Normal", + "base": "DataInput_Normal_0", "details": { "name": "Normal" } }, { - "base": "DataOutput_Tangent", + "base": "DataOutput_Tangent_0", "details": { "name": "Tangent" } }, { - "base": "DataOutput_Bitangent", + "base": "DataOutput_Bitangent_1", "details": { "name": "Bitangent" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names index 15109364fd..a5ccbaa27d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names @@ -7,41 +7,41 @@ "details": { "name": "Clamp", "category": "Math/Vector3", - "tooltip": "Returns vector clamped to [min, max] and equal to source if possible" + "tooltip": "returns vector clamped to [min, max] and equal to source if possible" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Min", + "base": "DataInput_Min_1", "details": { "name": "Min" } }, { - "base": "DataInput_Max", + "base": "DataInput_Max_2", "details": { "name": "Max" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names index a23b88920e..c14d744da9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names @@ -7,35 +7,35 @@ "details": { "name": "Cross", "category": "Math/Vector3", - "tooltip": "Returns the vector cross product of A X B" + "tooltip": "returns the vector cross product of A X B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names index 5071b5d52c..4d663478aa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names @@ -11,37 +11,37 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_2", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names index 3d38a8d9d1..f21bd649b9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names @@ -7,35 +7,35 @@ "details": { "name": "Distance", "category": "Math/Vector3", - "tooltip": "Returns the distance from B to A, that is the magnitude of the vector (A - B)" + "tooltip": "returns the distance from B to A, that is the magnitude of the vector (A - B)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names index 56f45fbec4..d955098b71 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names @@ -7,35 +7,35 @@ "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)" + "tooltip": "returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names index c86dac30a0..95ab3e2d3d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names @@ -7,35 +7,35 @@ "details": { "name": "Dot", "category": "Math/Vector3", - "tooltip": "Returns the vector dot product of A dot B" + "tooltip": "returns the vector dot product of A dot B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names index 10831f85ed..e640a3b0e0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names @@ -7,41 +7,41 @@ "details": { "name": "From Values", "category": "Math/Vector3", - "tooltip": "Returns a vector from elements" + "tooltip": "returns a vector from elements" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_X", + "base": "DataInput_X_0", "details": { "name": "X" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataInput_Z", + "base": "DataInput_Z_2", "details": { "name": "Z" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names index ae6ce083ac..1e683d24a2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names @@ -7,35 +7,35 @@ "details": { "name": "Get Element", "category": "Math/Vector3", - "tooltip": "Returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z)" + "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Index", + "base": "DataInput_Index_1", "details": { "name": "Index" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names index 5e5c09923c..e1278a293d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Vector3", - "tooltip": "Returns true if the difference between A and B is less than tolerance, else false" + "tooltip": "returns true if the difference between A and B is less than tolerance, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names index e527e8bf35..c916809a96 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Vector3", - "tooltip": "Returns true if every element in the source is finite, else false" + "tooltip": "returns true if every element in the source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names index e9f64e84fb..84ffdc22f2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names @@ -7,35 +7,35 @@ "details": { "name": "Is Normalized", "category": "Math/Vector3", - "tooltip": "Returns true if the length of the source is within tolerance of 1.0, else false" + "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names index c4adec6436..2a08ec2a0f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names @@ -7,41 +7,41 @@ "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" + "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names index f65485eb78..22369c83eb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names @@ -7,35 +7,35 @@ "details": { "name": "Is Zero", "category": "Math/Vector3", - "tooltip": "Returns true if A is within tolerance of the zero vector, else false" + "tooltip": "returns true if A is within tolerance of the zero vector, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names index 6861dab138..1048e34e55 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names @@ -7,29 +7,29 @@ "details": { "name": "Length", "category": "Math/Vector3", - "tooltip": "Returns the magnitude of source" + "tooltip": "returns the magnitude of source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names index 12ded27f2e..26d305ab5a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names @@ -7,29 +7,29 @@ "details": { "name": "Length Reciprocal", "category": "Math/Vector3", - "tooltip": "Returns the 1 / magnitude of the source" + "tooltip": "returns the 1 / magnitude of the source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names index 9a97dbb263..81bc413403 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names @@ -7,29 +7,29 @@ "details": { "name": "Length Squared", "category": "Math/Vector3", - "tooltip": "Returns the magnitude squared of the source, generally faster than getting the exact length" + "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names index c320ce31a5..4dfc86f953 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names @@ -7,41 +7,41 @@ "details": { "name": "Lerp", "category": "Math/Vector3", - "tooltip": "Returns the linear interpolation (From + ((To - From) * T)" + "tooltip": "returns the linear interpolation (From + ((To - From) * T)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names index d429e45202..9377255408 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names @@ -7,35 +7,35 @@ "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))" + "tooltip": "returns the vector (max(A.x, B.x), max(A.y, B.y), max(A.z, B.z))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names index eef2baf012..ae84d7da5e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names @@ -7,35 +7,35 @@ "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))" + "tooltip": "returns the vector (min(A.x, B.x), min(A.y, B.y), min(A.z, B.z))" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names index 9637449b22..d000076f9c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Number", "category": "Math/Vector3", - "tooltip": "Returns the vector Source with each element multiplied by Multipler" + "tooltip": "returns the vector Source with each element multiplied by Multipler" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names index b0fa0beae4..4e71256752 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names @@ -7,29 +7,29 @@ "details": { "name": "Negate", "category": "Math/Vector3", - "tooltip": "Returns the vector Source with each element multiplied by -1" + "tooltip": "returns the vector Source with each element multiplied by -1" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names index a0f535b4d4..73cbdbb7b3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names @@ -7,29 +7,29 @@ "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" + "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names index ff18755ecb..862d7c06a6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names @@ -7,35 +7,35 @@ "details": { "name": "Project", "category": "Math/Vector3", - "tooltip": "Returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" + "tooltip": "returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names index de65bf82ea..a5120d6279 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names @@ -7,29 +7,29 @@ "details": { "name": "Reciprocal", "category": "Math/Vector3", - "tooltip": "Returns the vector (1/x, 1/y, 1/z) with elements from Source" + "tooltip": "returns the vector (1/x, 1/y, 1/z) with elements from Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names index 7db313ffca..a70f83b745 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set X", + "name": "SetX", "category": "Math/Vector3", - "tooltip": "Returns a the vector(X, Source.Y, Source.Z)" + "tooltip": "returns a the vector(X, Source.Y, Source.Z)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_X", + "base": "DataInput_X_1", "details": { "name": "X" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names index db5299df5b..f5c78805c2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set Y", + "name": "SetY", "category": "Math/Vector3", - "tooltip": "Returns a the vector(Source.X, Y, Source.Z)" + "tooltip": "returns a the vector(Source.X, Y, Source.Z)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names index c8239d2d46..870826d84b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set Z", + "name": "SetZ", "category": "Math/Vector3", - "tooltip": "Returns a the vector(Source.X, Source.Y, Z)" + "tooltip": "returns a the vector(Source.X, Source.Y, Z)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Z", + "base": "DataInput_Z_1", "details": { "name": "Z" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names index 5052d03400..3eee6e3d05 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names @@ -7,41 +7,41 @@ "details": { "name": "Slerp", "category": "Math/Vector3", - "tooltip": "Returns a vector that is the spherical linear interpolation T, between From and To" + "tooltip": "returns a vector that is the spherical linear interpolation T, between From and To" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_T", + "base": "DataInput_T_2", "details": { "name": "T" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names index c5ebee0f5a..5f955d54b6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names @@ -7,29 +7,29 @@ "details": { "name": "Absolute", "category": "Math/Vector4", - "tooltip": "Returns a vector with the absolute values of the elements of the source" + "tooltip": "returns a vector with the absolute values of the elements of the source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names index e8ab09461e..55c3f0dc5f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names @@ -11,37 +11,37 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_From", + "base": "DataInput_From_0", "details": { "name": "From" } }, { - "base": "DataInput_To", + "base": "DataInput_To_1", "details": { "name": "To" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_2", "details": { "name": "Scale" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names index d780f4379b..b4022c9aad 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names @@ -7,35 +7,35 @@ "details": { "name": "Dot", "category": "Math/Vector4", - "tooltip": "Returns the vector dot product of A dot B" + "tooltip": "returns the vector dot product of A dot B" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names index 1f362d71f9..8e0f291742 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names @@ -7,47 +7,47 @@ "details": { "name": "From Values", "category": "Math/Vector4", - "tooltip": "Returns a vector from elements" + "tooltip": "returns a vector from elements" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_X", + "base": "DataInput_X_0", "details": { "name": "X" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataInput_Z", + "base": "DataInput_Z_2", "details": { "name": "Z" } }, { - "base": "DataInput_W", + "base": "DataInput_W_3", "details": { "name": "W" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names index f09bda9acf..4d8ee5cc43 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names @@ -7,35 +7,35 @@ "details": { "name": "Get Element", "category": "Math/Vector4", - "tooltip": "Returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z) (3 -> w)" + "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z) (3 -> w)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Index", + "base": "DataInput_Index_1", "details": { "name": "Index" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names index 5881c02adb..a94b2e24fd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names @@ -7,41 +7,41 @@ "details": { "name": "Is Close", "category": "Math/Vector4", - "tooltip": "Returns true if the difference between A and B is less than tolerance, else false" + "tooltip": "returns true if the difference between A and B is less than tolerance, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_A", + "base": "DataInput_A_0", "details": { "name": "A" } }, { - "base": "DataInput_B", + "base": "DataInput_B_1", "details": { "name": "B" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_2", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names index 9e1c8e5ba0..6a24bbc17a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names @@ -7,29 +7,29 @@ "details": { "name": "Is Finite", "category": "Math/Vector4", - "tooltip": "Returns true if every element in the source is finite, else false" + "tooltip": "returns true if every element in the source is finite, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names index 92b367b6e2..800ff856e2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names @@ -7,35 +7,35 @@ "details": { "name": "Is Normalized", "category": "Math/Vector4", - "tooltip": "Returns true if the length of the source is within tolerance of 1.0, else false" + "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names index 6d2bacb0b2..2d6526e973 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names @@ -7,35 +7,35 @@ "details": { "name": "Is Zero", "category": "Math/Vector4", - "tooltip": "Returns true if A is within tolerance of the zero vector, else false" + "tooltip": "returns true if A is within tolerance of the zero vector, else false" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Tolerance", + "base": "DataInput_Tolerance_1", "details": { "name": "Tolerance" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names index 2aa5585b43..c9c6c5fb45 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names @@ -7,29 +7,29 @@ "details": { "name": "Length", "category": "Math/Vector4", - "tooltip": "Returns the magnitude of source" + "tooltip": "returns the magnitude of source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names index 4affd32f7c..9f34b605c0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names @@ -7,29 +7,29 @@ "details": { "name": "Length Reciprocal", "category": "Math/Vector4", - "tooltip": "Returns the 1 / magnitude of the source" + "tooltip": "returns the 1 / magnitude of the source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names index 1abb6d4e9b..2404613170 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names @@ -7,29 +7,29 @@ "details": { "name": "Length Squared", "category": "Math/Vector4", - "tooltip": "Returns the magnitude squared of the source, generally faster than getting the exact length" + "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names index c9cd4b2513..68624b8316 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names @@ -7,35 +7,35 @@ "details": { "name": "Multiply By Number", "category": "Math/Vector4", - "tooltip": "Returns the vector Source with each element multiplied by Multipler" + "tooltip": "returns the vector Source with each element multiplied by Multipler" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names index 74da5c724d..d2cf095379 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names @@ -7,29 +7,29 @@ "details": { "name": "Negate", "category": "Math/Vector4", - "tooltip": "Returns the vector Source with each element multiplied by -1" + "tooltip": "returns the vector Source with each element multiplied by -1" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names index 9d51b0e78d..b8159887c2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names @@ -7,29 +7,29 @@ "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" + "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", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names index f493b7bf20..502cd22c37 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names @@ -7,29 +7,29 @@ "details": { "name": "Reciprocal", "category": "Math/Vector4", - "tooltip": "Returns the vector (1/x, 1/y, 1/z, 1/w) with elements from Source" + "tooltip": "returns the vector (1/x, 1/y, 1/z, 1/w) with elements from Source" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names index c89ebd7840..1797b85b69 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set W", + "name": "SetW", "category": "Math/Vector4", - "tooltip": "Returns a the vector(Source.X, Source.Y, Source.Z, W)" + "tooltip": "returns a the vector(Source.X, Source.Y, Source.Z, W)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_W", + "base": "DataInput_W_1", "details": { "name": "W" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names index b9b9e96845..b1a2f8d94f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set X", + "name": "SetX", "category": "Math/Vector4", - "tooltip": "Returns a the vector(X, Source.Y, Source.Z, Source.W)" + "tooltip": "returns a the vector(X, Source.Y, Source.Z, Source.W)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_X", + "base": "DataInput_X_1", "details": { "name": "X" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names index f0f2b04cf8..533a7178bd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set Y", + "name": "SetY", "category": "Math/Vector4", - "tooltip": "Returns a the vector(Source.X, Y, Source.Z, Source.W)" + "tooltip": "returns a the vector(Source.X, Y, Source.Z, Source.W)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Y", + "base": "DataInput_Y_1", "details": { "name": "Y" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names index 3467d2ca52..d631cef009 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names @@ -5,37 +5,37 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Set Z", + "name": "SetZ", "category": "Math/Vector4", - "tooltip": "Returns a the vector(Source.X, Source.Y, Z, Source.W)" + "tooltip": "returns a the vector(Source.X, Source.Y, Z, Source.W)" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Z", + "base": "DataInput_Z_1", "details": { "name": "Z" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Add_+_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Add_+_.names index fb9b199a4d..b50bb39aaf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Add_+_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Add_+_.names @@ -7,36 +7,35 @@ "details": { "name": "Add (+)", "category": "Math", - "tooltip": "Adds two or more values", - "subtitle": "Math" + "tooltip": "Adds two or more values" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Divide__.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Divide__.names index 40d1552274..c0891eb923 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Divide__.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Divide__.names @@ -7,36 +7,35 @@ "details": { "name": "Divide (/)", "category": "Math", - "tooltip": "Divides two or more values", - "subtitle": "Math" + "tooltip": "Divides two or more values" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_DividebyNumber__.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_DividebyNumber__.names index 45005dc5c4..01a061eae9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_DividebyNumber__.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_DividebyNumber__.names @@ -7,36 +7,35 @@ "details": { "name": "Divide by Number (/)", "category": "Math", - "tooltip": "Divides certain types by a given number", - "subtitle": "Math" + "tooltip": "Divides certain types by a given number" }, "slots": [ { - "base": "DataInput_Divisor", + "base": "DataInput_Divisor_0", "details": { "name": "Divisor" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_1", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Length.names index 3f2a833f95..80a5a6a356 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Length.names @@ -7,30 +7,29 @@ "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.", - "subtitle": "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", + "base": "DataOutput_Length_0", "details": { "name": "Length" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_LerpBetween.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_LerpBetween.names index 53eaa8ebb6..1cb015b756 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_LerpBetween.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_LerpBetween.names @@ -6,83 +6,82 @@ "variant": "", "details": { "name": "Lerp Between", - "category": "Math", - "subtitle": "Math" + "category": "Math" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Starts the lerp action from the beginning." } }, { - "base": "DataInput_Start", + "base": "DataInput_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Stop", + "base": "DataInput_Stop_1", "details": { "name": "Stop" } }, { - "base": "DataInput_Speed", + "base": "DataInput_Speed_2", "details": { "name": "Speed" } }, { - "base": "DataInput_Maximum Duration", + "base": "DataInput_Maximum Duration_3", "details": { "name": "Maximum Duration" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Executes immediately after the lerp action is started." } }, { - "base": "Input_Cancel", + "base": "Input_Cancel_1", "details": { "name": "Cancel", "tooltip": "Stops the lerp action immediately." } }, { - "base": "Output_Canceled", + "base": "Output_Canceled_1", "details": { "name": "Canceled", "tooltip": "Executes immediately after the operation is canceled." } }, { - "base": "Output_Tick", + "base": "Output_Tick_2", "details": { "name": "Tick", "tooltip": "Signaled at each step of the lerp." } }, { - "base": "DataOutput_Step", + "base": "DataOutput_Step_0", "details": { "name": "Step" } }, { - "base": "DataOutput_Percent", + "base": "DataOutput_Percent_1", "details": { "name": "Percent" } }, { - "base": "Output_Lerp Complete", + "base": "Output_Lerp Complete_3", "details": { "name": "Lerp Complete", "tooltip": "Signaled after the last Tick, when the lerp is complete" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MathExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MathExpression.names index 4928054d0e..36d0aeac01 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MathExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MathExpression.names @@ -7,25 +7,24 @@ "details": { "name": "Math Expression", "category": "Math", - "tooltip": "Will evaluate a series of math operations, allowing users to specify inputs using {}.", - "subtitle": "Math" + "tooltip": "Will evaluate a series of math operations, allowing users to specify inputs using {}." }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names index f8af2d0c67..0e452f6f36 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names @@ -10,37 +10,37 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Multiplicand", + "base": "DataInput_Multiplicand_0", "details": { "name": "Multiplicand" } }, { - "base": "DataInput_Multiplier", + "base": "DataInput_Multiplier_1", "details": { "name": "Multiplier" } }, { - "base": "DataInput_Addend", + "base": "DataInput_Addend_2", "details": { "name": "Addend" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Multiply_x_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Multiply_x_.names index 6293bab799..3ce427647d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Multiply_x_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Multiply_x_.names @@ -7,36 +7,35 @@ "details": { "name": "Multiply (*)", "category": "Math", - "tooltip": "Multiplies two of more values", - "subtitle": "Math" + "tooltip": "Multiplies two of more values" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names index 534d469271..45b8ba8cb5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names @@ -11,19 +11,19 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Subtract_-_.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Subtract_-_.names index 423ec056ea..cec6c3ec91 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Subtract_-_.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_Subtract_-_.names @@ -7,36 +7,35 @@ "details": { "name": "Subtract (-)", "category": "Math", - "tooltip": "Subtracts two of more elements", - "subtitle": "Math" + "tooltip": "Subtracts two of more elements" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_ThreeGeneric.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_ThreeGeneric.names index 9b73829ea8..b76b0099d3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_ThreeGeneric.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_ThreeGeneric.names @@ -5,58 +5,57 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ThreeGeneric", + "name": "Three Generic", "category": "Math", - "tooltip": "returns all columns from matrix", - "subtitle": "Math" + "tooltip": "returns all columns from matrix" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Vector3: One", + "base": "DataInput_One_0", "details": { - "name": "Vector3: One" + "name": "One" } }, { - "base": "DataInput_String: Two", + "base": "DataInput_Two_1", "details": { - "name": "String: Two" + "name": "Two" } }, { - "base": "DataInput_Boolean: Three", + "base": "DataInput_Three_2", "details": { - "name": "Boolean: Three" + "name": "Three" } }, { - "base": "DataOutput_One: Vector3", + "base": "DataOutput_One_0", "details": { - "name": "One: Vector3" + "name": "One" } }, { - "base": "DataOutput_Two: String", + "base": "DataOutput_Two_1", "details": { - "name": "Two: String" + "name": "Two" } }, { - "base": "DataOutput_Three: Boolean", + "base": "DataOutput_Three_2", "details": { - "name": "Three: Boolean" + "name": "Three" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names index a1153b6eac..009ef7cd75 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names @@ -6,43 +6,43 @@ "variant": "", "details": { "name": "Duration", - "category": "Timing", + "category": "Nodeables", "tooltip": "Triggers a signal every frame during the specified duration." }, "slots": [ { - "base": "Input_Start", + "base": "Input_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Duration", + "base": "DataInput_Duration_0", "details": { "name": "Duration" } }, { - "base": "Output_On Start", + "base": "Output_On Start_0", "details": { "name": "On Start" } }, { - "base": "Output_OnTick", + "base": "Output_OnTick_1", "details": { "name": "OnTick", "tooltip": "Signaled every frame while the duration is active." } }, { - "base": "DataOutput_Elapsed", + "base": "DataOutput_Elapsed_0", "details": { "name": "Elapsed" } }, { - "base": "Output_Done", + "base": "Output_Done_2", "details": { "name": "Done", "tooltip": "Signaled after waiting for the specified amount of times." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names index 21f18b994f..ae4868ad60 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names @@ -6,43 +6,43 @@ "variant": "", "details": { "name": "Repeater", - "category": "Timing", + "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", + "base": "Input_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Repetitions", + "base": "DataInput_Repetitions_0", "details": { "name": "Repetitions" } }, { - "base": "DataInput_Interval", + "base": "DataInput_Interval_1", "details": { "name": "Interval" } }, { - "base": "Output_On Start", + "base": "Output_On Start_0", "details": { "name": "On Start" } }, { - "base": "Output_Complete", + "base": "Output_Complete_1", "details": { "name": "Complete", "tooltip": "Signaled upon node exit" } }, { - "base": "Output_Action", + "base": "Output_Action_2", "details": { "name": "Action", "tooltip": "Signaled every repetition" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names index dd4c6412f3..618f0c3378 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names @@ -6,30 +6,30 @@ "variant": "", "details": { "name": "Time Delay", - "category": "Timing", + "category": "Nodeables", "tooltip": "Delays all incoming execution for the specified number of ticks" }, "slots": [ { - "base": "Input_Start", + "base": "Input_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Delay", + "base": "DataInput_Delay_0", "details": { "name": "Delay" } }, { - "base": "Output_On Start", + "base": "Output_On Start_0", "details": { "name": "On Start" } }, { - "base": "Output_Done", + "base": "Output_Done_1", "details": { "name": "Done", "tooltip": "Signaled after waiting for the specified amount of times." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/OperatorsMath_OperatorArithmeticUnary.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/OperatorsMath_OperatorArithmeticUnary.names index 8f3826e4f0..c7bfae7988 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/OperatorsMath_OperatorArithmeticUnary.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/OperatorsMath_OperatorArithmeticUnary.names @@ -5,37 +5,36 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "OperatorArithmeticUnary", - "category": "Operators/Math", - "subtitle": "Math" + "name": "Operator Arithmetic Unary", + "category": "Operators/Math" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorArithmetic.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorArithmetic.names index 20913eedaf..6f3ef18469 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorArithmetic.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorArithmetic.names @@ -5,37 +5,36 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "OperatorArithmetic", - "category": "Operators", - "subtitle": "Operators" + "name": "Operator Arithmetic", + "category": "Operators" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_1", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorBase.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorBase.names index 9b62348cdc..179ead79e9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorBase.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Operators_OperatorBase.names @@ -5,20 +5,19 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "OperatorBase", - "category": "Operators", - "subtitle": "Operators" + "name": "Operator Base", + "category": "Operators" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Output signal" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names index 671fdd730e..62f08e481e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names @@ -7,89 +7,89 @@ "details": { "name": "Box Cast With Group", "category": "PhysX/World", - "tooltip": "Box Cast" + "tooltip": "BoxCast" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_0", "details": { "name": "Distance" } }, { - "base": "DataInput_Pose", + "base": "DataInput_Pose_1", "details": { "name": "Pose" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_2", "details": { "name": "Direction" } }, { - "base": "DataInput_Dimensions", + "base": "DataInput_Dimensions_3", "details": { "name": "Dimensions" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_4", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_5", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Object Hit", + "base": "DataOutput_Object Hit_0", "details": { "name": "Object Hit" } }, { - "base": "DataOutput_Position", + "base": "DataOutput_Position_1", "details": { "name": "Position" } }, { - "base": "DataOutput_Normal", + "base": "DataOutput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataOutput_Distance", + "base": "DataOutput_Distance_3", "details": { "name": "Distance" } }, { - "base": "DataOutput_EntityId", + "base": "DataOutput_EntityId_4", "details": { "name": "EntityId" } }, { - "base": "DataOutput_Surface", + "base": "DataOutput_Surface_5", "details": { "name": "Surface" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names index 4dfca63478..cd8fd7f240 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names @@ -11,91 +11,91 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_0", "details": { "name": "Distance" } }, { - "base": "DataInput_Pose", + "base": "DataInput_Pose_1", "details": { "name": "Pose" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_2", "details": { "name": "Direction" } }, { - "base": "DataInput_Height", + "base": "DataInput_Height_3", "details": { "name": "Height" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_4", "details": { "name": "Radius" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_5", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_6", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Object Hit", + "base": "DataOutput_Object Hit_0", "details": { "name": "Object Hit" } }, { - "base": "DataOutput_Position", + "base": "DataOutput_Position_1", "details": { "name": "Position" } }, { - "base": "DataOutput_Normal", + "base": "DataOutput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataOutput_Distance", + "base": "DataOutput_Distance_3", "details": { "name": "Distance" } }, { - "base": "DataOutput_EntityId", + "base": "DataOutput_EntityId_4", "details": { "name": "EntityId" } }, { - "base": "DataOutput_Surface", + "base": "DataOutput_Surface_5", "details": { "name": "Surface" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names index f49e3d2461..d01ae23354 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names @@ -11,43 +11,43 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Pose", + "base": "DataInput_Pose_0", "details": { "name": "Pose" } }, { - "base": "DataInput_Dimensions", + "base": "DataInput_Dimensions_1", "details": { "name": "Dimensions" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_2", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_3", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names index 291dc8ea75..e1ac954107 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names @@ -11,49 +11,49 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Pose", + "base": "DataInput_Pose_0", "details": { "name": "Pose" } }, { - "base": "DataInput_Height", + "base": "DataInput_Height_1", "details": { "name": "Height" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_2", "details": { "name": "Radius" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_3", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_4", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names index bd48cbf7ad..2d7cad3dce 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names @@ -11,43 +11,43 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Position", + "base": "DataInput_Position_0", "details": { "name": "Position" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_1", "details": { "name": "Radius" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_2", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_3", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names index a61a7a1579..68a432668f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names @@ -11,79 +11,79 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_1", "details": { "name": "Direction" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_2", "details": { "name": "Distance" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_3", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_4", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Object hit", + "base": "DataOutput_Object hit_0", "details": { "name": "Object hit" } }, { - "base": "DataOutput_Position", + "base": "DataOutput_Position_1", "details": { "name": "Position" } }, { - "base": "DataOutput_Normal", + "base": "DataOutput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataOutput_Distance", + "base": "DataOutput_Distance_3", "details": { "name": "Distance" } }, { - "base": "DataOutput_EntityId", + "base": "DataOutput_EntityId_4", "details": { "name": "EntityId" } }, { - "base": "DataOutput_Surface", + "base": "DataOutput_Surface_5", "details": { "name": "Surface" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names index f2d2934035..2744ac87d5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names @@ -11,49 +11,49 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_1", "details": { "name": "Direction" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_2", "details": { "name": "Distance" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_3", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_4", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Objects hit", + "base": "DataOutput_Objects hit_0", "details": { "name": "Objects hit" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names index 8051204ab7..98b20ea4f5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names @@ -11,79 +11,79 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Start", + "base": "DataInput_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_1", "details": { "name": "Direction" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_2", "details": { "name": "Distance" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_3", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_4", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Object hit", + "base": "DataOutput_Object hit_0", "details": { "name": "Object hit" } }, { - "base": "DataOutput_Position", + "base": "DataOutput_Position_1", "details": { "name": "Position" } }, { - "base": "DataOutput_Normal", + "base": "DataOutput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataOutput_Distance", + "base": "DataOutput_Distance_3", "details": { "name": "Distance" } }, { - "base": "DataOutput_EntityId", + "base": "DataOutput_EntityId_4", "details": { "name": "EntityId" } }, { - "base": "DataOutput_Surface", + "base": "DataOutput_Surface_5", "details": { "name": "Surface" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names index 705fa25d66..7b6c389171 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names @@ -11,85 +11,85 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Distance", + "base": "DataInput_Distance_0", "details": { "name": "Distance" } }, { - "base": "DataInput_Pose", + "base": "DataInput_Pose_1", "details": { "name": "Pose" } }, { - "base": "DataInput_Direction", + "base": "DataInput_Direction_2", "details": { "name": "Direction" } }, { - "base": "DataInput_Radius", + "base": "DataInput_Radius_3", "details": { "name": "Radius" } }, { - "base": "DataInput_Collision group", + "base": "DataInput_Collision group_4", "details": { "name": "Collision group" } }, { - "base": "DataInput_Ignore", + "base": "DataInput_Ignore_5", "details": { "name": "Ignore" } }, { - "base": "DataOutput_Object Hit", + "base": "DataOutput_Object Hit_0", "details": { "name": "Object Hit" } }, { - "base": "DataOutput_Position", + "base": "DataOutput_Position_1", "details": { "name": "Position" } }, { - "base": "DataOutput_Normal", + "base": "DataOutput_Normal_2", "details": { "name": "Normal" } }, { - "base": "DataOutput_Distance", + "base": "DataOutput_Distance_3", "details": { "name": "Distance" } }, { - "base": "DataOutput_EntityId", + "base": "DataOutput_EntityId_4", "details": { "name": "EntityId" } }, { - "base": "DataOutput_Surface", + "base": "DataOutput_Surface_5", "details": { "name": "Surface" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Spawning_Spawn.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Spawning_Spawn.names index 3f099577f9..5588c71675 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Spawning_Spawn.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Spawning_Spawn.names @@ -7,48 +7,47 @@ "details": { "name": "Spawn", "category": "Spawning", - "tooltip": "Spawns a selected prefab, positioned using the provided transform inputs", - "subtitle": "Spawning" + "tooltip": "Spawns a selected prefab, positioned using the provided transform inputs" }, "slots": [ { - "base": "Input_Request Spawn", + "base": "Input_Request Spawn_0", "details": { "name": "Request Spawn" } }, { - "base": "DataInput_Translation", + "base": "DataInput_Translation_0", "details": { "name": "Translation" } }, { - "base": "DataInput_Rotation", + "base": "DataInput_Rotation_1", "details": { "name": "Rotation" } }, { - "base": "DataInput_Scale", + "base": "DataInput_Scale_2", "details": { "name": "Scale" } }, { - "base": "Output_Spawn Requested", + "base": "Output_Spawn Requested_0", "details": { "name": "Spawn Requested" } }, { - "base": "Output_On Spawn", + "base": "Output_On Spawn_1", "details": { "name": "On Spawn" } }, { - "base": "DataOutput_SpawnedEntitiesList", + "base": "DataOutput_SpawnedEntitiesList_0", "details": { "name": "SpawnedEntitiesList" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_BuildString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_BuildString.names index 4576c21318..6eaa6a08b4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_BuildString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_BuildString.names @@ -7,31 +7,30 @@ "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.", - "subtitle": "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", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataOutput_String", + "base": "DataOutput_String_0", "details": { "name": "String" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ContainsString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ContainsString.names index 7cb1b668d4..b882e8a505 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ContainsString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ContainsString.names @@ -7,56 +7,55 @@ "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.", - "subtitle": "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", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Pattern", + "base": "DataInput_Pattern_1", "details": { "name": "Pattern" } }, { - "base": "DataInput_Search From End", + "base": "DataInput_Search From End_2", "details": { "name": "Search From End" } }, { - "base": "DataInput_Case Sensitive", + "base": "DataInput_Case Sensitive_3", "details": { "name": "Case Sensitive" } }, { - "base": "DataOutput_Index", + "base": "DataOutput_Index_0", "details": { "name": "Index" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "The string contains the provided pattern." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "The string did not contain the provided pattern." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_EndsWith.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_EndsWith.names index 35ba6f17b4..22857d3f5e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_EndsWith.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_EndsWith.names @@ -7,43 +7,42 @@ "details": { "name": "Ends With", "category": "String", - "tooltip": ".", - "subtitle": "String" + "tooltip": "." }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Pattern", + "base": "DataInput_Pattern_1", "details": { "name": "Pattern" } }, { - "base": "DataInput_Case Sensitive", + "base": "DataInput_Case Sensitive_2", "details": { "name": "Case Sensitive" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True" } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Join.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Join.names index fd379e063c..ef38e1a991 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Join.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Join.names @@ -7,37 +7,36 @@ "details": { "name": "Join", "category": "String", - "tooltip": ".", - "subtitle": "String" + "tooltip": "." }, "slots": [ { - "base": "DataInput_String Array", + "base": "DataInput_String Array_0", "details": { "name": "String Array" } }, { - "base": "DataInput_Separator", + "base": "DataInput_Separator_1", "details": { "name": "Separator" } }, { - "base": "DataOutput_String", + "base": "DataOutput_String_0", "details": { "name": "String" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ReplaceString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ReplaceString.names index 2edaaa842e..601c05c89c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ReplaceString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ReplaceString.names @@ -7,49 +7,48 @@ "details": { "name": "Replace String", "category": "String", - "tooltip": "Allows replacing a substring from a given string.", - "subtitle": "String" + "tooltip": "Allows replacing a substring from a given string." }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Replace", + "base": "DataInput_Replace_1", "details": { "name": "Replace" } }, { - "base": "DataInput_With", + "base": "DataInput_With_2", "details": { "name": "With" } }, { - "base": "DataInput_Case Sensitive", + "base": "DataInput_Case Sensitive_3", "details": { "name": "Case Sensitive" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Split.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Split.names index a16adf32b8..6a2943bf0f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Split.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Split.names @@ -7,37 +7,36 @@ "details": { "name": "Split", "category": "String", - "tooltip": ".", - "subtitle": "String" + "tooltip": "." }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Delimiters", + "base": "DataInput_Delimiters_1", "details": { "name": "Delimiters" } }, { - "base": "DataOutput_String Array", + "base": "DataOutput_String Array_0", "details": { "name": "String Array" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_StartsWith.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_StartsWith.names index 0538597e7a..a3a17b4ff7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_StartsWith.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_StartsWith.names @@ -7,43 +7,42 @@ "details": { "name": "Starts With", "category": "String", - "tooltip": ".", - "subtitle": "String" + "tooltip": "." }, "slots": [ { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataInput_Pattern", + "base": "DataInput_Pattern_1", "details": { "name": "Pattern" } }, { - "base": "DataInput_Case Sensitive", + "base": "DataInput_Case Sensitive_2", "details": { "name": "Case Sensitive" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True" } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Substring.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Substring.names index ff14a4fe42..5f489934bd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Substring.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_Substring.names @@ -7,44 +7,43 @@ "details": { "name": "Substring", "category": "String", - "tooltip": "Returns a sub string from a given string", - "subtitle": "String" + "tooltip": "Returns a sub string from a given string" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_String: Source", + "base": "DataInput_Source_0", "details": { - "name": "String: Source" + "name": "Source" } }, { - "base": "DataInput_Number: From", + "base": "DataInput_From_1", "details": { - "name": "Number: From" + "name": "From" } }, { - "base": "DataInput_Number: Length", + "base": "DataInput_Length_2", "details": { - "name": "Number: Length" + "name": "Length" } }, { - "base": "DataOutput_Result: String", + "base": "DataOutput_Result_0", "details": { - "name": "Result: String" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names index 1d761cd3cf..3ec07352e0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names @@ -11,25 +11,25 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names index bee39e0683..62089de059 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names @@ -11,25 +11,25 @@ }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchMethodSharedDataSlotExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchMethodSharedDataSlotExample.names index cb1b376ffa..6b966bfb55 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchMethodSharedDataSlotExample.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_BranchMethodSharedDataSlotExample.names @@ -5,68 +5,67 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "BranchMethodSharedDataSlotExample", + "name": "Branch Method Shared Data Slot Example", "category": "Tests", - "tooltip": "Branch Test", - "subtitle": "Tests" + "tooltip": "Branch Test" }, "slots": [ { - "base": "Output_One String", + "base": "Output_One String_0", "details": { "name": "One String" } }, { - "base": "DataOutput_string", + "base": "DataOutput_string_0", "details": { "name": "string" } }, { - "base": "Output_Two Strings", + "base": "Output_Two Strings_1", "details": { "name": "Two Strings" } }, { - "base": "DataOutput_string1", + "base": "DataOutput_string1_1", "details": { "name": "string1" } }, { - "base": "DataOutput_string2", + "base": "DataOutput_string2_2", "details": { "name": "string2" } }, { - "base": "Output_Three Strings", + "base": "Output_Three Strings_2", "details": { "name": "Three Strings" } }, { - "base": "DataOutput_string3", + "base": "DataOutput_string3_3", "details": { "name": "string3" } }, { - "base": "Output_Square", + "base": "Output_Square_3", "details": { "name": "Square" } }, { - "base": "Output_Pants", + "base": "Output_Pants_4", "details": { "name": "Pants" } }, { - "base": "Output_Hello", + "base": "Output_Hello_5", "details": { "name": "Hello" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputMethodSharedDataSlotExample.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputMethodSharedDataSlotExample.names index 2ea2b7c637..c88f0fea97 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputMethodSharedDataSlotExample.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Tests_InputMethodSharedDataSlotExample.names @@ -5,74 +5,73 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "InputMethodSharedDataSlotExample", + "name": "Input Method Shared Data Slot Example", "category": "Tests", - "tooltip": "Input Method Shared Data", - "subtitle": "Tests" + "tooltip": "Input Method Shared Data" }, "slots": [ { - "base": "Input_Append Hello", + "base": "Input_Append Hello_0", "details": { "name": "Append Hello" } }, { - "base": "DataInput_str", + "base": "DataInput_str_0", "details": { "name": "str" } }, { - "base": "Output_On Append Hello", + "base": "Output_On Append Hello_0", "details": { "name": "On Append Hello" } }, { - "base": "DataOutput_Output", + "base": "DataOutput_Output_0", "details": { "name": "Output" } }, { - "base": "Input_Concatenate Two", + "base": "Input_Concatenate Two_1", "details": { "name": "Concatenate Two" } }, { - "base": "DataInput_a", + "base": "DataInput_a_1", "details": { "name": "a" } }, { - "base": "DataInput_b", + "base": "DataInput_b_2", "details": { "name": "b" } }, { - "base": "Output_On Concatenate Two", + "base": "Output_On Concatenate Two_1", "details": { "name": "On Concatenate Two" } }, { - "base": "Input_Concatenate Three", + "base": "Input_Concatenate Three_2", "details": { "name": "Concatenate Three" } }, { - "base": "DataInput_c", + "base": "DataInput_c_3", "details": { "name": "c" } }, { - "base": "Output_On Concatenate Three", + "base": "Output_On Concatenate Three_2", "details": { "name": "On Concatenate Three" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Delay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Delay.names index 7d9f1d9d64..ac6387256c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Delay.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Delay.names @@ -7,97 +7,96 @@ "details": { "name": "Delay", "category": "Timing", - "tooltip": "While active, will signal the output at the given interval.", - "subtitle": "Timing" + "tooltip": "While active, will signal the output at the given interval." }, "slots": [ { - "base": "Input_Start", + "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", + "base": "DataInput_Start: Time_0", "details": { "name": "Start: Time" } }, { - "base": "DataInput_Start: Loop", + "base": "DataInput_Start: Loop_1", "details": { "name": "Start: Loop" } }, { - "base": "DataInput_Start: Hold", + "base": "DataInput_Start: Hold_2", "details": { "name": "Start: Hold" } }, { - "base": "Output_On Start", + "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", + "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", + "base": "DataInput_Reset: Time_3", "details": { "name": "Reset: Time" } }, { - "base": "DataInput_Reset: Loop", + "base": "DataInput_Reset: Loop_4", "details": { "name": "Reset: Loop" } }, { - "base": "DataInput_Reset: Hold", + "base": "DataInput_Reset: Hold_5", "details": { "name": "Reset: Hold" } }, { - "base": "Output_On Reset", + "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", + "base": "Input_Cancel_2", "details": { "name": "Cancel", "tooltip": "Cancels the current delay." } }, { - "base": "Output_On Cancel", + "base": "Output_On Cancel_2", "details": { "name": "On Cancel", "tooltip": "Cancels the current delay." } }, { - "base": "Output_Done", + "base": "Output_Done_3", "details": { "name": "Done", "tooltip": "Signaled when the delay reaches zero." } }, { - "base": "DataOutput_Elapsed", + "base": "DataOutput_Elapsed_0", "details": { "name": "Elapsed" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Duration.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Duration.names index d3ef973ec7..280ef54ea0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Duration.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Duration.names @@ -11,33 +11,33 @@ }, "slots": [ { - "base": "DataInput_Duration", + "base": "DataInput_Duration_0", "details": { "name": "Duration" } }, { - "base": "DataOutput_Elapsed", + "base": "DataOutput_Elapsed_0", "details": { "name": "Elapsed" } }, { - "base": "Input_Start", + "base": "Input_Start_0", "details": { "name": "Start", "tooltip": "Starts the countdown" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled every frame while the duration is active." } }, { - "base": "Output_Done", + "base": "Output_Done_1", "details": { "name": "Done", "tooltip": "Signaled once the duration is complete." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names index c024e58c31..6f5f2a3f24 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names @@ -1,7 +1,7 @@ { "entries": [ { - "base": "{E73DB180-A325-763B-A1FE-517B548AF66E}", + "base": "{BA107060-249D-4818-9CEC-7573718273FC}", "context": "ScriptCanvas::Node", "variant": "", "details": { @@ -11,40 +11,27 @@ }, "slots": [ { - "base": "Input_Start", + "base": "Input_Start_0", "details": { "name": "Start" } }, { - "base": "DataInput_Interval", - "details": { - "name": "Interval" - } - }, - { - "base": "Output_On Start", - "details": { - "name": "On Start" - } - }, - { - "base": "Input_Stop", + "base": "Input_Stop_1", "details": { "name": "Stop" } }, { - "base": "Output_On Stop", + "base": "Output_Pulse_0", "details": { - "name": "On Stop" + "name": "Pulse" } }, { - "base": "Output_Pulse", + "base": "DataInput_Interval_0", "details": { - "name": "Pulse", - "tooltip": "Signaled at each specified interval." + "name": "Interval" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_OnGraphStart.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_OnGraphStart.names index d5162caf05..b723bc06e1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_OnGraphStart.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_OnGraphStart.names @@ -7,12 +7,11 @@ "details": { "name": "On Graph Start", "category": "Timing", - "tooltip": "Starts executing the graph when the entity that owns the graph is fully activated.", - "subtitle": "Timing" + "tooltip": "Starts executing the graph when the entity that owns the graph is fully activated." }, "slots": [ { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled when the entity that owns this graph is fully activated." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TickDelay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TickDelay.names index a682f2b7ec..d0dcd75f85 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TickDelay.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TickDelay.names @@ -11,26 +11,26 @@ }, "slots": [ { - "base": "DataInput_Ticks", + "base": "DataInput_Ticks_0", "details": { "name": "Ticks" } }, { - "base": "DataInput_Tick Order", + "base": "DataInput_Tick Order_1", "details": { "name": "Tick Order" } }, { - "base": "Input_In", + "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", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after waiting for the specified amount of frames." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TimeDelay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TimeDelay.names index bfe267f227..3a83df9031 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TimeDelay.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_TimeDelay.names @@ -11,21 +11,21 @@ }, "slots": [ { - "base": "Input_In", + "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", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after waiting for the specified amount of times." } }, { - "base": "DataInput_Delay", + "base": "DataInput_Delay_0", "details": { "name": "Delay" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Timer.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Timer.names index 87b2c1cefa..8d5bc6e536 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Timer.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_Timer.names @@ -1,47 +1,61 @@ { "entries": [ { - "base": "{60CF8540-E51A-434D-A32C-461C41D68AF9}", + "base": "{32A4BEDC-C207-4472-61DE-9A716402620A}", "context": "ScriptCanvas::Node", "variant": "", "details": { "name": "Timer", "category": "Timing", - "tooltip": "Provides a time value." + "tooltip": "While active, will signal the output at the given interval." }, "slots": [ { - "base": "DataOutput_Milliseconds", + "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", + "base": "DataOutput_Seconds_1", "details": { "name": "Seconds" } - }, - { - "base": "Input_Start", - "details": { - "name": "Start", - "tooltip": "Starts the timer." - } - }, - { - "base": "Input_Stop", - "details": { - "name": "Stop", - "tooltip": "Stops the timer." - } - }, - { - "base": "Output_Out", - "details": { - "name": "Out", - "tooltip": "Signaled every frame while the timer is running." - } } ] } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ArithmeticExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ArithmeticExpression.names index 8412a5383d..4b867599f9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ArithmeticExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ArithmeticExpression.names @@ -5,38 +5,38 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ArithmeticExpression", + "name": "Arithmetic Expression", "tooltip": "ArithmeticExpression" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the arithmetic operation is done." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BinaryOperator.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BinaryOperator.names index e07670e988..44eaa0b48f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BinaryOperator.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BinaryOperator.names @@ -5,12 +5,12 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "BinaryOperator", + "name": "Binary Operator", "tooltip": "BinaryOperator" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BooleanExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BooleanExpression.names index 7df3ca9423..6309542f71 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BooleanExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_BooleanExpression.names @@ -5,32 +5,32 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "BooleanExpression", + "name": "Boolean Expression", "tooltip": "BooleanExpression" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ComparisonExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ComparisonExpression.names index f59d822ffb..a99ea08c00 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ComparisonExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_ComparisonExpression.names @@ -5,45 +5,45 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ComparisonExpression", + "name": "Comparison Expression", "tooltip": "ComparisonExpression" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_EqualityExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_EqualityExpression.names index f8404345b7..d53cb9357a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_EqualityExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_EqualityExpression.names @@ -5,45 +5,45 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "EqualityExpression", + "name": "Equality Expression", "tooltip": "EqualityExpression" }, "slots": [ { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." } }, { - "base": "DataInput_Value A", + "base": "DataInput_Value A_0", "details": { "name": "Value A" } }, { - "base": "DataInput_Value B", + "base": "DataInput_Value B_1", "details": { "name": "Value B" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_GetVariable.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_GetVariable.names index a2a6475525..1f2b2061f4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_GetVariable.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_GetVariable.names @@ -10,14 +10,14 @@ }, "slots": [ { - "base": "Input_In", + "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", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the referenced property has been pushed to the Data Output slot" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNode.names index d884e287da..3122d622eb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNode.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNode.names @@ -5,7 +5,7 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "NodeableNode", + "name": "Nodeable Node", "tooltip": "NodeableNode" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNodeOverloaded.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNodeOverloaded.names index fa7c4723e1..0628ef14b2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNodeOverloaded.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_NodeableNodeOverloaded.names @@ -5,7 +5,7 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "NodeableNodeOverloaded", + "name": "Nodeable Node Overloaded", "tooltip": "NodeableNode" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_SetVariable.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_SetVariable.names index b4e5f12867..e4050ce1f7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_SetVariable.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_SetVariable.names @@ -10,14 +10,14 @@ }, "slots": [ { - "base": "Input_In", + "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", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after the referenced variable has been pushed to the Data Output slot" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryExpression.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryExpression.names index 4933d2d9bc..33fab189e4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryExpression.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryExpression.names @@ -5,38 +5,38 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "UnaryExpression", + "name": "Unary Expression", "tooltip": "UnaryExpression" }, "slots": [ { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "DataOutput_Result", + "base": "DataOutput_Result_0", "details": { "name": "Result" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." } }, { - "base": "Output_True", + "base": "Output_True_0", "details": { "name": "True", "tooltip": "Signaled if the result of the operation is true." } }, { - "base": "Output_False", + "base": "Output_False_1", "details": { "name": "False", "tooltip": "Signaled if the result of the operation is false." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryOperator.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryOperator.names index b18fe07c1f..6b51a011d9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryOperator.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Uncategorized_UnaryOperator.names @@ -5,12 +5,12 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "UnaryOperator", + "name": "Unary Operator", "tooltip": "UnaryOperator" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Signal to perform the evaluation when desired." diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesDebug_Print.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesDebug_Print.names index 0b238ad007..a78f033284 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesDebug_Print.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesDebug_Print.names @@ -7,25 +7,24 @@ "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.", - "subtitle": "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", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "DataInput_Value", + "base": "DataInput_Value_0", "details": { "name": "Value" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddFailure.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddFailure.names index f1e851bd4d..7029cc839b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddFailure.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddFailure.names @@ -11,20 +11,20 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddSuccess.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddSuccess.names index 5ebb61abdb..fb81c2fdef 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddSuccess.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_AddSuccess.names @@ -11,20 +11,20 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_Checkpoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_Checkpoint.names index c87e917ec6..c80f59964a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_Checkpoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_Checkpoint.names @@ -11,20 +11,20 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectEqual.names index 82e29a3761..1ce3b3b1f2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectEqual.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectEqual.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectFalse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectFalse.names index 0ece11c5d3..cd6aca7679 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectFalse.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectFalse.names @@ -11,26 +11,26 @@ }, "slots": [ { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_0", "details": { "name": "Candidate" } }, { - "base": "DataInput_Report", + "base": "DataInput_Report_1", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThan.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThan.names index b5e85fc361..fd1feee008 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThan.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThan.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThanEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThanEqual.names index 3d82f05c18..35a1123f77 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThanEqual.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectGreaterThanEqual.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThan.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThan.names index f3a875700a..e2d3cb289d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThan.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThan.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThanEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThanEqual.names index 1897bf12fe..e5078ea233 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThanEqual.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectLessThanEqual.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectNotEqual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectNotEqual.names index cbe4045c11..518adf430e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectNotEqual.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectNotEqual.names @@ -11,32 +11,32 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } }, { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_1", "details": { "name": "Candidate" } }, { - "base": "DataInput_Reference", + "base": "DataInput_Reference_2", "details": { "name": "Reference" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectTrue.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectTrue.names index 71bf43b22a..b78afd825a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectTrue.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_ExpectTrue.names @@ -11,26 +11,26 @@ }, "slots": [ { - "base": "DataInput_Candidate", + "base": "DataInput_Candidate_0", "details": { "name": "Candidate" } }, { - "base": "DataInput_Report", + "base": "DataInput_Report_1", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_MarkComplete.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_MarkComplete.names index 67c838c832..b8b33eeff2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_MarkComplete.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/UtilitiesUnitTesting_MarkComplete.names @@ -11,20 +11,20 @@ }, "slots": [ { - "base": "DataInput_Report", + "base": "DataInput_Report_0", "details": { "name": "Report" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_BaseTimerNode.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_BaseTimerNode.names index 4a46770857..88167b2d3e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_BaseTimerNode.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_BaseTimerNode.names @@ -5,14 +5,13 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "BaseTimerNode", + "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).", - "subtitle": "Utilities" + "tooltip": "Provides a basic interaction layer for all time based nodes for users(handles swapping between ticks and seconds)." }, "slots": [ { - "base": "DataInput_Delay", + "base": "DataInput_Delay_0", "details": { "name": "Delay" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_ExtractProperties.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_ExtractProperties.names index 3ce4ed1f67..6a2884f972 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_ExtractProperties.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_ExtractProperties.names @@ -7,26 +7,25 @@ "details": { "name": "Extract Properties", "category": "Utilities", - "tooltip": "Extracts property values from connected input", - "subtitle": "Utilities" + "tooltip": "Extracts property values from connected input" }, "slots": [ { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "When signaled assigns property values using the supplied source input" } }, { - "base": "Output_Out", + "base": "Output_Out_0", "details": { "name": "Out", "tooltip": "Signaled after all property haves have been pushed to the output slots" } }, { - "base": "DataInput_Source", + "base": "DataInput_Source_0", "details": { "name": "Source" } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_Repeater.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_Repeater.names index e34c059680..ee6eacf751 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_Repeater.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Utilities_Repeater.names @@ -7,39 +7,38 @@ "details": { "name": "Repeater", "category": "Utilities", - "tooltip": "Repeats the output signal the given number of times using the specified delay to space the signals out", - "subtitle": "Utilities" + "tooltip": "Repeats the output signal the given number of times using the specified delay to space the signals out" }, "slots": [ { - "base": "DataInput_Repetitions", + "base": "DataInput_Repetitions_0", "details": { "name": "Repetitions" } }, { - "base": "Input_In", + "base": "Input_In_0", "details": { "name": "In", "tooltip": "Input signal" } }, { - "base": "Output_Complete", + "base": "Output_Complete_0", "details": { "name": "Complete", "tooltip": "Signaled upon node exit" } }, { - "base": "Output_Action", + "base": "Output_Action_1", "details": { "name": "Action", "tooltip": "The signal that will be repeated" } }, { - "base": "DataInput_Interval", + "base": "DataInput_Interval_1", "details": { "name": "Interval" } 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/Code/CMakeLists.txt b/Gems/ScriptCanvas/Code/CMakeLists.txt index 9bdacde4df..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 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 29db0c52cc..e1450c0aa8 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerEventNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerEventNodeDescriptorComponent.cpp @@ -188,7 +188,7 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0); GraphCanvas::TranslationKey key; key << "EBusHandler" << eventHandler->GetEBusName() << "methods" << m_eventName; @@ -219,9 +219,10 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); int& index = (scriptCanvasSlot->IsData() && scriptCanvasSlot->IsOutput()) ? paramIndex : outputIndex; + auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), index); + GraphCanvas::TranslationRequests::Details details; if (scriptCanvasSlot->IsData()) @@ -254,7 +255,7 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0); } } diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp index 7881a9886b..ab231ae637 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverEventNodeDescriptorComponent.cpp @@ -177,9 +177,11 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + 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. @@ -188,10 +190,14 @@ namespace ScriptCanvasEditor { scriptCanvasSlot = eventHandler->GetSlot(slotId); + int& index = (scriptCanvasSlot->IsData() && scriptCanvasSlot->IsInput()) ? paramIndex : outputIndex; + if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), index); } + + ++index; } if (myEvent.m_resultSlotId.IsValid()) @@ -200,7 +206,7 @@ namespace ScriptCanvasEditor if (scriptCanvasSlot && scriptCanvasSlot->IsVisible()) { - Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot)); + Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0); } } diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp index 26caa5fc2f..7913069243 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp @@ -110,12 +110,17 @@ namespace ScriptCanvasEditor::Nodes GraphCanvas::TranslationRequests::Details details; GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); + int paramIndex = 0; + int outputIndex = 0; + // 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()) { AZStd::string slotKeyStr; @@ -150,11 +155,13 @@ namespace ScriptCanvasEditor::Nodes slotDetails.m_tooltip = slot.GetToolTip(); } - AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasEntity->GetId(), slot); + 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(); @@ -328,6 +335,7 @@ namespace ScriptCanvasEditor::Nodes // 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 @@ -338,14 +346,16 @@ namespace ScriptCanvasEditor::Nodes if (methodNode->GetMethodType() == ScriptCanvas::MethodType::Getter || methodNode->GetMethodType() == ScriptCanvas::MethodType::Free) { updatedMethodName = "Get"; + methodContext = "Getter"; } else { updatedMethodName = "Set"; + methodContext = "Setter"; } updatedMethodName.append(methodName); } - key << updatedMethodName; + key << methodContext << updatedMethodName; GraphCanvas::TranslationRequestBus::BroadcastResult(methodDetails, &GraphCanvas::TranslationRequests::GetDetails, key + ".details", methodDetails); @@ -372,9 +382,11 @@ namespace ScriptCanvasEditor::Nodes { GraphCanvas::TranslationKey slotKey = key; + int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + if (slot.IsVisible()) { - AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot); + AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, index); details.m_name = slot.GetName(); details.m_tooltip = slot.GetToolTip(); @@ -386,7 +398,7 @@ namespace ScriptCanvasEditor::Nodes } else { - int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + if (slot.IsData()) { @@ -416,6 +428,8 @@ namespace ScriptCanvasEditor::Nodes UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), details.m_name); } + + ++index; } // Set the name @@ -471,6 +485,9 @@ namespace ScriptCanvasEditor::Nodes AZStd::vector< ScriptCanvas::SlotId > scriptCanvasSlots = busNode->GetNonEventSlotIds(); + int paramIndex = 0; + int outputIndex = 0; + for (const auto& slotId : scriptCanvasSlots) { ScriptCanvas::Slot* slot = busNode->GetSlot(slotId); @@ -484,6 +501,8 @@ namespace ScriptCanvasEditor::Nodes if (slot->IsVisible()) { + int& index = (slot->IsData() && slot->IsInput()) ? paramIndex : outputIndex; + AZ::EntityId gcSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, (*slot), group); if (busNode->IsIDRequired() && slot->GetDescriptor() == ScriptCanvas::SlotDescriptors::DataIn()) @@ -497,6 +516,8 @@ namespace ScriptCanvasEditor::Nodes GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetDetails, details.m_name, details.m_tooltip); } + + ++index; } } @@ -594,12 +615,17 @@ namespace ScriptCanvasEditor::Nodes *graphCanvasUserData = azEventNode->GetEntityId(); } + int paramIndex = 0; + int outputIndex = 0; + for (const ScriptCanvas::Slot& slot: azEventNode->GetSlots()) { GraphCanvas::SlotGroup group = GraphCanvas::SlotGroups::Invalid; if (slot.IsVisible()) { + int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex; + AZ::EntityId gcSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, group); GraphCanvas::TranslationKey key; @@ -610,6 +636,8 @@ namespace ScriptCanvasEditor::Nodes GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetName, details.m_name); GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTooltip, details.m_tooltip);; + + ++index; } } @@ -675,6 +703,9 @@ namespace ScriptCanvasEditor::Nodes AZStd::vector< ScriptCanvas::SlotId > scriptCanvasSlots = busNode->GetNonEventSlotIds(); + int paramIndex = 0; + int outputIndex = 0; + for (const auto& slotId : scriptCanvasSlots) { ScriptCanvas::Slot* slot = busNode->GetSlot(slotId); @@ -688,6 +719,8 @@ namespace ScriptCanvasEditor::Nodes if (slot->IsVisible()) { + int& index = (slot->IsData() && slot->IsInput()) ? paramIndex : outputIndex; + AZ::EntityId gcSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, (*slot), group); if (busNode->IsIDRequired() && slot->GetDescriptor() == ScriptCanvas::SlotDescriptors::DataIn()) @@ -698,6 +731,8 @@ namespace ScriptCanvasEditor::Nodes GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetDetails, details.m_name, details.m_tooltip); } + + ++index; } } @@ -783,17 +818,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()); UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), slot.GetName()); } + + ++index; } // Set the name @@ -871,14 +913,21 @@ namespace ScriptCanvasEditor::Nodes 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()); UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), slot.GetName()); + + ++index; } if (asset) @@ -1141,7 +1190,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()) { @@ -1244,6 +1293,7 @@ namespace ScriptCanvasEditor::Nodes } slotKeyStr.append(slot.GetName()); + slotKeyStr.append(AZStd::string::format("_%d", slotIndex)); slotKey << slotKeyStr << "details"; GraphCanvas::TranslationRequests::Details slotDetails; 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 262ea8c061..7ebbd4bc6d 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp @@ -12,6 +12,7 @@ #include #include +#include #include namespace ScriptCanvasEditor::Nodes diff --git a/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h b/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h index bd37ab0e2f..4d7eed7075 100644 --- a/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h +++ b/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h @@ -8,15 +8,8 @@ #pragma once -#include - -#include -#include - -#include #include -#include -#include +#include namespace Translation { @@ -27,447 +20,32 @@ namespace Translation static constexpr const char* MissingFunctionKey = "Globals.MissingFunction"; static constexpr const char* EBusHandlerOutSlot = "Globals.EBusHandler.OutSlot"; } - - static inline bool GetValue(const AZStd::string key, AZStd::string& value) - { - GraphCanvas::TranslationKey tkey; - tkey = key; - - bool result = false; - GraphCanvas::TranslationRequestBus::BroadcastResult(result, &GraphCanvas::TranslationRequests::Get, key, value); - return result; - } -} - - -namespace GraphCanvasAttributeHelper -{ - 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; - } - - inline 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 {}; - } } 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 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"; - } - - namespace TranslationContextGroupParts - { - const char* const ebusSender = "EBus"; - const char* const ebusHandler = "Handler"; - const char* const classMethod = "Method"; - constexpr const char* const globalMethod = "GlobalMethod"; - }; - - // 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 GetUserDefinedNodeKey(AZStd::string_view contextName, AZStd::string_view nodeName, TranslationKeyId keyId) - { - return GetKey(TranslationContextGroup::ClassMethod, contextName, nodeName, TranslationItemType::Node, keyId); - } - //// - - 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; - } - - // 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/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp index a31444921b..6e8550b1f8 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp @@ -243,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/NodePalette/GeneralNodePaletteTreeItemTypes.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.h index 65a5e10cf7..c14d6c62ae 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.h @@ -70,10 +70,13 @@ namespace ScriptCanvasEditor AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationRequests::GetBehaviorContext); const char* className = m_className.toUtf8().data(); - auto behaviorClass = behaviorContext->m_classes.find(className); + if (behaviorContext->m_classes.contains(className)) + { + auto behaviorClass = behaviorContext->m_classes.find(className); - ScriptCanvasEditorTools::TranslationGeneration translation; - translation.TranslateBehaviorClass(behaviorClass->second); + ScriptCanvasEditorTools::TranslationGeneration translation; + translation.TranslateBehaviorClass(behaviorClass->second); + } } private: diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp index dc221deec0..c5be5cb4c6 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp @@ -1023,13 +1023,15 @@ namespace ScriptCanvasEditor GraphCanvas::TranslationKey key; + AZStd::string context; AZStd::string updatedMethodName; if (propertyStatus != ScriptCanvas::PropertyStatus::None) { updatedMethodName = (propertyStatus == ScriptCanvas::PropertyStatus::Getter) ? "Get" : "Set"; + context = (propertyStatus == ScriptCanvas::PropertyStatus::Getter) ? "Getter" : "Setter"; } updatedMethodName += methodName; - key << "BehaviorClass" << methodClass.c_str() << "methods" << updatedMethodName << "details"; + key << "BehaviorClass" << context << methodClass << "methods" << updatedMethodName << "details"; GraphCanvas::TranslationRequests::Details details; GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp index 7ea4af9032..bf8482f0ca 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 @@ -63,7 +71,6 @@ #include #include #include -#include "AzQtComponents/Utilities/DesktopUtilities.h" namespace ScriptCanvasEditor { @@ -639,7 +646,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); } 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/Execution/Interpreted/ExecutionInterpretedAPI.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp index bba56847ce..bbd16dfb96 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp @@ -501,43 +501,53 @@ 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 - AZ_WarningOnce("ScriptCanvas", !runtimeData.m_areStaticsInitialized, "ScriptCanvas runtime data already initalized"); - - if (runtimeData.RequiresStaticInitialization()) + if (!runtimeData.m_areStaticsInitialized) { - 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) - { - 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); + InitializeInterpretedStatics(dependency.Get()->GetData()); } - else + +#if defined(AZ_PROFILE_BUILD) || defined(AZ_DEBUG_BUILD) + Execution::InitializeFromLuaStackFunctions(const_cast(runtimeData.m_debugMap)); +#endif + AZ_WarningOnce("ScriptCanvas", !runtimeData.m_areStaticsInitialized, "ScriptCanvas runtime data already initalized"); + + 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 a92c13ac63..0f090574b5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp @@ -49,11 +49,7 @@ namespace ScriptCanvas , config.asset.GetId().ToString().data()); #endif - if (!runtimeAsset->GetData().m_areStaticsInitialized) - { - runtimeAsset->GetData().m_areStaticsInitialized = true; - Execution::InitializeInterpretedStatics(runtimeAsset->GetData()); - } + Execution::InitializeInterpretedStatics(runtimeAsset->GetData()); } void ExecutionStateInterpreted::ClearLuaRegistryIndex() diff --git a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp index 844401d141..25a4b58a74 100644 --- a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp +++ b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp @@ -34,6 +34,7 @@ #include #include #include +#include "Data/DataRegistry.h" namespace ScriptCanvasEditorTools { @@ -187,7 +188,7 @@ namespace ScriptCanvasEditorTools } } - AZ::Entity* TranslationGeneration::TranslateAZEvent(const AZ::BehaviorMethod& method) + AZ::Entity* TranslationGeneration::GetAZEventNode(const AZ::BehaviorMethod& method) { // Make sure the method returns an AZ::Event by reference or pointer if (AZ::MethodReturnsAzEventByReferenceOrPointer(method)) @@ -247,6 +248,11 @@ namespace ScriptCanvasEditorTools { const AZ::BehaviorMethod* behaviorMethod = methodPair.second; + if (TranslateSingleAZEvent(behaviorMethod)) + { + continue; + } + Method methodEntry; AZStd::string cleanName = GraphCanvas::TranslationKey::Sanitize(methodPair.first); @@ -362,20 +368,79 @@ namespace ScriptCanvasEditorTools 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 nodes; + AZStd::vector methods; // Methods for (const auto& behaviorMethod : m_behaviorContext->m_methods) { - const auto& method = *behaviorMethod.second; - AZ::Entity* node = TranslateAZEvent(method); - if (node) - { - nodes.push_back(node); - } + const auto method = behaviorMethod.second; + methods.push_back(method); } // Methods in classes @@ -383,66 +448,14 @@ namespace ScriptCanvasEditorTools { for (auto behaviorMethod : behaviorClass.second->m_methods) { - const auto& method = *behaviorMethod.second; - AZ::Entity* node = TranslateAZEvent(method); - if (node) - { - nodes.push_back(node); - } + const auto method = behaviorMethod.second; + methods.push_back(method); } } - TranslationFormat translationRoot; - - for (auto& node : nodes) + for (auto& method : methods) { - 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(); + TranslateSingleAZEvent(method); } } @@ -483,6 +496,7 @@ namespace ScriptCanvasEditorTools { TranslateNode(node); } + } void TranslationGeneration::TranslateNode(const AZ::TypeId& nodeTypeId) @@ -557,8 +571,11 @@ namespace ScriptCanvasEditorTools nodeComponent->Init(); nodeComponent->Configure(); - int inputIndex = 0; - int outputIndex = 0; + int exeInputIndex = 0; + int exeOutputIndex = 0; + + int dataInputIndex = 0; + int dataOutputIndex = 0; const auto& allSlots = nodeComponent->GetAllSlots(); for (const auto& slot : allSlots) @@ -569,16 +586,16 @@ namespace ScriptCanvasEditorTools { if (slot->GetDescriptor().IsInput()) { - slotEntry.m_key = AZStd::string::format("Input_%s", slot->GetName().c_str()); - inputIndex++; + 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", slot->GetName().c_str()); - outputIndex++; + 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(); @@ -617,8 +634,8 @@ namespace ScriptCanvasEditorTools if (slot->GetDescriptor().IsInput()) { - slotEntry.m_key = AZStd::string::format("DataInput_%s", slot->GetName().c_str()); - inputIndex++; + slotEntry.m_key = AZStd::string::format("DataInput_%s_%d", slot->GetName().c_str(), dataInputIndex); + dataInputIndex++; AZStd::string argumentKey = slotTypeKey; AZStd::string argumentName = slot->GetName(); @@ -631,8 +648,8 @@ namespace ScriptCanvasEditorTools } else if (slot->GetDescriptor().IsOutput()) { - slotEntry.m_key = AZStd::string::format("DataOutput_%s", slot->GetName().c_str()); - outputIndex++; + slotEntry.m_key = AZStd::string::format("DataOutput_%s_%d", slot->GetName().c_str(), dataOutputIndex); + dataOutputIndex++; AZStd::string resultKey = slotTypeKey; AZStd::string resultName = slot->GetName(); @@ -832,6 +849,33 @@ namespace ScriptCanvasEditorTools 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) @@ -915,6 +959,7 @@ namespace ScriptCanvasEditorTools 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 : ""; @@ -922,6 +967,11 @@ namespace ScriptCanvasEditorTools 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); } @@ -937,6 +987,7 @@ namespace ScriptCanvasEditorTools 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 : ""; @@ -944,6 +995,11 @@ namespace ScriptCanvasEditorTools 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); } @@ -1307,7 +1363,7 @@ namespace ScriptCanvasEditorTools scratchBuffer.Clear(); - AzQtComponents::ShowFileOnDesktop(endPath.c_str()); + // AzQtComponents::ShowFileOnDesktop(endPath.c_str()); } diff --git a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h index 0f84c48b22..a5fec82361 100644 --- a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h +++ b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h @@ -108,7 +108,7 @@ namespace ScriptCanvasEditorTools void TranslateEBus(const AZ::BehaviorEBus* behaviorEBus); //! Generate the translation data for a specific AZ::Event - AZ::Entity* TranslateAZEvent(const AZ::BehaviorMethod& method); + bool TranslateSingleAZEvent(const AZ::BehaviorMethod* method); //! Generate the translation data for AZ::Events void TranslateAZEvents(); @@ -131,8 +131,14 @@ namespace ScriptCanvasEditorTools //! 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); diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake index 7984340b7a..eb50f5cb51 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake @@ -7,575 +7,210 @@ # 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 ) diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake new file mode 100644 index 0000000000..7dfe9653b6 --- /dev/null +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_headers.cmake @@ -0,0 +1,378 @@ +# +# Copyright (c) Contributors to the Open 3D Engine Project. +# 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/ScriptCanvasAssetBase.h + Include/ScriptCanvas/Asset/ScriptCanvasAssetData.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/Profiler/Driller.h + Include/ScriptCanvas/Profiler/Aggregator.h + Include/ScriptCanvas/Profiler/DrillerEvents.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/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/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/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.cpp index e9c9874af5..108ae70632 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)) + ; + } } } diff --git a/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.h b/Gems/Terrain/Code/Source/Components/TerrainHeightGradientListComponent.h index b5b1a44192..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; ////////////////////////////////////////////////////////////////////////// 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/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/Vegetation/Code/CMakeLists.txt b/Gems/Vegetation/Code/CMakeLists.txt index 735bb35bd9..53fa6bd59f 100644 --- a/Gems/Vegetation/Code/CMakeLists.txt +++ b/Gems/Vegetation/Code/CMakeLists.txt @@ -103,6 +103,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) AZ::AzTest AZ::AzFrameworkTestShared Gem::Vegetation.Static + Gem::LmbrCentral.Mocks ) ly_add_googletest( NAME Gem::Vegetation.Tests 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/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..221a2da432 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 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/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/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/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/README.md b/README.md index 11fec028bc..063a59de74 100644 --- a/README.md +++ b/README.md @@ -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>. @@ -107,7 +107,7 @@ For more details on the steps above, refer to [Setting up O3DE from GitHub](http Example: ``` - cmake -B C:\my-project\build\windows_vs2019 -S C:\my-project -G "Visual Studio 16" + 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..56a9df4fd1 --- /dev/null +++ b/RETIRED_CODE.md @@ -0,0 +1,33 @@ +## 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 | Commit hash | 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| + diff --git a/Registry/AssetProcessorPlatformConfig.setreg b/Registry/AssetProcessorPlatformConfig.setreg index cf793a9802..30e19762ac 100644 --- a/Registry/AssetProcessorPlatformConfig.setreg +++ b/Registry/AssetProcessorPlatformConfig.setreg @@ -457,6 +457,7 @@ "RC physmaterial": { "glob": "*.physmaterial", "params": "copy", + "critical": "true", "productAssetType": "{9E366D8C-33BB-4825-9A1F-FA3ADBE11D0F}" }, "RC ocm": { 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 4ff71a5b31..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') @@ -384,3 +384,14 @@ class AbstractResourceLocator(object): "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 151a4a3e2b..ec88dce7c3 100644 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/linux.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/linux.py @@ -53,6 +53,12 @@ class _LinuxResourceManager(AbstractResourceLocator): """ 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 4a187b188c..673bfa5050 100755 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/mac.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/mac.py @@ -62,6 +62,12 @@ class _MacResourceLocator(AbstractResourceLocator): """ 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 29289166d4..b31cc6bb5c 100755 --- a/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/windows.py +++ b/Tools/LyTestTools/ly_test_tools/_internal/managers/platforms/windows.py @@ -68,6 +68,12 @@ class _WindowsResourceLocator(AbstractResourceLocator): """ 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 c67ecc5b23..e8fb1d13cf 100755 --- a/Tools/LyTestTools/ly_test_tools/environment/file_system.py +++ b/Tools/LyTestTools/ly_test_tools/environment/file_system.py @@ -293,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/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_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 29b6573f7a..f29a22002e 100644 --- a/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py +++ b/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py @@ -48,6 +48,7 @@ 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 @@ -757,7 +758,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) @@ -823,7 +824,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) @@ -900,7 +901,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/tests/unit/test_file_system.py b/Tools/LyTestTools/tests/unit/test_file_system.py index 2ddd3f8934..2fdcf8131e 100755 --- a/Tools/LyTestTools/tests/unit/test_file_system.py +++ b/Tools/LyTestTools/tests/unit/test_file_system.py @@ -751,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): @@ -763,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): @@ -776,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): @@ -789,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): @@ -821,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): @@ -832,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): @@ -846,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/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/Platform/Mac/BuiltInPackages_mac.cmake b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake index 3f2dc8cedf..a7dcf115eb 100644 --- a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake +++ b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake @@ -26,7 +26,7 @@ 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.7.167-rev6-mac TARGETS AWSNativeSDK PACKAGE_HASH 9b058376dec042ace98e198e902b399739adeb9e9398a6c210171fb530164577) 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-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) 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/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 d716efb225..4ba4e750de 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -111,6 +111,7 @@ 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 diff --git a/cmake/Platform/Linux/Packaging/postrm.in b/cmake/Platform/Linux/Packaging/postrm.in index acda38bf1e..cd6f37abe4 100644 --- a/cmake/Platform/Linux/Packaging/postrm.in +++ b/cmake/Platform/Linux/Packaging/postrm.in @@ -8,8 +8,3 @@ # set -o errexit # exit on the first failure encountered - -{ - pushd @CPACK_PACKAGING_INSTALL_PREFIX@ - popd -} &> /dev/null # hide output diff --git a/cmake/Platform/Linux/Packaging/prerm.in b/cmake/Platform/Linux/Packaging/prerm.in index 5595d7010f..843f21da24 100644 --- a/cmake/Platform/Linux/Packaging/prerm.in +++ b/cmake/Platform/Linux/Packaging/prerm.in @@ -19,5 +19,6 @@ set -o errexit # exit on the first failure encountered pushd @CPACK_PACKAGING_INSTALL_PREFIX@ # delete python downloads rm -rf python/downloaded_packages python/runtime - popd + 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 index d92ee908fd..ebeefe3833 100644 --- a/cmake/Platform/Linux/PackagingPostBuild_linux.cmake +++ b/cmake/Platform/Linux/PackagingPostBuild_linux.cmake @@ -8,6 +8,7 @@ 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") @@ -19,6 +20,10 @@ if(CPACK_UPLOAD_URL) 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. @@ -27,14 +32,13 @@ if(CPACK_UPLOAD_URL) file(GLOB _artifacts "${CPACK_TOPLEVEL_DIRECTORY}/*.deb" "${CPACK_TOPLEVEL_DIRECTORY}/*.sha256" + "${LY_ROOT_FOLDER}/scripts/signer/Platform/Linux/*.gpg" ) file(COPY ${_artifacts} DESTINATION ${CPACK_UPLOAD_DIRECTORY} ) message(STATUS "Artifacts copied to ${CPACK_UPLOAD_DIRECTORY}") - # TODO: copy gpg file to CPACK_UPLOAD_DIRECTORY - ly_upload_to_url( ${CPACK_UPLOAD_URL} ${CPACK_UPLOAD_DIRECTORY} @@ -51,8 +55,6 @@ if(CPACK_UPLOAD_URL) ${latest_deb_package} ) ly_upload_to_latest(${CPACK_UPLOAD_URL} ${latest_deb_package}) - - # TODO: upload gpg file to latest # Generate a checksum file for latest and upload it set(latest_hash_file "${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_NAME}_latest.deb.sha256") diff --git a/cmake/Platform/Linux/PackagingPreBuild_linux.cmake b/cmake/Platform/Linux/PackagingPreBuild_linux.cmake index 31dc393307..39108355ea 100644 --- a/cmake/Platform/Linux/PackagingPreBuild_linux.cmake +++ b/cmake/Platform/Linux/PackagingPreBuild_linux.cmake @@ -9,8 +9,6 @@ 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 signing if we are not uploading the package +if(NOT CPACK_UPLOAD_URL) # Skip this step if we are not uploading the package return() endif() - -# TODO: do signing diff --git a/cmake/Platform/Linux/platform_linux_files.cmake b/cmake/Platform/Linux/platform_linux_files.cmake index d30959b8d2..dd10c47ca6 100644 --- a/cmake/Platform/Linux/platform_linux_files.cmake +++ b/cmake/Platform/Linux/platform_linux_files.cmake @@ -18,6 +18,7 @@ set(FILES LYTestWrappers_linux.cmake LYWrappers_linux.cmake Packaging_linux.cmake + PackagingCodeSign_linux.cmake PackagingPostBuild_linux.cmake PackagingPreBuild_linux.cmake PAL_linux.cmake 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_windows.cmake b/cmake/Platform/Windows/PackagingPostBuild_windows.cmake index 0993135c23..10f0f902a3 100644 --- a/cmake/Platform/Windows/PackagingPostBuild_windows.cmake +++ b/cmake/Platform/Windows/PackagingPostBuild_windows.cmake @@ -8,6 +8,7 @@ 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 @@ -59,39 +60,7 @@ set(_light_command ) if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package - file(TO_NATIVE_PATH "${LY_ROOT_FOLDER}/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() + ly_sign_binaries("${_cpack_wix_out_dir}" "packagePath") endif() message(STATUS "Creating Bootstrap Installer...") @@ -116,18 +85,7 @@ endif() message(STATUS "Bootstrap installer generated to ${_bootstrap_output_file}") if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package - message(STATUS "Signing bootstrap installer in ${_bootstrap_output_file}") - execute_process( - COMMAND ${_signing_command} -bootstrapPath ${_bootstrap_output_file} - 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() + ly_sign_binaries("${_bootstrap_output_file}" "bootstrapPath") endif() # use the internal default path if somehow not specified from cpack_configure_downloads diff --git a/cmake/Platform/Windows/PackagingPreBuild_windows.cmake b/cmake/Platform/Windows/PackagingPreBuild_windows.cmake index 29995518da..b6b5708a8c 100644 --- a/cmake/Platform/Windows/PackagingPreBuild_windows.cmake +++ b/cmake/Platform/Windows/PackagingPreBuild_windows.cmake @@ -8,53 +8,11 @@ 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() -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() +ly_sign_binaries("${_cpack_wix_out_dir}" "exePath") \ No newline at end of file diff --git a/cmake/Platform/Windows/platform_windows_files.cmake b/cmake/Platform/Windows/platform_windows_files.cmake index 984d985380..8ad242f842 100644 --- a/cmake/Platform/Windows/platform_windows_files.cmake +++ b/cmake/Platform/Windows/platform_windows_files.cmake @@ -25,6 +25,7 @@ set(FILES PALDetection_windows.cmake Install_windows.cmake Packaging_windows.cmake + PackagingCodeSign_windows.cmake PackagingPostBuild_windows.cmake PackagingPreBuild_windows.cmake Packaging/Bootstrapper.wxs diff --git a/cmake/Version.cmake b/cmake/Version.cmake index de93ebefef..c5504ec62a 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -16,3 +16,8 @@ if("$ENV{O3DE_VERSION}") # Overriding through environment set(LY_VERSION_STRING "$ENV{O3DE_VERSION}") endif() + +if("$ENV{O3DE_BUILD_VERSION}") + # Overriding through environment + set(LY_VERSION_BUILD_NUMBER "$ENV{O3DE_BUILD_VERSION}") +endif() 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 dbdafcf97d..06fa1ffb5f 100644 --- a/scripts/build/Platform/Android/build_config.json +++ b/scripts/build/Platform/Android/build_config.json @@ -92,7 +92,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", diff --git a/scripts/build/Platform/Linux/build_config.json b/scripts/build/Platform/Linux/build_config.json index 84d1726d47..5290a32f6d 100644 --- a/scripts/build/Platform/Linux/build_config.json +++ b/scripts/build/Platform/Linux/build_config.json @@ -83,8 +83,8 @@ "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all", - "CTEST_OPTIONS": "-E (AutomatedTesting::Atom_TestSuite_Main|AutomatedTesting::PrefabTests|AutomatedTesting::TerrainTests_Main|Gem::EMotionFX.Editor.Tests) -L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --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": { @@ -96,8 +96,8 @@ "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 (AutomatedTesting::Atom_TestSuite_Main|AutomatedTesting::PrefabTests|AutomatedTesting::TerrainTests_Main|Gem::EMotionFX.Editor.Tests) -L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --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": { @@ -146,7 +146,7 @@ "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": { @@ -182,7 +182,7 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_benchmark", "CTEST_OPTIONS": "-L (SUITE_benchmark) --no-tests=error", - "TEST_RESULTS": "True" + "TEST_RESULTS": "False" } }, "release": { @@ -230,6 +230,9 @@ "nightly-clean", "nightly-installer" ], + "PIPELINE_ENV":{ + "NODE_LABEL":"linux-707531fc7-packaging" + }, "COMMAND": "build_installer_linux.sh", "PARAMETERS": { "CONFIGURATION": "profile", diff --git a/scripts/build/Platform/Mac/build_config.json b/scripts/build/Platform/Mac/build_config.json index 34b02a1aec..fb960a96fa 100644 --- a/scripts/build/Platform/Mac/build_config.json +++ b/scripts/build/Platform/Mac/build_config.json @@ -103,7 +103,7 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_periodic", "CTEST_OPTIONS": "-L \"(SUITE_periodic)\"", - "TEST_RESULTS": "True" + "TEST_RESULTS": "False" } }, "benchmark_test_profile": { @@ -120,7 +120,7 @@ "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_benchmark", "CTEST_OPTIONS": "-L \"(SUITE_benchmark)\"", - "TEST_RESULTS": "True" + "TEST_RESULTS": "False" } }, "release": { diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index 6f1aaa1570..c591ca0eac 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": { @@ -79,40 +79,40 @@ "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" } }, - "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 +122,7 @@ "TEST_RESULTS": "True" } }, - "profile_vs2019": { + "profile": { "TAGS": [ "daily-pipeline-metrics", "weekly-build-metrics" @@ -130,14 +130,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_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 +146,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 +161,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 +171,7 @@ "TEST_RESULTS": "True" } }, - "test_gpu_profile_vs2019": { + "test_gpu_profile": { "TAGS":[ "nightly-incremental", "nightly-clean" @@ -182,7 +182,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 +193,7 @@ "TEST_SCREENSHOTS": "True" } }, - "asset_profile_vs2019": { + "asset_profile": { "TAGS": [ "weekly-build-metrics", "nightly-incremental", @@ -202,7 +202,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 +212,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 +233,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 +243,7 @@ "TEST_RESULTS": "True" } }, - "periodic_test_profile_vs2019": { + "periodic_test_profile": { "TAGS": [ "nightly-incremental", "nightly-clean", @@ -252,7 +252,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 +262,7 @@ "TEST_RESULTS": "True" } }, - "sandbox_test_profile_vs2019": { + "sandbox_test_profile": { "TAGS": [ "nightly-incremental", "nightly-clean", @@ -274,7 +274,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 +284,7 @@ "TEST_RESULTS": "True" } }, - "benchmark_test_profile_vs2019": { + "benchmark_test_profile": { "TAGS": [ "nightly-incremental", "nightly-clean", @@ -293,7 +293,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 +303,7 @@ "TEST_RESULTS": "True" } }, - "release_vs2019": { + "release": { "TAGS": [ "default", "nightly-incremental", @@ -313,14 +313,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,25 +329,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": { + "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_TARGET": "INSTALL", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, - "installer_vs2019": { + "installer": { "TAGS": [ "nightly-clean", "nightly-installer" @@ -358,7 +358,7 @@ "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=TRUE -DLY_INSTALLER_DOWNLOAD_URL=!INSTALLER_DOWNLOAD_URL! -DLY_INSTALLER_LICENSE_URL=!INSTALLER_DOWNLOAD_URL!/license", "CMAKE_TARGET": "ALL_BUILD", @@ -366,7 +366,7 @@ "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, - "install_profile_vs2019_pipe": { + "install_profile_pipe": { "TAGS": [ "nightly-incremental", "nightly-clean" @@ -375,9 +375,9 @@ "PROJECT_REPOSITORY_NAME": "TestProject" }, "steps": [ - "install_profile_vs2019", + "install_profile", "project_generate", - "project_engineinstall_profile_vs2019" + "project_engineinstall_profile" ] }, "project_generate": { @@ -388,7 +388,7 @@ "SCRIPT_PARAMETERS": "create-project -pp %WORKSPACE%\\%PROJECT_REPOSITORY_NAME% --force" } }, - "project_enginesource_profile_vs2019": { + "project_enginesource_profile": { "TAGS": [ "project" ], @@ -398,13 +398,13 @@ "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 -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" @@ -413,19 +413,19 @@ "PARAMETERS": { "COMMAND_CWD": "%WORKSPACE%\\%PROJECT_REPOSITORY_NAME%", "CONFIGURATION": "profile", - "OUTPUT_DIRECTORY": "build\\windows_vs2019", + "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/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/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/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/o3de/README.txt b/scripts/o3de/README.txt index ded52bb264..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" + 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/register.py b/scripts/o3de/o3de/register.py index 2500df1568..62a342f948 100644 --- a/scripts/o3de/o3de/register.py +++ b/scripts/o3de/o3de/register.py @@ -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) 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/signer.sh b/scripts/signer/Platform/Linux/signer.sh old mode 100644 new mode 100755 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)))