Merge branch 'development' of https://github.com/o3de/o3de into cgalvan/DraftStreamingImageAssetPixelAPI

This commit is contained in:
Chris Galvan
2022-01-18 10:09:10 -06:00
426 changed files with 4029 additions and 3126 deletions
-1
View File
@@ -27,5 +27,4 @@ else()
set_property(GLOBAL APPEND PROPERTY LY_PROJECTS_TARGET_NAME ${project_target_name})
add_subdirectory(Gem)
endif()
+5 -2
View File
@@ -6,6 +6,9 @@
#
#
set(gem_path ${CMAKE_CURRENT_LIST_DIR})
set(gem_json ${gem_path}/gem.json)
o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
add_subdirectory(Code)
add_subdirectory(PythonTests)
add_subdirectory(PythonCoverage)
add_subdirectory(PythonTests)
+1 -1
View File
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
ly_add_target(
NAME AutomatedTesting ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
@@ -6,4 +6,8 @@
#
#
set(gem_path ${CMAKE_CURRENT_LIST_DIR})
set(gem_json ${gem_path}/gem.json)
o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
add_subdirectory(Code)
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${o3de_gem_restricted_path} ${o3de_gem_path} ${o3de_gem_name})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
if(PAL_TRAIT_PYTHONCOVERAGE_SUPPORTED)
+5 -1
View File
@@ -4,6 +4,7 @@
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Tool",
"summary": "A tool for generating gem coverage for Python tests.",
"canonical_tags": [
@@ -13,5 +14,8 @@
"PythonCoverage"
],
"icon_path": "preview.png",
"requirements": ""
"requirements": "",
"documentation_url": "",
"dependencies": [
]
}
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # for PAL_TRAIT_BLAST Traits
@@ -10,7 +10,7 @@
# Automated Tests
################################################################################
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
include(${pal_dir}/PAL_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
@@ -8,7 +8,8 @@ SPDX-License-Identifier: Apache-2.0 OR MIT
# Built-in Imports
from __future__ import annotations
from typing import List, Tuple, Union
from enum import Enum
import warnings
# Open 3D Engine Imports
import azlmbr
@@ -21,14 +22,25 @@ import azlmbr.legacy.general as general
from editor_python_test_tools.utils import Report
class EditorEntityType(Enum):
GAME = azlmbr.entity.EntityType().Game
LEVEL = azlmbr.entity.EntityType().Level
class EditorComponent:
"""
EditorComponent class used to set and get the component property value using path
EditorComponent object is returned from either of
EditorEntity.add_component() or Entity.add_components() or EditorEntity.get_components_of_type()
which also assigns self.id and self.type_id to the EditorComponent object.
self.type_id is the UUID for the component type as provided by an ebus call.
"""
def __init__(self, type_id: uuid):
self.type_id = type_id
self.id = None
self.property_tree_editor = None
def get_component_name(self) -> str:
"""
Used to get name of component
@@ -38,9 +50,9 @@ class EditorComponent:
assert len(type_names) != 0, "Component object does not have type id"
return type_names[0]
def get_property_tree(self):
def get_property_tree(self, force_get: bool = False):
"""
Used to get the property tree object of component that has following functions associated with it:
Used to get and cache the property tree editor of component that has following functions associated with it:
1. prop_tree.is_container(path)
2. prop_tree.get_container_count(path)
3. prop_tree.reset_container(path)
@@ -48,17 +60,161 @@ class EditorComponent:
5. prop_tree.remove_container_item(path, key)
6. prop_tree.update_container_item(path, key, value)
7. prop_tree.get_container_item(path, key)
:return: Property tree object of a component
:param force_get: Force a fresh property tree editor rather than the cached self.property_tree_editor
:return: Property tree editor of the component
"""
if (not force_get) and (self.property_tree_editor is not None):
return self.property_tree_editor
build_prop_tree_outcome = editor.EditorComponentAPIBus(
bus.Broadcast, "BuildComponentPropertyTreeEditor", self.id
)
assert (
build_prop_tree_outcome.IsSuccess()
), f"Failure: Could not build property tree of component: '{self.get_component_name()}'"
), f"Failure: Could not build property tree editor of component: '{self.get_component_name()}'"
prop_tree = build_prop_tree_outcome.GetValue()
Report.info(prop_tree.build_paths_list())
return prop_tree
self.property_tree_editor = prop_tree
return self.property_tree_editor
def is_property_container(self, component_property_path: str) -> bool:
"""
Used to determine if a component property is a container.
Containers are a collection of same typed values that can expand/shrink to contain more or less.
There are two types of containers; indexed and associative.
Indexed containers use integer key and are something like a linked list
Associative containers utilize keys of the same type which could be any supported type.
:param component_property_path: String of component property. (e.g. 'Settings|Visible')
:return: Boolean True if the property is a container False if it is not.
"""
if self.property_tree_editor is None:
self.get_property_tree()
result = self.property_tree_editor.is_container(component_property_path)
if not result:
Report.info(f"{self.get_component_name()}: '{component_property_path}' is not a container")
return result
def get_container_count(self, component_property_path: str) -> int:
"""
Used to get the count of items in the container.
:param component_property_path: String of component property. (e.g. 'Settings|Visible')
:return: Count of items in the container as unsigned integer
"""
assert (
self.is_property_container(component_property_path)
), f"Failure: '{component_property_path}' is not a property container"
container_count_outcome = self.property_tree_editor.get_container_count(component_property_path)
assert (
container_count_outcome.IsSuccess()
), f"Failure: get_container_count did not return success for '{component_property_path}'"
return container_count_outcome.GetValue()
def reset_container(self, component_property_path: str):
"""
Used to reset a container to empty
:param component_property_path: String of component property. (e.g. 'Settings|Visible')
:return: None
"""
assert (
self.is_property_container(component_property_path)
), f"Failure: '{component_property_path}' is not a property container"
reset_outcome = self.property_tree_editor.reset_container(component_property_path)
assert (
reset_outcome.IsSuccess()
), f"Failure: could not reset_container on '{component_property_path}'"
def append_container_item(self, component_property_path: str, value: any):
"""
Used to append a value to an indexed container item without providing an index key.
Append will fail on an associative container
:param component_property_path: String of component property. (e.g. 'Settings|Visible')
:param value: Value to be set
:return: None
"""
assert (
self.is_property_container(component_property_path)
), f"Failure: '{component_property_path}' is not a property container"
append_outcome = self.property_tree_editor.append_container_item(component_property_path, value)
assert (
append_outcome.IsSuccess()
), f"Failure: could not append_container_item to '{component_property_path}'"
def add_container_item(self, component_property_path: str, key: any, value: any):
"""
Used to add a container item at a specified key.
There are two types of containers; indexed and associative.
Indexed containers use integer key.
Associative containers utilize keys of the same type which could be any supported type.
:param component_property_path: String of component property. (e.g. 'Settings|Visible')
:param key: Zero index integer key or any supported type for associative container
:param value: Value to be set
:return: None
"""
assert (
self.is_property_container(component_property_path)
), f"Failure: '{component_property_path}' is not a property container"
add_outcome = self.property_tree_editor.add_container_item(component_property_path, key, value)
assert (
add_outcome.IsSuccess()
), f"Failure: could not add_container_item '{key}' to '{component_property_path}'"
def get_container_item(self, component_property_path: str, key: any) -> any:
"""
Used to retrieve a container item value at the specified key.
There are two types of containers; indexed and associative.
Indexed containers use integer key.
Associative containers utilize keys of the same type which could be any supported type.
:param component_property_path: String of component property. (e.g. 'Settings|Visible')
:param key: Zero index integer key or any supported type for associative container
:return: Value stored at the key specified
"""
assert (
self.is_property_container(component_property_path)
), f"Failure: '{component_property_path}' is not a property container"
get_outcome = self.property_tree_editor.get_container_item(component_property_path, key)
assert (
get_outcome.IsSuccess()
), (
f"Failure: could not get a value for {self.get_component_name()}: '{component_property_path}' [{key}]. "
f"Error returned by get_container_item: {get_outcome.GetError()}")
return get_outcome.GetValue()
def remove_container_item(self, component_property_path: str, key: any):
"""
Used to remove a container item value at the specified key.
There are two types of containers; indexed and associative.
Indexed containers use integer key.
Associative containers utilize keys of the same type which could be any supported type.
:param component_property_path: String of component property. (e.g. 'Settings|Visible')
:param key: Zero index integer key or any supported type for associative container
:return: None
"""
assert (
self.is_property_container(component_property_path)
), f"Failure: '{component_property_path}' is not a property container"
remove_outcome = self.property_tree_editor.remove_container_item(component_property_path, key)
assert (
remove_outcome.IsSuccess()
), f"Failure: could not remove_container_item '{key}' from '{component_property_path}'"
def update_container_item(self, component_property_path: str, key: any, value: any):
"""
Used to update a container item at a specified key.
There are two types of containers; indexed and associative.
Indexed containers use integer key.
Associative containers utilize keys of the same type which could be any supported type.
:param component_property_path: String of component property. (e.g. 'Settings|Visible')
:param key: Zero index integer key or any supported type for associative container
:param value: Value to be set
:return: None
"""
assert (
self.is_property_container(component_property_path)
), f"Failure: '{component_property_path}' is not a property container"
update_outcome = self.property_tree_editor.update_container_item(component_property_path, key, value)
assert (
update_outcome.IsSuccess()
), f"Failure: could not update '{key}' in '{component_property_path}'"
def get_component_property_value(self, component_property_path: str):
"""
@@ -94,23 +250,36 @@ class EditorComponent:
"""
return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", self.id)
def set_enabled(self, new_state: bool):
"""
Used to set the component enabled state
:param new_state: Boolean enabled True, disabled False
:return: None
"""
if new_state:
editor.EditorComponentAPIBus(bus.Broadcast, "EnableComponents", [self.id])
else:
editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [self.id])
def disable_component(self):
"""
Used to disable the component using its id value.
Deprecation warning! Use set_enabled(False) instead as this method is in deprecation
:return: None
"""
warnings.warn("disable_component is deprecated, use set_enabled(False) instead.", DeprecationWarning)
editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [self.id])
@staticmethod
def get_type_ids(component_names: list) -> list:
def get_type_ids(component_names: list, entity_type: EditorEntityType = EditorEntityType.GAME) -> list:
"""
Used to get type ids of given components list
:param: component_names: List of components to get type ids
:return: List of type ids of given components.
:param component_names: List of components to get type ids
:param entity_type: Entity_Type enum value Entity_Type.GAME is the default
:return: List of type ids of given components. Type id is a UUID as provided by the ebus call
"""
type_ids = editor.EditorComponentAPIBus(
bus.Broadcast, "FindComponentTypeIdsByEntityType", component_names, azlmbr.entity.EntityType().Game
)
bus.Broadcast, "FindComponentTypeIdsByEntityType", component_names, entity_type.value)
return type_ids
@@ -131,7 +300,7 @@ class EditorEntity:
"""
Entity class is used to create and interact with Editor Entities.
Example: To create Editor Entity, Use the code:
test_entity = Entity.create_editor_entity("TestEntity")
test_entity = EditorEntity.create_editor_entity("TestEntity")
# This creates a python object with 'test_entity' linked to entity name "TestEntity" in Editor.
# To add component, use:
test_entity.add_component(<COMPONENT_NAME>)
@@ -276,10 +445,9 @@ class EditorEntity:
:return: List of newly added components to the entity
"""
components = []
type_ids = EditorComponent.get_type_ids(component_names)
type_ids = EditorComponent.get_type_ids(component_names, EditorEntityType.GAME)
for type_id in type_ids:
new_comp = EditorComponent()
new_comp.type_id = type_id
new_comp = EditorComponent(type_id)
add_component_outcome = editor.EditorComponentAPIBus(
bus.Broadcast, "AddComponentsOfType", self.id, [type_id]
)
@@ -291,6 +459,27 @@ class EditorEntity:
self.components.append(new_comp)
return components
def remove_component(self, component_name: str) -> None:
"""
Used to remove a component from Entity
:param component_name: String of component name to remove
:return: None
"""
self.remove_components([component_name])
def remove_components(self, component_names: list):
"""
Used to remove a list of components from Entity
:param component_names: List of component names to remove
:return: None
"""
type_ids = EditorComponent.get_type_ids(component_names, EditorEntityType.GAME)
for type_id in type_ids:
remove_outcome = editor.EditorComponentAPIBus(bus.Broadcast, "RemoveComponents", self.id, [type_id])
assert (
remove_outcome.IsSuccess()
), f"Failure: could not remove component from '{self.get_name()}'"
def get_components_of_type(self, component_names: list) -> List[EditorComponent]:
"""
Used to get components of type component_name that already exists on Entity
@@ -298,10 +487,9 @@ class EditorEntity:
:return: List of Entity Component objects of given component name
"""
component_list = []
type_ids = EditorComponent.get_type_ids(component_names)
type_ids = EditorComponent.get_type_ids(component_names, EditorEntityType.GAME)
for type_id in type_ids:
component = EditorComponent()
component.type_id = type_id
component = EditorComponent(type_id)
get_component_of_type_outcome = editor.EditorComponentAPIBus(
bus.Broadcast, "GetComponentOfType", self.id, type_id
)
@@ -319,7 +507,7 @@ class EditorEntity:
:param component_name: Name of component to check for
:return: True, if entity has specified component. Else, False
"""
type_ids = EditorComponent.get_type_ids([component_name])
type_ids = EditorComponent.get_type_ids([component_name], EditorEntityType.GAME)
return editor.EditorComponentAPIBus(bus.Broadcast, "HasComponentOfType", self.id, type_ids[0])
def get_start_status(self) -> int:
@@ -359,6 +547,21 @@ class EditorEntity:
set_status = self.get_start_status()
assert set_status == status_to_set, f"Failed to set start status of {desired_start_status} to {self.get_name}"
def is_locked(self) -> bool:
"""
Used to get the locked status of the entity
:return: Boolean True if locked False if not locked
"""
return editor.EditorEntityInfoRequestBus(bus.Event, "IsLocked", self.id)
def set_lock_state(self, is_locked: bool) -> None:
"""
Sets the lock state on the object to locked or not locked.
:param is_locked: True for locking, False to unlock.
:return: None
"""
editor.EditorEntityAPIBus(bus.Event, "SetLockState", self.id, is_locked)
def delete(self) -> None:
"""
Used to delete the Entity.
@@ -488,18 +691,6 @@ class EditorLevelEntity:
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:
"""
@@ -518,10 +709,9 @@ class EditorLevelEntity:
:return: List of newly added components to the level
"""
components = []
type_ids = EditorLevelEntity.get_type_ids(component_names)
type_ids = EditorComponent.get_type_ids(component_names, EditorEntityType.LEVEL)
for type_id in type_ids:
new_comp = EditorComponent()
new_comp.type_id = type_id
new_comp = EditorComponent(type_id)
add_component_outcome = editor.EditorLevelComponentAPIBus(
bus.Broadcast, "AddComponentsOfType", [type_id]
)
@@ -540,10 +730,9 @@ class EditorLevelEntity:
:return: List of Level Component objects of given component name
"""
component_list = []
type_ids = EditorLevelEntity.get_type_ids(component_names)
type_ids = EditorComponent.get_type_ids(component_names, EditorEntityType.LEVEL)
for type_id in type_ids:
component = EditorComponent()
component.type_id = type_id
component = EditorComponent(type_id)
get_component_of_type_outcome = editor.EditorLevelComponentAPIBus(
bus.Broadcast, "GetComponentOfType", type_id
)
@@ -562,7 +751,7 @@ class EditorLevelEntity:
: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])
type_ids = EditorComponent.get_type_ids([component_name], EditorEntityType.LEVEL)
return editor.EditorLevelComponentAPIBus(bus.Broadcast, "HasComponentOfType", type_ids[0])
@staticmethod
@@ -572,5 +761,5 @@ class EditorLevelEntity:
: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])
type_ids = EditorComponent.get_type_ids([component_name], EditorEntityType.LEVEL)
return editor.EditorLevelComponentAPIBus(bus.Broadcast, "CountComponentsOfType", type_ids[0])
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # for PAL_TRAIT_WHITEBOX Traits
@@ -93,15 +93,19 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
)
ly_add_pytest(
NAME AssetPipelineTests.AssetBundler
PATH ${CMAKE_CURRENT_LIST_DIR}/asset_bundler_batch_tests.py
NAME AssetPipelineTests.AssetBuilder
PATH ${CMAKE_CURRENT_LIST_DIR}/asset_builder_tests.py
EXCLUDE_TEST_RUN_TARGET_FROM_IDE
TEST_SERIAL
TEST_SUITE periodic
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
AZ::AssetBundlerBatch
)
set(SUPPORTED_PLATFORMS "Windows" "Mac")
if (NOT "${PAL_PLATFORM_NAME}" IN_LIST SUPPORTED_PLATFORMS)
return()
endif()
ly_add_pytest(
NAME AssetPipelineTests.BundleMode
@@ -117,16 +121,16 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
)
ly_add_pytest(
NAME AssetPipelineTests.AssetBuilder
PATH ${CMAKE_CURRENT_LIST_DIR}/asset_builder_tests.py
NAME AssetPipelineTests.AssetBundler
PATH ${CMAKE_CURRENT_LIST_DIR}/asset_bundler_batch_tests.py
EXCLUDE_TEST_RUN_TARGET_FROM_IDE
TEST_SERIAL
TEST_SUITE periodic
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
AZ::AssetBundlerBatch
)
ly_add_pytest(
NAME AssetPipelineTests.MissingDependency
PATH ${CMAKE_CURRENT_LIST_DIR}/missing_dependency_tests.py
@@ -136,5 +140,5 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
RUNTIME_DEPENDENCIES
AZ::AssetProcessorBatch
)
endif()
+8 -3
View File
@@ -4,14 +4,19 @@
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Asset",
"summary": "A standard test scene for Global Illumination (forked from crytek sponza scene)",
"canonical_tags": [
"Gem"
"Gem",
"Asset"
],
"user_tags": [
"Assets"
"Sponza"
],
"icon_path": "preview.png",
"requirements": "",
"dependencies": []
"documentation_url": "",
"dependencies": [
]
}
+11 -3
View File
@@ -3,13 +3,21 @@
"display_name": "AutomatedTesting",
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Amazon Web Services, Inc.",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Code",
"summary": "Project Gem for customizing the AutomatedTesting project functionality.",
"canonical_tags": [
"Gem"
],
"user_tags": [],
"user_tags": [
"AutomatedTesting"
],
"icon_path": "preview.png",
"requirements": ""
"requirements": "",
"documentation_url": "",
"dependencies": [],
"external_subdirectories": [
"PythonCoverage"
]
}
+6 -3
View File
@@ -5,12 +5,15 @@
"modules": [],
"project_id": "{D816AFAE-4BB7-4FEF-88F4-E2B786DCF29D}",
"android_settings": {
"package_name": "com.lumberyard.yourgame",
"package_name": "org.o3de.automatedtesting",
"version_number": 1,
"version_name": "1.0.0",
"orientation": "landscape"
},
"engine": "o3de",
"display_name": "AutomatedTesting",
"icon_path": "preview.png"
}
"icon_path": "preview.png",
"external_subdirectories": [
"Gem"
]
}
+44 -29
View File
@@ -49,21 +49,56 @@ include(cmake/O3DEJson.cmake)
# Subdirectory processing
################################################################################
function(add_engine_json_external_subdirectories)
read_json_external_subdirs(external_subdis ${LY_ROOT_FOLDER}/engine.json)
foreach(external_subdir ${external_subdis})
file(REAL_PATH ${external_subdir} real_external_subdir BASE_DIRECTORY ${LY_ROOT_FOLDER})
list(APPEND engine_external_subdirs ${real_external_subdir})
endforeach()
# this function is building up the LY_EXTERNAL_SUBDIRS global property
function(add_engine_gem_json_external_subdirectories gem_path)
set(gem_json_path ${gem_path}/gem.json)
if(EXISTS ${gem_json_path})
read_json_external_subdirs(gem_external_subdirs ${gem_path}/gem.json)
foreach(gem_external_subdir ${gem_external_subdirs})
file(REAL_PATH ${gem_external_subdir} real_external_subdir BASE_DIRECTORY ${gem_path})
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${real_external_subdir})
add_engine_gem_json_external_subdirectories(${real_external_subdir})
endforeach()
endif()
endfunction()
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${engine_external_subdirs})
function(add_engine_json_external_subdirectories)
read_json_external_subdirs(engine_external_subdirs ${LY_ROOT_FOLDER}/engine.json)
foreach(engine_external_subdir ${engine_external_subdirs})
file(REAL_PATH ${engine_external_subdir} real_external_subdir BASE_DIRECTORY ${LY_ROOT_FOLDER})
set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${real_external_subdir})
add_engine_gem_json_external_subdirectories(${real_external_subdir})
endforeach()
endfunction()
function(add_subdirectory_on_externalsubdirs)
get_property(external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS)
list(APPEND LY_EXTERNAL_SUBDIRS ${external_subdirs})
# Loop over the additional external subdirectories and invoke add_subdirectory on them
foreach(external_directory ${LY_EXTERNAL_SUBDIRS})
# Hash the external_directory name and append it to the Binary Directory section of add_subdirectory
# This is to deal with potential situations where multiple external directories has the same last directory name
# For example if D:/Company1/RayTracingGem and F:/Company2/Path/RayTracingGem were both added as a subdirectory
file(REAL_PATH ${external_directory} full_directory_path)
string(SHA256 full_directory_hash ${full_directory_path})
# Truncate the full_directory_hash down to 8 characters to avoid hitting the Windows 260 character path limit
# when the external subdirectory contains relative paths of significant length
string(SUBSTRING ${full_directory_hash} 0 8 full_directory_hash)
# Use the last directory as the suffix path to use for the Binary Directory
get_filename_component(directory_name ${external_directory} NAME)
add_subdirectory(${external_directory} ${CMAKE_BINARY_DIR}/External/${directory_name}-${full_directory_hash})
endforeach()
endfunction()
# Add the projects first so the Launcher can find them
include(cmake/Projects.cmake)
if(NOT INSTALLED_ENGINE)
# Add external subdirectories listed in the engine.json. LY_EXTERNAL_SUBDIRS is a cache variable so the user can add extra
# external subdirectories. This should go before adding the rest of the targets so the targets are availbe to the launcher.
add_engine_json_external_subdirectories()
add_subdirectory_on_externalsubdirs()
# Add the rest of the targets
add_subdirectory(Assets)
add_subdirectory(Code)
@@ -73,31 +108,11 @@ if(NOT INSTALLED_ENGINE)
add_subdirectory(Templates)
add_subdirectory(Tools)
# Add external subdirectories listed in the engine.json. LY_EXTERNAL_SUBDIRS is a cache variable so the user can add extra
# external subdirectories
add_engine_json_external_subdirectories()
else()
ly_find_o3de_packages()
add_subdirectory_on_externalsubdirs()
endif()
get_property(external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS)
list(APPEND LY_EXTERNAL_SUBDIRS ${external_subdirs})
# Loop over the additional external subdirectories and invoke add_subdirectory on them
foreach(external_directory ${LY_EXTERNAL_SUBDIRS})
# Hash the extenal_directory name and append it to the Binary Directory section of add_subdirectory
# This is to deal with potential situations where multiple external directories has the same last directory name
# For example if D:/Company1/RayTracingGem and F:/Company2/Path/RayTracingGem were both added as a subdirectory
file(REAL_PATH ${external_directory} full_directory_path)
string(SHA256 full_directory_hash ${full_directory_path})
# Truncate the full_directory_hash down to 8 characters to avoid hitting the Windows 260 character path limit
# when the external subdirectory contains relative paths of significant length
string(SUBSTRING ${full_directory_hash} 0 8 full_directory_hash)
# Use the last directory as the suffix path to use for the Binary Directory
get_filename_component(directory_name ${external_directory} NAME)
add_subdirectory(${external_directory} ${CMAKE_BINARY_DIR}/External/${directory_name}-${full_directory_hash})
endforeach()
################################################################################
# Post-processing
################################################################################
@@ -17,6 +17,7 @@
#include <AzToolsFramework/AssetBrowser/AssetBrowserEntry.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserModel.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserTableModel.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.h>
// AzQtComponents
#include <AzQtComponents/Utilities/QtWindowUtilities.h>
@@ -83,6 +84,9 @@ AzAssetBrowserWindow::AzAssetBrowserWindow(QWidget* parent)
m_ui->m_assetBrowserTableViewWidget->setVisible(false);
m_ui->m_toggleDisplayViewBtn->setVisible(false);
m_ui->m_searchWidget->SetFilterInputInterval(AZStd::chrono::milliseconds(250));
m_assetBrowserModel->SetFilterModel(m_filterModel.data());
if (ed_useNewAssetBrowserTableView)
{
m_ui->m_toggleDisplayViewBtn->setVisible(true);
+1 -1
View File
@@ -63,7 +63,7 @@ ly_add_target(
set(pal_cmake_files "")
foreach(enabled_platform ${LY_PAL_TOOLS_ENABLED})
string(TOLOWER ${enabled_platform} enabled_platform_lowercase)
ly_get_list_relative_pal_filename(pal_cmake_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${enabled_platform})
o3de_pal_dir(pal_cmake_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${enabled_platform} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
list(APPEND pal_cmake_files ${pal_cmake_dir}/editor_lib_${enabled_platform_lowercase}_files.cmake)
endforeach()
+1 -1
View File
@@ -582,11 +582,11 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event)
case eNotify_OnCloseScene:
m_renderViewport->SetScene(nullptr);
SetDefaultCamera();
break;
case eNotify_OnEndSceneOpen:
UpdateScene();
SetDefaultCamera();
break;
case eNotify_OnBeginNewScene:
@@ -35,6 +35,11 @@ namespace DisplaySettingsPythonBindingsUnitTests
m_app.Start(appDesc);
m_app.RegisterComponentDescriptor(AzToolsFramework::DisplaySettingsPythonFuncsHandler::CreateDescriptor());
// Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is
// shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash
// in the unit tests.
AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize);
}
void TearDown() override
@@ -53,6 +53,7 @@
#include <AzToolsFramework/ToolsComponents/SelectionComponent.h>
#include <AzToolsFramework/ToolsComponents/TransformComponent.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserEntry.h>
#include <AzToolsFramework/Editor/RichTextHighlighter.h>
#include "OutlinerDisplayOptionsMenu.h"
#include "OutlinerSortFilterProxyModel.hxx"
@@ -252,17 +253,7 @@ QVariant OutlinerListModel::dataForName(const QModelIndex& index, int role) cons
if (s_paintingName && !m_filterString.empty())
{
// highlight characters in filter
int highlightTextIndex = 0;
do
{
highlightTextIndex = label.lastIndexOf(QString(m_filterString.c_str()), highlightTextIndex - 1, Qt::CaseInsensitive);
if (highlightTextIndex >= 0)
{
const QString BACKGROUND_COLOR{ "#707070" };
label.insert(static_cast<int>(highlightTextIndex + m_filterString.length()), "</span>");
label.insert(highlightTextIndex, "<span style=\"background-color: " + BACKGROUND_COLOR + "\">");
}
} while(highlightTextIndex > 0);
label = AzToolsFramework::RichTextHighlighter::HighlightText(label, m_filterString.c_str());
}
return label;
}
@@ -2609,16 +2600,11 @@ void OutlinerItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem&
optionV4.widget->style()->drawControl(QStyle::CE_ItemViewItem, &optionV4, painter);
// Now we setup a Text Document so it can draw the rich text
QTextDocument textDoc;
textDoc.setDefaultFont(optionV4.font);
textDoc.setDefaultStyleSheet("body {color: white}");
textDoc.setHtml("<body>" + entityNameRichText + "</body>");
int verticalOffset = GetEntityNameVerticalOffset(entityId);
painter->translate(textRect.topLeft() + QPoint(0, verticalOffset));
textDoc.setTextWidth(textRect.width());
textDoc.drawContents(painter, QRectF(0, 0, textRect.width(), textRect.height()));
painter->restore();
AzToolsFramework::RichTextHighlighter::PaintHighlightedRichText(entityNameRichText, painter, optionV4, textRect);
OutlinerListModel::s_paintingName = false;
}
else
@@ -565,10 +565,6 @@ namespace AZ
m_entityActivatedEvent.DisconnectAllHandlers();
m_entityDeactivatedEvent.DisconnectAllHandlers();
#if !defined(_RELEASE)
m_budgetTracker.Reset();
#endif
DestroyAllocator();
}
@@ -758,6 +754,12 @@ namespace AZ
static_cast<SettingsRegistryImpl*>(m_settingsRegistry.get())->ClearNotifiers();
static_cast<SettingsRegistryImpl*>(m_settingsRegistry.get())->ClearMergeEvents();
#if !defined(_RELEASE)
// the budget tracker must be cleaned up prior to module unloading to ensure
// budgets initialized cross boundary are freed properly
m_budgetTracker.Reset();
#endif
// Uninit and unload any dynamic modules.
m_moduleManager->UnloadModules();
ComponentApplicationLifecycle::SignalEvent(*m_settingsRegistry, "GemsUnloaded", R"({})");
+10 -6
View File
@@ -62,12 +62,16 @@ namespace AZ::Debug
//
// Anywhere the budget is used, the budget must be declared (either in a header or in the source file itself)
// AZ_DECLARE_BUDGET(AzCore);
#define AZ_DEFINE_BUDGET(name) \
::AZ::Debug::Budget* AZ_BUDGET_GETTER(name)() \
{ \
constexpr static uint32_t crc = AZ_CRC_CE(#name); \
static ::AZ::Debug::Budget* budget = ::AZ::Debug::BudgetTracker::GetBudgetFromEnvironment(#name, crc); \
return budget; \
#define AZ_DEFINE_BUDGET(name) \
::AZ::Debug::Budget* AZ_BUDGET_GETTER(name)() \
{ \
static ::AZ::Debug::Budget* budget = nullptr; \
if (budget == nullptr) \
{ \
constexpr static uint32_t crc = AZ_CRC_CE(#name); \
::AZ::Debug::BudgetTracker::GetBudgetFromEnvironment(budget, #name, crc); \
} \
return budget; \
}
#endif
@@ -13,23 +13,24 @@
#include <AzCore/Interface/Interface.h>
#include <AzCore/Memory/Memory.h>
#include <AzCore/std/containers/unordered_map.h>
#include <AzCore/std/containers/unordered_set.h>
#include <AzCore/std/parallel/scoped_lock.h>
namespace AZ::Debug
{
struct BudgetTracker::BudgetTrackerImpl
{
AZStd::unordered_map<const char*, Budget> m_budgets;
AZStd::unordered_map<AZStd::string_view, Budget> m_budgets;
AZStd::unordered_set<Budget**> m_externalBudgetRefs;
};
Budget* BudgetTracker::GetBudgetFromEnvironment(const char* budgetName, uint32_t crc)
void BudgetTracker::GetBudgetFromEnvironment(Budget*& extBudgetRef, const char* budgetName, uint32_t crc)
{
BudgetTracker* tracker = Interface<BudgetTracker>::Get();
if (tracker)
{
return &tracker->GetBudget(budgetName, crc);
tracker->GetBudget(extBudgetRef, budgetName, crc);
}
return nullptr;
}
BudgetTracker::~BudgetTracker()
@@ -54,17 +55,24 @@ namespace AZ::Debug
if (m_impl)
{
Interface<BudgetTracker>::Unregister(this);
for (auto budgetRef : m_impl->m_externalBudgetRefs)
{
*budgetRef = nullptr;
}
delete m_impl;
m_impl = nullptr;
}
}
Budget& BudgetTracker::GetBudget(const char* budgetName, uint32_t crc)
void BudgetTracker::GetBudget(Budget*& extBudgetRef, const char* budgetName, uint32_t crc)
{
AZStd::scoped_lock lock{ m_mutex };
auto it = m_impl->m_budgets.try_emplace(budgetName, budgetName, crc).first;
m_impl->m_externalBudgetRefs.insert(&extBudgetRef);
return it->second;
auto iter = m_impl->m_budgets.try_emplace(budgetName, budgetName, crc).first;
extBudgetRef = &iter->second;
}
} // namespace AZ::Debug
@@ -20,7 +20,7 @@ namespace AZ::Debug
{
public:
AZ_TYPE_INFO(BudgetTracker, "{E14A746D-BFFE-4C02-90FB-4699B79864A5}");
static Budget* GetBudgetFromEnvironment(const char* budgetName, uint32_t crc);
static void GetBudgetFromEnvironment(Budget*& extBudgetRef, const char* budgetName, uint32_t crc);
~BudgetTracker();
@@ -28,7 +28,7 @@ namespace AZ::Debug
bool Init();
void Reset();
Budget& GetBudget(const char* budgetName, uint32_t crc);
void GetBudget(Budget*& extBudgetRef, const char* budgetName, uint32_t crc);
private:
struct BudgetTrackerImpl;
@@ -59,7 +59,7 @@ namespace AZStd
constexpr span(pointer s, size_type length);
constexpr span(pointer first, const_pointer last);
constexpr span(pointer first, pointer last);
// We explicitly delete this constructor because it's too easy to accidentally
// create a span to just the first element instead of an entire array.
@@ -24,7 +24,7 @@ namespace AZStd
}
template <class Element>
inline constexpr span<Element>::span(pointer first, const_pointer last)
inline constexpr span<Element>::span(pointer first, pointer last)
: m_begin(first)
, m_end(last)
{ }
@@ -1760,7 +1760,8 @@ namespace AZStd
template<class Element, size_t MaxElementCount, class Traits>
struct hash<basic_fixed_string<Element, MaxElementCount, Traits>>
{
inline constexpr size_t operator()(const basic_fixed_string<Element, MaxElementCount, Traits>& value) const
using is_transparent = void;
inline constexpr size_t operator()(const basic_string_view<Element, Traits>& value) const
{
return hash_string(value.begin(), value.length());
}
@@ -2071,9 +2071,8 @@ namespace AZStd
template<class Element, class Traits, class Allocator>
struct hash< basic_string< Element, Traits, Allocator> >
{
typedef basic_string< Element, Traits, Allocator> argument_type;
typedef AZStd::size_t result_type;
inline result_type operator()(const argument_type& value) const
using is_transparent = void;
inline constexpr size_t operator()(const basic_string_view<Element, Traits>& value) const
{
return hash_string(value.begin(), value.length());
}
+5 -5
View File
@@ -9,8 +9,8 @@
# TODO: would like to be able to build from this path, however, the whole setup is done at the workspace's root
# we also dont want to drop cmake output files everywhere.
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common)
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common)
if(PAL_TRAIT_PROF_PIX_SUPPORTED)
set(LY_PIX_ENABLED OFF CACHE BOOL "Enables PIX profiler integration.")
@@ -110,15 +110,15 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
AZ::AzTest
)
ly_get_list_relative_pal_filename(pal_test_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_tests_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
ly_add_target(
NAME AzCore.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE AZ
FILES_CMAKE
Tests/azcoretests_files.cmake
${pal_test_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
${pal_tests_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
PLATFORM_INCLUDE_FILES
${pal_test_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
${pal_tests_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
INCLUDE_DIRECTORIES
PRIVATE
Tests
@@ -129,6 +129,32 @@ namespace Camera
GetFrustumHeight()
};
}
//! Unprojects a position in screen space pixel coordinates to world space.
//! With a depth of zero, the position returned will be on the near clip plane of the camera
//! in world space.
//! @param screenPosition The absolute screen position
//! @param depth The depth offset into the world relative to the near clip plane of the camera
//! @return the position in world space
virtual AZ::Vector3 ScreenToWorld(const AZ::Vector2& screenPosition, float depth) = 0;
//! Unprojects a position in screen space normalized device coordinates to world space.
//! With a depth of zero, the position returned will be on the near clip plane of the camera
//! in world space.
//! @param screenNdcPosition The normalized device coordinates in the range [0,1]
//! @param depth The depth offset into the world relative to the near clip plane of the camera
//! @return the position in world space
virtual AZ::Vector3 ScreenNdcToWorld(const AZ::Vector2& screenNdcPosition, float depth) = 0;
//! Projects a position in world space to screen space for the given camera.
//! @param worldPosition The world position
//! @return The absolute screen position
virtual AZ::Vector2 WorldToScreen(const AZ::Vector3& worldPosition) = 0;
//! Projects a position in world space to screen space normalized device coordinates.
//! @param worldPosition The world position
//! @return The normalized device coordinates in the range [0,1]
virtual AZ::Vector2 WorldToScreenNdc(const AZ::Vector3& worldPosition) = 0;
};
using CameraRequestBus = AZ::EBus<CameraComponentRequests>;
+6 -6
View File
@@ -8,8 +8,8 @@
include(AzFramework/feature_options.cmake)
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common)
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common)
ly_add_target(
NAME AzFramework STATIC
@@ -44,7 +44,7 @@ ly_add_source_properties(
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(test_pal_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
ly_add_target(
NAME AzFrameworkTestShared STATIC
@@ -86,11 +86,11 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
NAMESPACE AZ
FILES_CMAKE
Tests/frameworktests_files.cmake
${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
${test_pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Tests
${pal_dir}
${test_pal_dir}
BUILD_DEPENDENCIES
PRIVATE
AZ::AzFramework
@@ -104,7 +104,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
NAME AZ::AzFramework.Tests
)
include(${pal_dir}/platform_specific_test_targets.cmake)
include(${test_pal_dir}/platform_specific_test_targets.cmake)
endif()
+2 -2
View File
@@ -6,8 +6,8 @@
#
#
ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common)
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common)
ly_add_target(
NAME AzNetworking STATIC
@@ -870,8 +870,7 @@ void SliderDouble::setCurveMidpoint(double midpoint)
QString SliderDouble::hoverValueText(int sliderValue) const
{
// maybe format this, max number of digits?
QString valueText = locale().toString(calculateRealSliderValue(sliderValue), 'f', m_decimals);
QString valueText = toString(calculateRealSliderValue(sliderValue), m_decimals, locale(), false, true);
return QStringLiteral("%1").arg(valueText);
}
@@ -14,6 +14,7 @@
#include <QHBoxLayout>
#include <QSignalBlocker>
#include <QTimer>
namespace AzQtComponents
{
@@ -254,11 +255,12 @@ SliderDoubleCombo::~SliderDoubleCombo()
{
}
bool m_fromSlider{ false };
void SliderDoubleCombo::setValueSlider(double value)
{
const bool doEmit = m_value != value;
m_value = value;
updateSpinBox();
updateSlider();
@@ -267,6 +269,8 @@ void SliderDoubleCombo::setValueSlider(double value)
// We don't want to update the slider from setValue as this
// causes rounding errors in the tooltip hint.
m_fromSlider = true;
QTimer::singleShot( 10, []() { m_fromSlider = false; });
Q_EMIT valueChanged();
}
}
@@ -286,10 +290,6 @@ void SliderDoubleCombo::setValue(double value)
Q_EMIT valueChanged();
}
}
else
{
m_fromSlider = false;
}
}
SliderDouble* SliderDoubleCombo::slider() const
@@ -237,6 +237,5 @@ namespace AzQtComponents
double m_softMinimum = 0.0;
double m_softMaximum = 100.0;
double m_value = 0.0;
bool m_fromSlider{ false };
};
} // namespace AzQtComponents
+1 -1
View File
@@ -10,7 +10,7 @@ if(NOT PAL_TRAIT_BUILD_HOST_TOOLS)
return()
endif()
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
ly_add_target(
NAME AzQtComponents SHARED
+4 -4
View File
@@ -7,18 +7,18 @@
#
if(NOT LY_MONOLITHIC_GAME)
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/AzTest/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_aztest_dir ${CMAKE_CURRENT_LIST_DIR}/AzTest/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
ly_add_target(
NAME AzTest STATIC
NAMESPACE AZ
FILES_CMAKE
AzTest/aztest_files.cmake
${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
${pal_aztest_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
INCLUDE_DIRECTORIES
PUBLIC
.
${pal_dir}
${pal_aztest_dir}
BUILD_DEPENDENCIES
PUBLIC
3rdParty::googletest::GMock
@@ -26,6 +26,6 @@ if(NOT LY_MONOLITHIC_GAME)
3rdParty::GoogleBenchmark
AZ::AzCore
PLATFORM_INCLUDE_FILES
${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
${pal_aztest_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
)
endif()
@@ -68,6 +68,11 @@ namespace AzToolsFramework
}
}
QSharedPointer<const StringFilter> AssetBrowserFilterModel::GetStringFilter() const
{
return m_stringFilter;
}
bool AssetBrowserFilterModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
{
//get the source idx, if invalid early out
@@ -48,7 +48,7 @@ namespace AzToolsFramework
// AssetBrowserComponentNotificationBus
//////////////////////////////////////////////////////////////////////////
void OnAssetBrowserComponentReady() override;
QSharedPointer<const StringFilter> GetStringFilter() const;
Q_SIGNALS:
void filterChanged();
//////////////////////////////////////////////////////////////////////////
@@ -70,7 +70,7 @@ namespace AzToolsFramework
//Asset source name match filter
FilterConstType m_filter;
AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") // 4251: class '...' needs to have dll-interface to be used by clients of class '...'
QWeakPointer<const StringFilter> m_stringFilter;
QSharedPointer<const StringFilter> m_stringFilter;
QWeakPointer<const CompositeFilter> m_assetTypeFilter;
QCollator m_collator; // cache the collator as its somewhat expensive to constantly create and destroy one.
AZ_POP_DISABLE_WARNING
@@ -13,6 +13,7 @@
#include <AzToolsFramework/AssetBrowser/Entries/SourceAssetBrowserEntry.h>
#include <AzToolsFramework/AssetBrowser/Entries/ProductAssetBrowserEntry.h>
#include <AzToolsFramework/AssetBrowser/Entries/AssetBrowserEntryCache.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.h>
#include <QMimeData>
AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") // 'QRegularExpression::d': class 'QExplicitlySharedDataPointer<QRegularExpressionPrivate>' needs to have dll-interface to be used by clients of class 'QRegularExpression'
@@ -268,6 +269,21 @@ namespace AzToolsFramework
m_rootEntry = rootEntry;
}
AssetBrowserFilterModel* AssetBrowserModel::GetFilterModel()
{
return m_filterModel;
}
const AssetBrowserFilterModel* AssetBrowserModel::GetFilterModel() const
{
return m_filterModel;
}
void AssetBrowser::AssetBrowserModel::SetFilterModel(AssetBrowserFilterModel* filterModel)
{
m_filterModel = filterModel;
}
QModelIndex AssetBrowserModel::parent(const QModelIndex& child) const
{
if (!child.isValid())
@@ -35,6 +35,7 @@ namespace AzToolsFramework
class AssetBrowserEntry;
class RootAssetBrowserEntry;
class AssetEntryChangeset;
class AssetBrowserFilterModel;
class AssetBrowserModel
: public QAbstractItemModel
@@ -75,7 +76,7 @@ namespace AzToolsFramework
void EndAddEntry(AssetBrowserEntry* parent) override;
void BeginRemoveEntry(AssetBrowserEntry* entry) override;
void EndRemoveEntry() override;
//////////////////////////////////////////////////////////////////////////
// TickBus
//////////////////////////////////////////////////////////////////////////
@@ -84,10 +85,16 @@ namespace AzToolsFramework
AZStd::shared_ptr<RootAssetBrowserEntry> GetRootEntry() const;
void SetRootEntry(AZStd::shared_ptr<RootAssetBrowserEntry> rootEntry);
AssetBrowserFilterModel* GetFilterModel();
const AssetBrowserFilterModel* GetFilterModel() const;
void SetFilterModel(AssetBrowserFilterModel* filterModel);
static void SourceIndexesToAssetIds(const QModelIndexList& indexes, AZStd::vector<AZ::Data::AssetId>& assetIds);
static void SourceIndexesToAssetDatabaseEntries(const QModelIndexList& indexes, AZStd::vector<AssetBrowserEntry*>& entries);
private:
//Non owning pointer
AssetBrowserFilterModel* m_filterModel = nullptr;
AZStd::shared_ptr<RootAssetBrowserEntry> m_rootEntry;
bool m_loaded;
bool m_addingEntry;
@@ -229,6 +229,11 @@ namespace AzToolsFramework
Q_EMIT updatedSignal();
}
QString StringFilter::GetFilterString() const
{
return m_filterString;
}
QString StringFilter::GetNameInternal() const
{
return m_filterString;
@@ -106,6 +106,7 @@ namespace AzToolsFramework
~StringFilter() override = default;
void SetFilterString(const QString& filterString);
QString GetFilterString() const;
protected:
QString GetNameInternal() const override;
@@ -66,6 +66,7 @@ namespace AzToolsFramework
m_tableModel = qobject_cast<AssetBrowserTableModel*>(model);
AZ_Assert(m_tableModel, "Expecting AssetBrowserTableModel");
m_sourceFilterModel = qobject_cast<AssetBrowserFilterModel*>(m_tableModel->sourceModel());
m_delegate->Init();
AzQtComponents::TableView::setModel(model);
connect(m_tableModel, &AssetBrowserTableModel::layoutChanged, this, &AssetBrowserTableView::layoutChangedSlot);
@@ -9,12 +9,16 @@
#include <AzToolsFramework/AssetBrowser/Entries/AssetBrowserEntry.h>
#include <AzToolsFramework/AssetBrowser/Entries/SourceAssetBrowserEntry.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserModel.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.h>
#include <AzToolsFramework/Thumbnails/ThumbnailerBus.h>
#include <AzToolsFramework/AssetBrowser/Views/EntryDelegate.h>
#include <AzCore/Utils/Utils.h>
#include <AzQtComponents/Components/StyledBusyLabel.h>
#include <AzToolsFramework/Editor/RichTextHighlighter.h>
#include <QApplication>
#include <QTextDocument>
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // 4251: class 'QScopedPointer<QBrushData,QBrushDataPointerDeleter>' needs to have dll-interface to be used by clients of class 'QBrush'
// 4800: 'uint': forcing value to bool 'true' or 'false' (performance warning)
#include <QAbstractItemView>
@@ -160,13 +164,20 @@ namespace AzToolsFramework
LoadBranchPixMaps();
}
void SearchEntryDelegate::Init()
{
AssetBrowserModel* assetBrowserModel;
AssetBrowserComponentRequestBus::BroadcastResult(assetBrowserModel, &AssetBrowserComponentRequests::GetAssetBrowserModel);
AZ_Assert(assetBrowserModel, "Failed to get filebrowser model");
m_assetBrowserFilerModel = assetBrowserModel->GetFilterModel();
}
void SearchEntryDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
{
auto data = index.data(AssetBrowserModel::Roles::EntryRole);
if (data.canConvert<const AssetBrowserEntry*>())
{
bool isEnabled = (option.state & QStyle::State_Enabled) != 0;
bool isSelected = (option.state & QStyle::State_Selected) != 0;
QStyle* style = option.widget ? option.widget->style() : QApplication::style();
@@ -265,13 +276,21 @@ namespace AzToolsFramework
remainingRect.adjust(thumbX, 0, 0, 0); // bump it to the right by the size of the thumbnail
remainingRect.adjust(EntrySpacingLeftPixels, 0, 0, 0); // bump it to the right by the spacing.
}
QString displayString = index.column() == aznumeric_cast<int>(AssetBrowserEntry::Column::Name)
? qvariant_cast<QString>(entry->data(aznumeric_cast<int>(AssetBrowserEntry::Column::Name)))
: qvariant_cast<QString>(entry->data(aznumeric_cast<int>(AssetBrowserEntry::Column::Path)));
style->drawItemText(
painter, remainingRect, option.displayAlignment, actualPalette, isEnabled, displayString,
isSelected ? QPalette::HighlightedText : QPalette::Text);
QStyleOptionViewItem optionV4{ option };
initStyleOption(&optionV4, index);
optionV4.state &= ~(QStyle::State_HasFocus | QStyle::State_Selected);
if (m_assetBrowserFilerModel && m_assetBrowserFilerModel->GetStringFilter()
&& !m_assetBrowserFilerModel->GetStringFilter()->GetFilterString().isEmpty())
{
displayString = RichTextHighlighter::HighlightText(displayString, m_assetBrowserFilerModel->GetStringFilter()->GetFilterString());
}
RichTextHighlighter::PaintHighlightedRichText(displayString, painter, optionV4, remainingRect);
}
}
@@ -70,7 +70,7 @@ namespace AzToolsFramework
Q_OBJECT
public:
explicit SearchEntryDelegate(QWidget* parent = nullptr);
void Init();
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
private:
@@ -78,6 +78,7 @@ namespace AzToolsFramework
void DrawBranchPixMap(EntryBranchType branchType, QPainter* painter, const QPoint& point, const QSize& size) const;
private:
AssetBrowserFilterModel* m_assetBrowserFilerModel;
QMap<EntryBranchType, QPixmap> m_branchIcons;
};
} // namespace AssetBrowser
@@ -0,0 +1,55 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* 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 "RichTextHighlighter.h"
namespace AzToolsFramework
{
QString RichTextHighlighter::HighlightText(const QString& displayString, const QString& matchingSubstring)
{
QString highlightedString = displayString;
int highlightTextIndex = 0;
do
{
highlightTextIndex = highlightedString.lastIndexOf(matchingSubstring, highlightTextIndex - 1, Qt::CaseInsensitive);
if (highlightTextIndex >= 0)
{
const QString backgroundColor{ "#707070" };
highlightedString.insert(static_cast<int>(highlightTextIndex + matchingSubstring.length()), "</span>");
highlightedString.insert(highlightTextIndex, "<span style=\"background-color: " + backgroundColor + "\">");
}
} while (highlightTextIndex > 0);
return highlightedString;
}
void RichTextHighlighter::PaintHighlightedRichText(const QString& highlightedString,QPainter* painter, QStyleOptionViewItem option, QRect availableRect)
{
painter->save();
painter->setRenderHint(QPainter::Antialiasing);
// Now we setup a Text Document so it can draw the rich text
QTextDocument textDoc;
textDoc.setDefaultFont(option.font);
if (option.state & QStyle::State_Enabled)
{
textDoc.setDefaultStyleSheet("body {color: white}");
}
else
{
textDoc.setDefaultStyleSheet("body {color: #7C7C7C}");
}
textDoc.setHtml("<body>" + highlightedString + "</body>");
painter->translate(availableRect.topLeft());
textDoc.setTextWidth(availableRect.width());
textDoc.drawContents(painter, QRectF(0, 0, availableRect.width(), availableRect.height()));
painter->restore();
}
} // namespace AzToolsFramework
@@ -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 <AzCore/Memory/SystemAllocator.h>
#include <AzCore/base.h>
#include <QString>
#include <QStyleOptionViewItem>
#include <QTextDocument>
AZ_PUSH_DISABLE_WARNING(4251 4800,"-Wunknown-warning-option") // 4251: class 'QScopedPointer<QBrushData,QBrushDataPointerDeleter>' needs to have dll-interface to be used
// by clients of class 'QBrush' 4800: 'uint': forcing value to bool 'true' or 'false' (performance warning)
#include <QPainter>
AZ_POP_DISABLE_WARNING
namespace AzToolsFramework
{
//! @class RichTextHighlighter
//! @brief Highlights a given string given a matching substring.
class RichTextHighlighter
{
public:
AZ_CLASS_ALLOCATOR(RichTextHighlighter, AZ::SystemAllocator, 0);
RichTextHighlighter() = delete;
static QString HighlightText(const QString& displayString, const QString& matchingSubstring);
static void PaintHighlightedRichText(const QString& highlightedString,QPainter* painter, QStyleOptionViewItem option, QRect availableRect);
};
} // namespace AzToolsFramework
@@ -66,6 +66,7 @@
#include <AzToolsFramework/UI/Outliner/EntityOutlinerTreeView.hxx>
#include <AzToolsFramework/UI/Outliner/EntityOutlinerCacheBus.h>
#include <AzToolsFramework/UI/UICore/WidgetHelpers.h>
#include <AzToolsFramework/Editor/RichTextHighlighter.h>
////////////////////////////////////////////////////////////////////////////
// EntityOutlinerListModel
@@ -259,17 +260,7 @@ namespace AzToolsFramework
if (s_paintingName && !m_filterString.empty())
{
// highlight characters in filter
int highlightTextIndex = 0;
do
{
highlightTextIndex = label.lastIndexOf(QString(m_filterString.c_str()), highlightTextIndex - 1, Qt::CaseInsensitive);
if (highlightTextIndex >= 0)
{
const QString BACKGROUND_COLOR{ "#707070" };
label.insert(highlightTextIndex + static_cast<int>(m_filterString.length()), "</span>");
label.insert(highlightTextIndex, "<span style=\"background-color: " + BACKGROUND_COLOR + "\">");
}
} while(highlightTextIndex > 0);
label = AzToolsFramework::RichTextHighlighter::HighlightText(label, m_filterString.c_str());
}
return label;
}
@@ -2375,23 +2366,8 @@ namespace AzToolsFramework
optionV4.text.clear();
optionV4.widget->style()->drawControl(QStyle::CE_ItemViewItem, &optionV4, painter);
// Now we setup a Text Document so it can draw the rich text
QTextDocument textDoc;
textDoc.setDefaultFont(optionV4.font);
if (option.state & QStyle::State_Enabled)
{
textDoc.setDefaultStyleSheet("body {color: white}");
}
else
{
textDoc.setDefaultStyleSheet("body {color: #7C7C7C}");
}
textDoc.setHtml("<body>" + entityNameRichText + "</body>");
painter->translate(textRect.topLeft());
textDoc.setTextWidth(textRect.width());
textDoc.drawContents(painter, QRectF(0, 0, textRect.width(), textRect.height()));
AzToolsFramework::RichTextHighlighter::PaintHighlightedRichText(entityNameRichText, painter, optionV4, textRect);
painter->restore();
EntityOutlinerListModel::s_paintingName = false;
}
@@ -123,6 +123,8 @@ set(FILES
ContainerEntity/ContainerEntitySystemComponent.h
Editor/EditorContextMenuBus.h
Editor/EditorSettingsAPIBus.h
Editor/RichTextHighlighter.h
Editor/RichTextHighlighter.cpp
Entity/EditorEntityStartStatus.h
Entity/EditorEntityAPIBus.h
Entity/EditorEntityContextComponent.cpp
+3 -3
View File
@@ -6,8 +6,8 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common)
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common)
ly_add_target(
NAME GridMate STATIC
@@ -41,7 +41,7 @@ ly_add_source_properties(
################################################################################
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
ly_get_list_relative_pal_filename(pal_test_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_test_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
ly_add_target(
NAME GridMate.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE AZ
+1 -1
View File
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
include(${pal_dir}/LauncherUnified_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
@@ -201,7 +201,7 @@ function(ly_delayed_generate_static_modules_inl)
foreach(game_gem_dependency ${all_game_gem_dependencies})
# Sometimes, a gem's Client variant may be an interface library
# which dependes on multiple gem targets. The interface libraries
# which depends on multiple gem targets. The interface libraries
# should be skipped; the real dependencies of the interface will be processed
if(TARGET ${game_gem_dependency})
get_target_property(target_type ${game_gem_dependency} TYPE)
+1 -1
View File
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
ly_add_target(
NAME CryCommon STATIC
+2 -3
View File
@@ -13,7 +13,6 @@
#include <AzCore/Math/Crc.h>
#include <AzCore/Math/Quaternion.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/std/allocator_stateless.h>
#include <Range.h>
#include <AnimKey.h>
@@ -184,7 +183,7 @@ public:
private:
AnimParamType m_type;
AZStd::basic_string<char, AZStd::char_traits<char>, AZStd::stateless_allocator> m_name;
AZStd::string m_name;
};
namespace AZStd
@@ -620,7 +619,7 @@ public:
, valueType(_valueType)
, flags(_flags) {};
AZStd::basic_string<char, AZStd::char_traits<char>, AZStd::stateless_allocator> name; // parameter name.
AZStd::string name; // parameter name.
CAnimParamType paramType; // parameter id.
AnimValueType valueType; // value type, defines type of track to use for animating this parameter.
ESupportedParamFlags flags; // combination of flags from ESupportedParamFlags.
+1 -1
View File
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
add_subdirectory(XML)
+2 -2
View File
@@ -6,14 +6,14 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/source/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/source/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
ly_add_target(
NAME AWSNativeSDKInit STATIC
NAMESPACE AZ
FILES_CMAKE
aws_native_sdk_init_files.cmake
${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
INCLUDE_DIRECTORIES
PUBLIC
include
@@ -11,7 +11,7 @@ ly_get_pal_tool_dirs(pal_tool_dirs ${CMAKE_CURRENT_LIST_DIR}/AssetBuilderSDK/Pla
set(pal_files "")
foreach(enabled_platform ${LY_PAL_TOOLS_ENABLED})
string(TOLOWER ${enabled_platform} enabled_platform_lowercase)
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/AssetBuilderSDK/Platform/${enabled_platform})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/AssetBuilderSDK/Platform/${enabled_platform} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
list(APPEND pal_files ${pal_dir}/assetbuildersdk_${enabled_platform_lowercase}_files.cmake)
endforeach()
+1 -1
View File
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
include(${pal_dir}/platform_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
+1 -1
View File
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
+3 -1
View File
@@ -10,6 +10,8 @@ if(NOT PAL_TRAIT_BUILD_HOST_TOOLS)
return()
endif()
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
ly_add_target(
NAME LuaIDE APPLICATION
NAMESPACE AZ
@@ -18,7 +20,7 @@ ly_add_target(
AUTORCC
FILES_CMAKE
lua_ide_files.cmake
Platform/${PAL_PLATFORM_NAME}/lua_ide_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
${pal_dir}/lua_ide_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
.
@@ -1221,7 +1221,7 @@ namespace O3DE::ProjectManager
auto result = ExecuteWithLockErrorHandling(
[&]
{
for (auto repoUri : m_manifest.attr("get_repos")())
for (auto repoUri : m_manifest.attr("get_manifest_repos")())
{
gemRepos.push_back(GetGemRepoInfo(repoUri));
}
+1 -1
View File
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
ly_add_target(
NAME RemoteConsoleCore STATIC
+1 -1
View File
@@ -10,7 +10,7 @@ if (NOT PAL_TRAIT_BUILD_HOST_TOOLS)
return()
endif()
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
ly_add_target(
NAME SceneData SHARED
@@ -6,9 +6,9 @@
#
#
ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
if(PAL_TRAIT_TEST_IMPACT_FRAMEWORK_SUPPORTED)
add_subdirectory(Runtime)
@@ -6,8 +6,8 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME})
ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common)
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER})
set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common)
ly_add_target(
NAME TestImpact.Runtime.Static STATIC
+4
View File
@@ -6,4 +6,8 @@
#
#
set(gem_path ${CMAKE_CURRENT_LIST_DIR})
set(gem_json ${gem_path}/gem.json)
o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
add_subdirectory(Code)
+1 -1
View File
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
ly_add_target(
NAME AWSClientAuth.Static STATIC
+3 -1
View File
@@ -3,7 +3,8 @@
"display_name": "AWS Client Authorization",
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Amazon Web Services, Inc.",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Code",
"summary": "AWS Client Auth provides client authentication and AWS authorization solution.",
"canonical_tags": [
@@ -15,6 +16,7 @@
"SDK"
],
"icon_path": "preview.png",
"requirements": "",
"documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-client-auth/",
"dependencies": [
"AWSCore",
+4
View File
@@ -6,4 +6,8 @@
#
#
set(gem_path ${CMAKE_CURRENT_LIST_DIR})
set(gem_json ${gem_path}/gem.json)
o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
add_subdirectory(Code)
+2 -2
View File
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
ly_add_target(
NAME AWSCore.Static STATIC
@@ -61,7 +61,7 @@ ly_create_alias(
if (PAL_TRAIT_BUILD_HOST_TOOLS)
include(${CMAKE_CURRENT_SOURCE_DIR}/Platform/${PAL_PLATFORM_NAME}/PAL_traits_editor_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
include(${pal_dir}/PAL_traits_editor_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
ly_add_target(
NAME AWSCore.Editor.Static STATIC
@@ -7,4 +7,4 @@
*/
#pragma once
#define AWSCORE_BACKWARD_INCOMPATIBLE_CHANGE 0
#define AWSCORE_BACKWARD_INCOMPATIBLE_CHANGE 1
+6 -2
View File
@@ -3,7 +3,8 @@
"display_name": "AWS Core",
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Amazon Web Services, Inc.",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Code",
"summary": "The AWS Core Gem provides basic shared AWS functionality such as AWS SDK initialization and client configuration, and is automatically added when selecting any AWS feature Gem.",
"canonical_tags": [
@@ -15,5 +16,8 @@
"SDK"
],
"icon_path": "preview.png",
"documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-core/"
"requirements": "",
"documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-core/",
"dependencies": [
]
}
+3 -2
View File
@@ -3,7 +3,8 @@
"display_name": "AWS GameLift",
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Amazon Web Services, Inc.",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Code",
"summary": "The AWS GameLift Gem provides a framework to extend O3DE networking layer to work with GameLift resources via GameLift server and client SDK.",
"canonical_tags": [
@@ -12,7 +13,7 @@
"user_tags": [
"AWS",
"Framework",
"Network",
"Network",
"SDK"
],
"icon_path": "preview.png",
+3 -1
View File
@@ -3,7 +3,8 @@
"display_name": "AWS Metrics",
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Amazon Web Services, Inc.",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Code",
"summary": "The AWS Metrics Gem provides a solution for AWS metrics submission and analytics.",
"canonical_tags": [
@@ -15,6 +16,7 @@
"SDK"
],
"icon_path": "preview.png",
"requirements": "",
"documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-metrics/",
"dependencies": [
"AWSCore"
+4
View File
@@ -6,4 +6,8 @@
#
#
set(gem_path ${CMAKE_CURRENT_LIST_DIR})
set(gem_json ${gem_path}/gem.json)
o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
add_subdirectory(Code)
+3 -3
View File
@@ -6,16 +6,16 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/Source/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
ly_add_target(
NAME Achievements.Static STATIC
NAMESPACE Gem
PLATFORM_INCLUDE_FILES
${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
FILES_CMAKE
achievements_files.cmake
${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
INCLUDE_DIRECTORIES
PUBLIC
Include
+1
View File
@@ -4,6 +4,7 @@
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Code",
"summary": "The Achievements Gem provides a target platform agnostic interface for retrieving achievement details and unlocking achievements.",
"canonical_tags": [
+1
View File
@@ -4,6 +4,7 @@
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Code",
"summary": "The Asset Validation Gem provides seed-related commands to ensure assets have valid seeds for asset bundling.",
"canonical_tags": [
-10
View File
@@ -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
#
#
add_subdirectory(ImageProcessingAtom)
add_subdirectory(Shader)
@@ -7,4 +7,8 @@
#
#
set(gem_path ${CMAKE_CURRENT_LIST_DIR})
set(gem_json ${gem_path}/gem.json)
o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
add_subdirectory(Code)
@@ -26,15 +26,15 @@ set(pal_tools_include_dirs)
foreach(enabled_platform ${LY_PAL_TOOLS_ENABLED})
string(TOLOWER ${enabled_platform} enabled_platform_lowercase)
ly_get_list_relative_pal_filename(pal_tools_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${enabled_platform})
o3de_pal_dir(pal_tools_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${enabled_platform} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
list(APPEND pal_tools_include_dirs ${pal_tools_source_dir})
list(APPEND platform_tools_files ${pal_tools_source_dir}/pal_tools_${enabled_platform_lowercase}.cmake)
list(APPEND pal_tools_include_files ${pal_tools_source_dir}/pal_tools_${enabled_platform_lowercase}_files.cmake)
endforeach()
ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME})
ly_get_list_relative_pal_filename(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common)
o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common)
ly_add_target(
NAME ImageProcessingAtom.Editor.Static STATIC
@@ -226,6 +226,14 @@ namespace ImageProcessingAtom
MultiplatformTextureSettings settings;
PlatformNameList platformsList = BuilderSettingManager::Instance()->GetPlatformList();
PresetName suggestedPreset = BuilderSettingManager::Instance()->GetSuggestedPreset(imageFilepath);
// If the suggested preset doesn't exist (or was failed to be loaded), return empty texture settings
if (BuilderSettingManager::Instance()->GetPreset(suggestedPreset) == nullptr)
{
AZ_Error("Image Processing", false, "Failed to find suggested preset [%s]", suggestedPreset.GetCStr());
return settings;
}
for (PlatformName& platform : platformsList)
{
TextureSettings textureSettings;
@@ -241,8 +241,7 @@ namespace ImageProcessingAtom
// Reload preset if it was changed
ImageProcessingAtom::BuilderSettingManager::Instance()->ReloadPreset(presetName);
AZStd::string_view filePath;
auto presetSettings = BuilderSettingManager::Instance()->GetPreset(presetName, /*default platform*/"", &filePath);
auto presetSettings = BuilderSettingManager::Instance()->GetPreset(presetName, /*default platform*/"");
AssetBuilderSDK::SourceFileDependency sourceFileDependency;
sourceFileDependency.m_sourceDependencyType = AssetBuilderSDK::SourceFileDependency::SourceFileDependencyType::Absolute;
@@ -274,6 +273,32 @@ namespace ImageProcessingAtom
}
}
void ReloadPresetIfNeeded(PresetName presetName)
{
// Reload preset if it was changed
ImageProcessingAtom::BuilderSettingManager::Instance()->ReloadPreset(presetName);
auto presetSettings = BuilderSettingManager::Instance()->GetPreset(presetName, /*default platform*/"");
if (presetSettings)
{
// handle special case here
// Cubemap setting may reference some other presets
if (presetSettings->m_cubemapSetting)
{
if (presetSettings->m_cubemapSetting->m_generateIBLDiffuse && !presetSettings->m_cubemapSetting->m_iblDiffusePreset.IsEmpty())
{
ImageProcessingAtom::BuilderSettingManager::Instance()->ReloadPreset(presetSettings->m_cubemapSetting->m_iblDiffusePreset);
}
if (presetSettings->m_cubemapSetting->m_generateIBLSpecular && !presetSettings->m_cubemapSetting->m_iblSpecularPreset.IsEmpty())
{
ImageProcessingAtom::BuilderSettingManager::Instance()->ReloadPreset(presetSettings->m_cubemapSetting->m_iblSpecularPreset);
}
}
}
}
// this happens early on in the file scanning pass
// this function should consistently always create the same jobs, and should do no checking whether the job is up to date or not - just be consistent.
void ImageBuilderWorker::CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response)
@@ -336,6 +361,11 @@ namespace ImageProcessingAtom
// Do conversion and get exported file's path
if (needConversion)
{
// Handles preset changes
auto presetName = GetImagePreset(request.m_fullPath);
ReloadPresetIfNeeded(presetName);
AZ_TracePrintf(AssetBuilderSDK::InfoWindow, "Performing image conversion: %s\n", request.m_fullPath.c_str());
ImageConvertProcess* process = CreateImageConvertProcess(request.m_fullPath, request.m_tempDirPath,
request.m_jobDescription.GetPlatformIdentifier(), response.m_outputProducts);
@@ -4,6 +4,7 @@
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Code",
"summary": "",
"canonical_tags": [
@@ -11,6 +12,7 @@
],
"user_tags": [],
"requirements": "",
"documentation_url": "",
"dependencies": [
"Atom_RPI",
"Atom_RHI",
+4
View File
@@ -6,4 +6,8 @@
#
#
set(gem_path ${CMAKE_CURRENT_LIST_DIR})
set(gem_json ${gem_path}/gem.json)
o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
add_subdirectory(Code)
+3 -3
View File
@@ -10,8 +10,8 @@ if(NOT PAL_TRAIT_BUILD_HOST_TOOLS)
return()
endif()
ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME})
ly_get_list_relative_pal_filename(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common)
o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common)
include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) #for PAL_TRAIT_BUILD_ATOM_ASSET_SHADER_SUPPORTED
@@ -71,7 +71,7 @@ ly_add_target(
set(builder_tools_include_files)
foreach(enabled_platform ${LY_PAL_TOOLS_ENABLED})
string(TOLOWER ${enabled_platform} enabled_platform_lowercase)
ly_get_list_relative_pal_filename(builder_tools_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${enabled_platform})
o3de_pal_dir(builder_tools_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${enabled_platform} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
list(APPEND builder_tools_include_files ${builder_tools_source_dir}/platform_builders_${enabled_platform_lowercase}.cmake)
endforeach()
+6 -2
View File
@@ -4,13 +4,17 @@
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Code",
"summary": "",
"summary": "Atom Shader Builder",
"canonical_tags": [
"Gem"
],
"user_tags": [],
"user_tags": [
"AtomShader"
],
"requirements": "",
"documentation_url": "",
"dependencies": [
"Atom_RHI",
"Atom_RPI"
+4
View File
@@ -6,4 +6,8 @@
#
#
set(gem_path ${CMAKE_CURRENT_LIST_DIR})
set(gem_json ${gem_path}/gem.json)
o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
add_subdirectory(Code)
+1 -1
View File
@@ -6,7 +6,7 @@
#
#
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME})
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path})
ly_add_target(
NAME Atom_Bootstrap.Headers HEADERONLY
+2
View File
@@ -4,6 +4,7 @@
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Code",
"summary": "",
"canonical_tags": [
@@ -11,6 +12,7 @@
],
"user_tags": [],
"requirements": "",
"documentation_url": "",
"dependencies": [
"Atom_RPI"
]
+4 -6
View File
@@ -6,12 +6,10 @@
#
#
add_subdirectory(Asset)
add_subdirectory(Bootstrap)
add_subdirectory(Component)
add_subdirectory(Feature)
add_subdirectory(RHI)
add_subdirectory(RPI)
set(gem_path ${CMAKE_CURRENT_LIST_DIR})
set(gem_json ${gem_path}/gem.json)
o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
add_subdirectory(Tools)
add_subdirectory(Utils)
-9
View File
@@ -1,9 +0,0 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
add_subdirectory(DebugCamera)
@@ -6,4 +6,8 @@
#
#
set(gem_path ${CMAKE_CURRENT_LIST_DIR})
set(gem_json ${gem_path}/gem.json)
o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
add_subdirectory(Code)
@@ -104,6 +104,10 @@ namespace AZ
void SetOrthographicHalfWidth(float halfWidth) override;
void MakeActiveView() override;
bool IsActiveView() override;
AZ::Vector3 ScreenToWorld(const AZ::Vector2& screenPosition, float depth) override;
AZ::Vector3 ScreenNdcToWorld(const AZ::Vector2& screenPosition, float depth) override;
AZ::Vector2 WorldToScreen(const AZ::Vector3& worldPosition) override;
AZ::Vector2 WorldToScreenNdc(const AZ::Vector3& worldPosition) override;
// RPI::WindowContextNotificationBus overrides...
void OnViewportResized(uint32_t width, uint32_t height) override;
@@ -245,7 +245,7 @@ namespace AZ
AZ_Assert(false, "DebugCamera does not support orthographic projection");
}
void CameraComponent::MakeActiveView()
void CameraComponent::MakeActiveView()
{
// do nothing
}
@@ -255,6 +255,30 @@ namespace AZ
return false;
}
AZ::Vector3 CameraComponent::ScreenToWorld([[maybe_unused]] const AZ::Vector2& screenPosition, [[maybe_unused]] float depth)
{
// not implemented
return AZ::Vector3::CreateZero();
}
AZ::Vector3 CameraComponent::ScreenNdcToWorld([[maybe_unused]] const AZ::Vector2& screenPosition, [[maybe_unused]] float depth)
{
// not implemented
return AZ::Vector3::CreateZero();
}
AZ::Vector2 CameraComponent::WorldToScreen([[maybe_unused]] const AZ::Vector3& worldPosition)
{
// not implemented
return AZ::Vector2::CreateZero();
}
AZ::Vector2 CameraComponent::WorldToScreenNdc([[maybe_unused]] const AZ::Vector3& worldPosition)
{
// not implemented
return AZ::Vector2::CreateZero();
}
void CameraComponent::OnViewportResized(uint32_t width, uint32_t height)
{
AZ_UNUSED(width);
+2
View File
@@ -4,6 +4,7 @@
"license": "Apache-2.0 Or MIT",
"license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt",
"origin": "Open 3D Engine - o3de.org",
"origin_url": "https://github.com/o3de/o3de",
"type": "Code",
"summary": "",
"canonical_tags": [
@@ -11,6 +12,7 @@
],
"user_tags": [],
"requirements": "",
"documentation_url": "",
"dependencies": [
"Atom_RPI"
]
-9
View File
@@ -1,9 +0,0 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
add_subdirectory(Common)
@@ -28,7 +28,7 @@ struct VSInput
struct VSDepthOutput
{
float4 m_position : SV_Position;
precise linear centroid float4 m_position : SV_Position;
float2 m_uv[UvSetCount] : UV1;
// only used for parallax depth calculation
@@ -62,7 +62,7 @@ VSDepthOutput MainVS(VSInput IN)
struct PSDepthOutput
{
float m_depth : SV_Depth;
precise float m_depth : SV_Depth;
};
PSDepthOutput MainPS(VSDepthOutput IN, bool isFrontFace : SV_IsFrontFace)
@@ -67,7 +67,7 @@ struct VSInput
struct VSOutput
{
// Base fields (required by the template azsli file)...
float4 m_position : SV_Position;
precise linear centroid float4 m_position : SV_Position;
float3 m_normal: NORMAL;
float3 m_tangent : TANGENT;
float3 m_bitangent : BITANGENT;

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