diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py index 173d658b3c..3f94a23696 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py @@ -49,7 +49,7 @@ class TestViewMenuOptions(EditorTestHelper): view_menu_options = [ ("Center on Selection",), ("Show Quick Access Bar",), - ("Viewport", "Wireframe"), + ("Viewport", "Configure Layout"), ("Viewport", "Go to Position"), ("Viewport", "Center on Selection"), ("Viewport", "Go to Location"), diff --git a/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py b/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py index 2b3fdcbdf3..26231e33d7 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py +++ b/AutomatedTesting/Gem/PythonTests/editor/test_Menus.py @@ -89,7 +89,7 @@ class TestMenus(object): expected_lines = [ "Center on Selection Action triggered", "Show Quick Access Bar Action triggered", - "Wireframe Action triggered", + "Configure Layout Action triggered", "Go to Position Action triggered", "Center on Selection Action triggered", "Go to Location Action triggered", diff --git a/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl b/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl index 9bda5cdcce..ebe7d27a8e 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl +++ b/Code/Framework/AzCore/AzCore/RTTI/AzStdOnDemandReflection.inl @@ -406,6 +406,7 @@ namespace AZ AZStd::vector eventParamsTypes{ AZStd::initializer_list{ CreateBehaviorEventParameter>()... } }; behaviorContext->Class>() + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ->Attribute(AZ::Script::Attributes::EventHandlerCreationFunction, createHandlerHolder) ->Attribute(AZ::Script::Attributes::EventParameterTypes, eventParamsTypes) ->Method("HasHandlerConnected", &AZ::Event::HasHandlerConnected) @@ -413,6 +414,7 @@ namespace AZ behaviorContext->Class>() ->Method("Disconnect", &AZ::EventHandler::Disconnect) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::ListOnly) ; } } diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonMerger.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonMerger.cpp index de9aa70362..db1172d245 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonMerger.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonMerger.cpp @@ -607,10 +607,12 @@ namespace AZ } else if (source.Size() > target.Size()) { - rapidjson::SizeType sourceCount = source.Size(); - for (rapidjson::SizeType i = count; i < sourceCount; ++i) + // Loop backwards through the removals so that each removal has a valid index when processing in order. + for (rapidjson::SizeType i = source.Size(); i > count; --i) { - ScopedStackedString entryName(element, i); + // (We use "i - 1" here instead of in the loop to ensure we don't wrap around our unsigned numbers in the case + // where count is 0.) + ScopedStackedString entryName(element, i - 1); patch.PushBack(CreatePatchInternal_Remove(allocator, element), allocator); resultCode.Combine(settings.m_reporting("Removed member from array in JSON Patch.", ResultCode(Tasks::CreatePatch, Outcomes::Success), element)); diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Patching.cpp b/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Patching.cpp index 0906eb45f8..1f6c6142e8 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Patching.cpp +++ b/Code/Framework/AzCore/Tests/Serialization/Json/TestCases_Patching.cpp @@ -303,6 +303,29 @@ namespace JsonSerializationTests R"( { "foo": [ "bar", "baz" ] })"); } + TEST_F(JsonPatchingSerializationTests, ApplyPatch_UseJsonPatchRemoveArrayMembersInCorrectOrder_ReportsSuccess) + { + CheckApplyPatch( + R"( { "foo": [ "bar", "qux", "baz" ] })", + R"( [ + { "op": "remove", "path": "/foo/2" }, + { "op": "remove", "path": "/foo/1" } + ])", + R"( { "foo": [ "bar" ] })"); + } + + TEST_F(JsonPatchingSerializationTests, ApplyPatch_UseJsonPatchRemoveArrayMembersInWrongOrder_ReportsError) + { + using namespace AZ::JsonSerializationResult; + CheckApplyPatchOutcome( + R"( { "foo": [ "bar", "qux", "baz" ] })", + R"( [ + { "op": "remove", "path": "/foo/1" }, + { "op": "remove", "path": "/foo/2" } + ])", + Outcomes::Invalid, Processing::Halted); + } + TEST_F(JsonPatchingSerializationTests, ApplyPatch_UseJsonPatchRemoveOperationInvalidParent_ReportError) { using namespace AZ::JsonSerializationResult; @@ -949,6 +972,27 @@ namespace JsonSerializationTests ); } + TEST_F(JsonPatchingSerializationTests, CreatePatch_UseJsonPatchRemoveLastArrayEntries_MultipleOperationsInCorrectOrder) + { + CheckCreatePatch( + R"( [ "foo", "hello", "bar" ])", R"( [ "foo" ])", + R"( [ + { "op": "remove", "path": "/2" }, + { "op": "remove", "path": "/1" } + ])"); + } + + TEST_F(JsonPatchingSerializationTests, CreatePatch_UseJsonPatchRemoveAllArrayEntries_MultipleOperationsInCorrectOrder) + { + CheckCreatePatch( + R"( [ "foo", "hello", "bar" ])", R"( [])", + R"( [ + { "op": "remove", "path": "/2" }, + { "op": "remove", "path": "/1" }, + { "op": "remove", "path": "/0" } + ])"); + } + TEST_F(JsonPatchingSerializationTests, CreatePatch_UseJsonPatchRemoveObjectFromArrayInMiddle_OperationToUpdateMember) { CheckCreatePatch( diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp index 6e96511507..336b56653b 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp @@ -159,12 +159,23 @@ namespace AzToolsFramework void PrefabEditorEntityOwnershipService::GetNonPrefabEntities(EntityList& entities) { - m_rootInstance->GetEntities(entities, false); + m_rootInstance->GetEntities( + [&entities](const AZStd::unique_ptr& entity) + { + entities.emplace_back(entity.get()); + return true; + }); } bool PrefabEditorEntityOwnershipService::GetAllEntities(EntityList& entities) { - m_rootInstance->GetEntities(entities, true); + m_rootInstance->GetAllEntitiesInHierarchy( + [&entities](const AZStd::unique_ptr& entity) + { + entities.emplace_back(entity.get()); + return true; + }); + return true; } @@ -551,7 +562,7 @@ namespace AzToolsFramework return; } - m_rootInstance->GetNestedEntities([this](AZStd::unique_ptr& entity) + m_rootInstance->GetAllEntitiesInHierarchy([this](AZStd::unique_ptr& entity) { AZ_Assert(entity, "Invalid entity found in root instance while starting play in editor."); if (entity->GetState() == AZ::Entity::State::Active) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.cpp index 83a76aeb01..e5179f4229 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.cpp @@ -373,17 +373,25 @@ namespace AzToolsFramework } } - void Instance::GetConstNestedEntities(const AZStd::function& callback) + bool Instance::GetEntities_Impl(const AZStd::function&)>& callback) { - GetConstEntities(callback); - - for (const auto& [instanceAlias, instance] : m_nestedInstances) + for (auto& [entityAlias, entity] : m_entities) { - instance->GetConstNestedEntities(callback); + if (!entity) + { + continue; + } + + if (!callback(entity)) + { + return false; + } } + + return true; } - void Instance::GetConstEntities(const AZStd::function& callback) + bool Instance::GetConstEntities_Impl(const AZStd::function& callback) const { for (const auto& [entityAlias, entity] : m_entities) { @@ -394,19 +402,83 @@ namespace AzToolsFramework if (!callback(*entity)) { - break; + return false; } } + + return true; } - void Instance::GetNestedEntities(const AZStd::function&)>& callback) + bool Instance::GetAllEntitiesInHierarchy_Impl(const AZStd::function&)>& callback) { - GetEntities(callback); + if (HasContainerEntity()) + { + if (!callback(m_containerEntity)) + { + return false; + } + } + + if (!GetEntities_Impl(callback)) + { + return false; + } for (auto& [instanceAlias, instance] : m_nestedInstances) { - instance->GetNestedEntities(callback); + if (!instance->GetAllEntitiesInHierarchy_Impl(callback)) + { + return false; + } } + + return true; + } + + bool Instance::GetAllEntitiesInHierarchyConst_Impl(const AZStd::function& callback) const + { + if (HasContainerEntity()) + { + if (!callback(*m_containerEntity)) + { + return false; + } + } + + if (!GetConstEntities_Impl(callback)) + { + return false; + } + + for (const auto& [instanceAlias, instance] : m_nestedInstances) + { + if (!instance->GetAllEntitiesInHierarchyConst_Impl(callback)) + { + return false; + } + } + + return true; + } + + void Instance::GetEntities(const AZStd::function&)>& callback) + { + GetEntities_Impl(callback); + } + + void Instance::GetConstEntities(const AZStd::function& callback) const + { + GetConstEntities_Impl(callback); + } + + void Instance::GetAllEntitiesInHierarchy(const AZStd::function&)>& callback) + { + GetAllEntitiesInHierarchy_Impl(callback); + } + + void Instance::GetAllEntitiesInHierarchyConst(const AZStd::function& callback) const + { + GetAllEntitiesInHierarchyConst_Impl(callback); } void Instance::GetNestedInstances(const AZStd::function&)>& callback) @@ -417,44 +489,6 @@ namespace AzToolsFramework } } - void Instance::GetEntities(const AZStd::function&)>& callback) - { - for (auto& [entityAlias, entity] : m_entities) - { - if (!callback(entity)) - { - break; - } - } - } - - void Instance::GetEntities(EntityList& entities, bool includeNestedEntities) - { - // Non-recursive traversal of instances - AZStd::vector instancesToTraverse = { this }; - while (!instancesToTraverse.empty()) - { - Instance* currentInstance = instancesToTraverse.back(); - instancesToTraverse.pop_back(); - if (includeNestedEntities) - { - instancesToTraverse.reserve(instancesToTraverse.size() + currentInstance->m_nestedInstances.size()); - for (const auto& instanceByAlias : currentInstance->m_nestedInstances) - { - instancesToTraverse.push_back(instanceByAlias.second.get()); - } - } - - // Size increases by 1 for each instance because we have to count the container entity also. - entities.reserve(entities.size() + currentInstance->m_entities.size() + 1); - entities.push_back(m_containerEntity.get()); - for (const auto& entityByAlias : currentInstance->m_entities) - { - entities.push_back(entityByAlias.second.get()); - } - } - } - EntityAliasOptionalReference Instance::GetEntityAlias(const AZ::EntityId& id) { if (m_instanceToTemplateEntityIdMap.count(id)) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.h index 5f36ac10dc..9d3ae31796 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/Instance.h @@ -121,10 +121,10 @@ namespace AzToolsFramework /** * Gets the entities in the Instance DOM. Can recursively trace all nested instances. */ - void GetConstNestedEntities(const AZStd::function& callback); - void GetConstEntities(const AZStd::function& callback); - void GetNestedEntities(const AZStd::function&)>& callback); void GetEntities(const AZStd::function&)>& callback); + void GetConstEntities(const AZStd::function& callback) const; + void GetAllEntitiesInHierarchy(const AZStd::function&)>& callback); + void GetAllEntitiesInHierarchyConst(const AZStd::function& callback) const; void GetNestedInstances(const AZStd::function&)>& callback); /** @@ -184,12 +184,6 @@ namespace AzToolsFramework static InstanceAlias GenerateInstanceAlias(); - protected: - /** - * Gets the entities owned by this instance - */ - void GetEntities(EntityList& entities, bool includeNestedEntities = false); - private: static constexpr const char s_aliasPathSeparator = '/'; @@ -197,6 +191,11 @@ namespace AzToolsFramework void RemoveEntities(const AZStd::function&)>& filter); + bool GetEntities_Impl(const AZStd::function&)>& callback); + bool GetConstEntities_Impl(const AZStd::function& callback) const; + bool GetAllEntitiesInHierarchy_Impl(const AZStd::function&)>& callback); + bool GetAllEntitiesInHierarchyConst_Impl(const AZStd::function& callback) const; + bool RegisterEntity(const AZ::EntityId& entityId, const EntityAlias& entityAlias); AZStd::unique_ptr DetachEntity(const EntityAlias& entityAlias); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/EditorInfoRemover.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/EditorInfoRemover.cpp index 6480ac37d7..cc04fe24c1 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/EditorInfoRemover.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/EditorInfoRemover.cpp @@ -62,25 +62,16 @@ namespace AzToolsFramework::Prefab::PrefabConversionUtils } } - AZStd::vector EditorInfoRemover::GetEntitiesFromInstance(AZStd::unique_ptr& instance) + void EditorInfoRemover::GetEntitiesFromInstance( + AZStd::unique_ptr& instance, EntityList& hierarchyEntities) { - AZStd::vector result; - - instance->GetNestedEntities( - [&result](const AZStd::unique_ptr& entity) + instance->GetAllEntitiesInHierarchy( + [&hierarchyEntities](const AZStd::unique_ptr& entity) { - result.emplace_back(entity.get()); + hierarchyEntities.emplace_back(entity.get()); return true; } ); - - if (instance->HasContainerEntity()) - { - auto containerEntityReference = instance->GetContainerEntity(); - result.emplace_back(&containerEntityReference->get()); - } - - return result; } void EditorInfoRemover::SetEditorOnlyEntityHandlerFromCandidates(const EntityList& entities) @@ -543,7 +534,9 @@ exportComponent, prefabProcessorContext); } // grab all nested entities from the Instance as source entities. - EntityList sourceEntities = GetEntitiesFromInstance(instance); + EntityList sourceEntities; + GetEntitiesFromInstance(instance, sourceEntities); + EntityList exportEntities; // prepare for validation of component requirements. @@ -616,7 +609,7 @@ exportComponent, prefabProcessorContext); ); // replace entities of instance with exported ones. - instance->GetNestedEntities( + instance->GetAllEntitiesInHierarchy( [&exportEntitiesMap](AZStd::unique_ptr& entity) { auto entityId = entity->GetId(); @@ -625,14 +618,6 @@ exportComponent, prefabProcessorContext); } ); - if (instance->HasContainerEntity()) - { - if (auto found = exportEntitiesMap.find(instance->GetContainerEntityId()); found != exportEntitiesMap.end()) - { - instance->SetContainerEntity(*found->second); - } - } - // save the final result in the target Prefab DOM. PrefabDom filteredPrefab; if (!PrefabDomUtils::StoreInstanceInPrefabDom(*instance, filteredPrefab)) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/EditorInfoRemover.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/EditorInfoRemover.h index 1e00485e42..5de5c516f8 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/EditorInfoRemover.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Spawnable/EditorInfoRemover.h @@ -55,8 +55,8 @@ namespace AzToolsFramework::Prefab::PrefabConversionUtils protected: using EntityList = AZStd::vector; - static EntityList GetEntitiesFromInstance( - AZStd::unique_ptr& instance); + static void GetEntitiesFromInstance( + AZStd::unique_ptr& instance, EntityList& hierarchyEntities); static bool ReadComponentAttribute( AZ::Component* component, diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp index 8e4c2eaad7..1901560b00 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp @@ -29,15 +29,20 @@ namespace Benchmark {}, m_pathString)); + auto& prefabDom = m_prefabSystemComponent->FindTemplateDom(instance->GetTemplateId()); for (auto _ : state) { - state.PauseTiming(); - - AzFramework::Spawnable spawnable; - AzToolsFramework::Prefab::SpawnableUtils::CreateSpawnable(spawnable, prefabDom); - - state.ResumeTiming(); + // Create a vector to store spawnables so that they don't get destroyed immediately after construction. + AZStd::vector> spawnables; + spawnables.reserve(numSpawnables); + + for (int spwanableCounter = 0; spwanableCounter < numSpawnables; ++spwanableCounter) + { + AZStd::unique_ptr spawnable = AZStd::make_unique(); + AzToolsFramework::Prefab::SpawnableUtils::CreateSpawnable(*spawnable, prefabDom); + spawnables.push_back(AZStd::move(spawnable)); + } } state.SetComplexityN(numSpawnables); @@ -50,3 +55,4 @@ namespace Benchmark } #endif + diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateWithPatchesTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateWithPatchesTests.cpp index aef3cad5f3..e3460c307f 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateWithPatchesTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabUpdateWithPatchesTests.cpp @@ -93,7 +93,7 @@ namespace UnitTest // Retrieve the entity pointer from the component application bus. AZ::Entity* wheelEntityUnderAxle = nullptr; - axleInstance->GetNestedEntities([&wheelEntityUnderAxle, wheelEntityIdUnderAxle](AZStd::unique_ptr& entity) + axleInstance->GetAllEntitiesInHierarchy([&wheelEntityUnderAxle, wheelEntityIdUnderAxle](AZStd::unique_ptr& entity) { if (entity->GetId() == wheelEntityIdUnderAxle) { diff --git a/Code/Sandbox/Editor/EditorViewportWidget.cpp b/Code/Sandbox/Editor/EditorViewportWidget.cpp index 7e087d452b..e627d7d7c0 100644 --- a/Code/Sandbox/Editor/EditorViewportWidget.cpp +++ b/Code/Sandbox/Editor/EditorViewportWidget.cpp @@ -514,18 +514,28 @@ void EditorViewportWidget::Update() // Disable rendering to avoid recursion into Update() PushDisableRendering(); + + //get debug display interface for the viewport + AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus; + AzFramework::DebugDisplayRequestBus::Bind(debugDisplayBus, GetViewportId()); + AZ_Assert(debugDisplayBus, "Invalid DebugDisplayRequestBus."); + + AzFramework::DebugDisplayRequests* debugDisplay = + AzFramework::DebugDisplayRequestBus::FindFirstHandler(debugDisplayBus); + + // draw debug visualizations - if (m_debugDisplay) + if (debugDisplay) { - const AZ::u32 prevState = m_debugDisplay->GetState(); - m_debugDisplay->SetState( + const AZ::u32 prevState = debugDisplay->GetState(); + debugDisplay->SetState( e_Mode3D | e_AlphaBlended | e_FillModeSolid | e_CullModeBack | e_DepthWriteOn | e_DepthTestOn); AzFramework::EntityDebugDisplayEventBus::Broadcast( &AzFramework::EntityDebugDisplayEvents::DisplayEntityViewport, - AzFramework::ViewportInfo{ GetViewportId() }, *m_debugDisplay); + AzFramework::ViewportInfo{ GetViewportId() }, *debugDisplay); - m_debugDisplay->SetState(prevState); + debugDisplay->SetState(prevState); } QtViewport::Update(); diff --git a/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp b/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp index 3b04fc70f8..82d74d5d00 100644 --- a/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp +++ b/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp @@ -154,11 +154,23 @@ SandboxIntegrationManager::SandboxIntegrationManager() { // Required to receive events from the Cry Engine undo system GetIEditor()->GetUndoManager()->AddListener(this); + + // Only create the PrefabIntegrationManager if prefabs are enabled + bool prefabSystemEnabled = false; + AzFramework::ApplicationRequests::Bus::BroadcastResult( + prefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled); + if (prefabSystemEnabled) + { + m_prefabIntegrationManager = aznew AzToolsFramework::Prefab::PrefabIntegrationManager(); + } } SandboxIntegrationManager::~SandboxIntegrationManager() { GetIEditor()->GetUndoManager()->RemoveListener(this); + + delete m_prefabIntegrationManager; + m_prefabIntegrationManager = nullptr; } void SandboxIntegrationManager::Setup() @@ -187,11 +199,16 @@ void SandboxIntegrationManager::Setup() AZ_Assert((m_editorEntityUiInterface != nullptr), "SandboxIntegrationManager requires a EditorEntityUiInterface instance to be present on Setup()."); - m_prefabIntegrationInterface = AZ::Interface::Get(); - - AZ_Assert( - (m_prefabIntegrationInterface != nullptr), - "SandboxIntegrationManager requires a PrefabIntegrationInterface instance to be present on Setup()."); + bool prefabSystemEnabled = false; + AzFramework::ApplicationRequests::Bus::BroadcastResult( + prefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled); + if (prefabSystemEnabled) + { + m_prefabIntegrationInterface = AZ::Interface::Get(); + AZ_Assert( + (m_prefabIntegrationInterface != nullptr), + "SandboxIntegrationManager requires a PrefabIntegrationInterface instance to be present on Setup()."); + } m_editorEntityAPI = AZ::Interface::Get(); AZ_Assert(m_editorEntityAPI, "SandboxIntegrationManager requires an EditorEntityAPI instance to be present on Setup()."); diff --git a/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h b/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h index 5cb03cc99f..b734d4d361 100644 --- a/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h +++ b/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h @@ -305,7 +305,7 @@ private: bool m_debugDisplayBusImplementationActive = false; - AzToolsFramework::Prefab::PrefabIntegrationManager m_prefabIntegrationManager; + AzToolsFramework::Prefab::PrefabIntegrationManager* m_prefabIntegrationManager = nullptr; AzToolsFramework::EditorEntityUiInterface* m_editorEntityUiInterface = nullptr; AzToolsFramework::Prefab::PrefabIntegrationInterface* m_prefabIntegrationInterface = nullptr; diff --git a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp index 68ed75ebfb..d59569660b 100644 --- a/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp @@ -12,6 +12,7 @@ #include "BuilderManager.h" #include +#include #include #include @@ -186,10 +187,9 @@ namespace AssetProcessor QDir projectCacheRoot; AssetUtilities::ComputeProjectCacheRoot(projectCacheRoot); - QString gameName = AssetUtilities::ComputeProjectName(); - QString projectPath = AssetUtilities::ComputeProjectPath(); - QDir engineRoot; - AssetUtilities::ComputeEngineRoot(engineRoot); + AZ::SettingsRegistryInterface::FixedValueString projectName = AZ::Utils::GetProjectName(); + AZ::IO::FixedMaxPathString projectPath = AZ::Utils::GetProjectPath(); + AZ::IO::FixedMaxPathString enginePath = AZ::Utils::GetEnginePath(); int portNumber = 0; ApplicationServerBus::BroadcastResult(portNumber, &ApplicationServerBus::Events::GetServerListeningPort); @@ -197,14 +197,14 @@ namespace AssetProcessor AZStd::string params; #if !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS params = AZStd::string::format( - R"(-task=%s -id="%s" -project-name="%s" -project-cache-path="%s" -project-path="%s" -engine-path="%s" -port %d)", task, - builderGuid.c_str(), gameName.toUtf8().constData(), projectCacheRoot.absolutePath().toUtf8().constData(), - projectPath.toUtf8().constData(), engineRoot.absolutePath().toUtf8().constData(), portNumber); + R"(-task=%s -id="%s" -project-name="%s" -project-cache-path="%s" -project-path="%s" -engine-path="%s" -port %d)", + task, builderGuid.c_str(), projectName.c_str(), projectCacheRoot.absolutePath().toUtf8().constData(), + projectPath.c_str(), enginePath.c_str(), portNumber); #else params = AZStd::string::format( R"(-task=%s -id="%s" -project-name="\"%s\"" -project-cache-path="\"%s\"" -project-path="\"%s\"" -engine-path="\"%s\"" -port %d)", - task, builderGuid.c_str(), gameName.toUtf8().constData(), projectCacheRoot.absolutePath().toUtf8().constData(), - projectPath.toUtf8().constData(), engineRoot.absolutePath().toUtf8().constData(), portNumber); + task, builderGuid.c_str(), projectName.c_str(), projectCacheRoot.absolutePath().toUtf8().constData(), + projectPath.c_str(), enginePath.c_str(), portNumber); #endif // !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS if (moduleFilePath && moduleFilePath[0]) diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/FbxImportRequestHandler.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/FbxImportRequestHandler.cpp index a8b059304d..4ab4dd4d62 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/FbxImportRequestHandler.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/FbxImportRequestHandler.cpp @@ -77,6 +77,7 @@ namespace AZ { AZStd::string extension; StringFunc::Path::GetExtension(path.c_str(), extension); + AZStd::to_lower(extension.begin(), extension.end()); if (!m_settings.m_supportedFileTypeExtensions.contains(extension)) { diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp index 7ab9deb141..5bdc5a8add 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp @@ -151,7 +151,7 @@ namespace AZ SerializeContext* serializeContext = azrtti_cast(context); if (serializeContext) { - serializeContext->Class()->Version(4); // [LYN-3971] Bone pruning crash fix in AssImp SDK + serializeContext->Class()->Version(5); // [LYN-4226] Invert PostRotation matrix in animation chains } } diff --git a/Code/Tools/SerializeContextTools/SliceConverter.cpp b/Code/Tools/SerializeContextTools/SliceConverter.cpp index e7dc49d5b3..70412e23bc 100644 --- a/Code/Tools/SerializeContextTools/SliceConverter.cpp +++ b/Code/Tools/SerializeContextTools/SliceConverter.cpp @@ -385,24 +385,36 @@ namespace AZ return false; } - // Now, convert the nested slice to a prefab. - bool nestedSliceResult = ConvertSliceFile(serializeContext, assetPath, isDryRun); - if (!nestedSliceResult) - { - AZ_Warning("Convert-Slice", nestedSliceResult, " Nested slice '%s' could not be converted.", assetPath.c_str()); - return false; - } + // Check to see if we've already converted this slice at a higher level of slice nesting, or if this is our first + // occurrence and we need to convert it now. - // Find the prefab template we created for the newly-created nested prefab. - // To get the template, we need to take our absolute slice path and turn it into a project-relative prefab path. + // First, take our absolute slice path and turn it into a project-relative prefab path. AZ::IO::Path nestedPrefabPath = assetPath; nestedPrefabPath.ReplaceExtension("prefab"); auto prefabLoaderInterface = AZ::Interface::Get(); nestedPrefabPath = prefabLoaderInterface->GenerateRelativePath(nestedPrefabPath); + // Now, see if we already have a template ID in memory for it. AzToolsFramework::Prefab::TemplateId nestedTemplateId = prefabSystemComponentInterface->GetTemplateIdFromFilePath(nestedPrefabPath); + + // If we don't have a template ID yet, convert the nested slice to a prefab and get the template ID. + if (nestedTemplateId == AzToolsFramework::Prefab::InvalidTemplateId) + { + bool nestedSliceResult = ConvertSliceFile(serializeContext, assetPath, isDryRun); + if (!nestedSliceResult) + { + AZ_Warning("Convert-Slice", nestedSliceResult, " Nested slice '%s' could not be converted.", assetPath.c_str()); + return false; + } + + nestedTemplateId = prefabSystemComponentInterface->GetTemplateIdFromFilePath(nestedPrefabPath); + AZ_Assert(nestedTemplateId != AzToolsFramework::Prefab::InvalidTemplateId, + "Template ID for %s is invalid", nestedPrefabPath.c_str()); + } + + // Get the nested prefab template. AzToolsFramework::Prefab::TemplateReference nestedTemplate = prefabSystemComponentInterface->FindTemplate(nestedTemplateId); diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass index 1d20382408..e2fde2d4ef 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass @@ -24,9 +24,9 @@ }, "ImageDescriptor": { "Format": "R16G16B16A16_FLOAT", - "MipLevels": "8", "SharedQueueMask": "Graphics" - } + }, + "GenerateFullMipChain": true } ], "Connections": [ diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass index 80c4e8987b..5443c32406 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass @@ -5,7 +5,7 @@ "ClassData": { "PassTemplate": { "Name": "ReflectionScreenSpaceCompositePassTemplate", - "PassClass": "FullScreenTriangle", + "PassClass": "ReflectionScreenSpaceCompositePass", "Slots": [ { "Name": "TraceInput", 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 b28f0f1708..26f3c44fb1 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 @@ -15,9 +15,6 @@ #include #include -// The order should match m_pointShadowTransforms in PointLightFeatureProcessor.h/.cpp -static const float3 PointLightShadowCubemapDirections[6] = {float3(-1,0,0), float3(1,0,0), float3(0,-1,0), float3(0,1,0), float3(0,0,-1), float3(0,0,1)}; - int GetPointLightShadowCubemapFace(const float3 targetPos, const float3 lightPos) { const float3 toPoint = targetPos - lightPos; @@ -83,12 +80,13 @@ void ApplyPointLight(ViewSrg::PointLight light, Surface surface, inout LightingD { const int shadowCubemapFace = GetPointLightShadowCubemapFace(surface.position, light.m_position); const int shadowIndex = UnpackPointLightShadowIndex(light, shadowCubemapFace); - + const float3 lightDir = normalize(light.m_position - surface.position); + litRatio *= ProjectedShadow::GetVisibility( shadowIndex, light.m_position, surface.position, - PointLightShadowCubemapDirections[shadowCubemapFace], + lightDir, surface.normal); // Use backShadowRatio to carry thickness from shadow map for thick mode diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl index fa3885f180..c5c724e106 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl @@ -37,6 +37,9 @@ ShaderResourceGroup PassSrg : SRG_PerPass AddressV = Clamp; AddressW = Clamp; }; + + // the max roughness mip level for sampling the previous frame image + uint m_maxMipLevel; } #include @@ -69,10 +72,6 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) float4 positionWS = mul(ViewSrg::m_viewProjectionInverseMatrix, projectedPos); positionWS /= positionWS.w; - //float4 positionVS = mul(ViewSrg::m_projectionMatrixInverse, projectedPos); - //positionVS /= positionVS.w; - //float4 positionWS = mul(ViewSrg::m_viewMatrixInverse, positionVS); - // compute ray from camera to surface position float3 cameraToPositionWS = normalize(positionWS.xyz - ViewSrg::m_worldPosition); @@ -103,8 +102,7 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) // compute the roughness mip to use in the previous frame image // remap the roughness mip into a lower range to more closely match the material roughness values const float MaxRoughness = 0.5f; - const float MaxRoughnessMip = 7; - float mip = saturate(roughness / MaxRoughness) * MaxRoughnessMip; + float mip = saturate(roughness / MaxRoughness) * PassSrg::m_maxMipLevel; // sample reflection value from the roughness mip float4 reflectionColor = float4(PassSrg::m_previousFrame.SampleLevel(PassSrg::LinearSampler, tracePrevUV, mip).rgb, 1.0f); diff --git a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp index af28624357..1866da63e5 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp @@ -103,6 +103,7 @@ #include #include #include +#include #include #include @@ -283,6 +284,7 @@ namespace AZ // Add Reflection passes passSystem->AddPassCreator(Name("ReflectionScreenSpaceBlurPass"), &Render::ReflectionScreenSpaceBlurPass::Create); passSystem->AddPassCreator(Name("ReflectionScreenSpaceBlurChildPass"), &Render::ReflectionScreenSpaceBlurChildPass::Create); + passSystem->AddPassCreator(Name("ReflectionScreenSpaceCompositePass"), &Render::ReflectionScreenSpaceCompositePass::Create); passSystem->AddPassCreator(Name("ReflectionCopyFrameBufferPass"), &Render::ReflectionCopyFrameBufferPass::Create); // Add RayTracing pas diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h index 4a2ccce1d4..be8dc6d596 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h @@ -37,6 +37,9 @@ namespace AZ //! to store the previous frame image Data::Instance& GetFrameBufferImageAttachment() { return m_frameBufferImageAttachment; } + //! Returns the number of mip levels in the blur + uint32_t GetNumBlurMips() const { return m_numBlurMips; } + private: explicit ReflectionScreenSpaceBlurPass(const RPI::PassDescriptor& descriptor); diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp new file mode 100644 index 0000000000..ab09d7175a --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp @@ -0,0 +1,58 @@ +/* +* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +* its licensors. +* +* For complete copyright and license terms please see the LICENSE at the root of this +* distribution (the "License"). All use of this software is governed by the License, +* or, if provided, by the license below or the license accompanying this file. Do not +* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* +*/ + +#include "ReflectionScreenSpaceCompositePass.h" +#include "ReflectionScreenSpaceBlurPass.h" +#include +#include + +namespace AZ +{ + namespace Render + { + RPI::Ptr ReflectionScreenSpaceCompositePass::Create(const RPI::PassDescriptor& descriptor) + { + RPI::Ptr pass = aznew ReflectionScreenSpaceCompositePass(descriptor); + return AZStd::move(pass); + } + + ReflectionScreenSpaceCompositePass::ReflectionScreenSpaceCompositePass(const RPI::PassDescriptor& descriptor) + : RPI::FullscreenTrianglePass(descriptor) + { + } + + void ReflectionScreenSpaceCompositePass::CompileResources([[maybe_unused]] const RHI::FrameGraphCompileContext& context) + { + if (!m_shaderResourceGroup) + { + return; + } + + RPI::PassHierarchyFilter passFilter(AZ::Name("ReflectionScreenSpaceBlurPass")); + const AZStd::vector& passes = RPI::PassSystemInterface::Get()->FindPasses(passFilter); + if (!passes.empty()) + { + Render::ReflectionScreenSpaceBlurPass* blurPass = azrtti_cast(passes.front()); + + // compute the max mip level based on the available mips in the previous frame image, and capping it + // to stay within a range that has reasonable data + const uint32_t MaxNumRoughnessMips = 8; + uint32_t maxMipLevel = AZStd::min(MaxNumRoughnessMips, blurPass->GetNumBlurMips()) - 1; + + auto constantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_maxMipLevel")); + m_shaderResourceGroup->SetConstant(constantIndex, maxMipLevel); + } + + FullscreenTrianglePass::CompileResources(context); + } + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h new file mode 100644 index 0000000000..110673541e --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h @@ -0,0 +1,43 @@ +/* +* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +* its licensors. +* +* For complete copyright and license terms please see the LICENSE at the root of this +* distribution (the "License"). All use of this software is governed by the License, +* or, if provided, by the license below or the license accompanying this file. Do not +* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* +*/ +#pragma once + +#include +#include +#include +#include + +namespace AZ +{ + namespace Render + { + //! This pass composites the screenspace reflection trace onto the reflection buffer. + class ReflectionScreenSpaceCompositePass + : public RPI::FullscreenTrianglePass + { + AZ_RPI_PASS(ReflectionScreenSpaceCompositePass); + + public: + AZ_RTTI(Render::ReflectionScreenSpaceCompositePass, "{88739CC9-C3F1-413A-A527-9916C697D93A}", FullscreenTrianglePass); + AZ_CLASS_ALLOCATOR(Render::ReflectionScreenSpaceCompositePass, SystemAllocator, 0); + + //! Creates a new pass without a PassTemplate + static RPI::Ptr Create(const RPI::PassDescriptor& descriptor); + + private: + explicit ReflectionScreenSpaceCompositePass(const RPI::PassDescriptor& descriptor); + + // Pass Overrides... + void CompileResources(const RHI::FrameGraphCompileContext& context) override; + }; + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshInputBuffers.cpp b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshInputBuffers.cpp index 343370ae35..a87d272448 100644 --- a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshInputBuffers.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshInputBuffers.cpp @@ -629,6 +629,11 @@ namespace AZ Data::Asset lodAsset; modelLodCreator.End(lodAsset); + if (!lodAsset.IsReady()) + { + // [GFX TODO] During mesh reload the modelLodCreator could report errors and result in the lodAsset not ready. + return nullptr; + } modelCreator.AddLodAsset(AZStd::move(lodAsset)); lodIndex++; diff --git a/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake b/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake index a759de77fa..a656558abf 100644 --- a/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake +++ b/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake @@ -267,6 +267,8 @@ set(FILES Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurChildPass.cpp Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurChildPass.h + Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp + Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.cpp Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.h Source/ScreenSpace/DeferredFogSettings.cpp diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp index c4666578a7..600ef4bce5 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp @@ -417,7 +417,7 @@ namespace AZ AZ::IO::FileIOStream sourceMtlfileStream(inputMetalFile.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeBinary); if (!sourceMtlfileStream.IsOpen()) { - AZ_Error(platformName, false, "Failed because the shader file \"%s\" could not be opened", inputMetalFile); + AZ_Error(platformName, false, "Failed because the shader file \"%s\" could not be opened", inputMetalFile.c_str()); return false; } diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.cpp index 49ff4146fc..c433a6f9cf 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.cpp @@ -400,15 +400,13 @@ namespace AZ id mtlconstantBufferResource = m_constantBuffer.GetGpuAddress>(); if(RHI::CheckBitsAny(srgResourcesVisInfo.m_constantDataStageMask, RHI::ShaderStageMask::Compute)) { - uint16_t arrayIndex = resourcesToMakeResidentCompute[MTLResourceUsageRead].m_resourceArrayLen++; - resourcesToMakeResidentCompute[MTLResourceUsageRead].m_resourceArray[arrayIndex] = mtlconstantBufferResource; + resourcesToMakeResidentCompute[MTLResourceUsageRead].emplace(mtlconstantBufferResource); } else { MTLRenderStages mtlRenderStages = GetRenderStages(srgResourcesVisInfo.m_constantDataStageMask); - AZStd::pair key = AZStd::make_pair(MTLResourceUsageRead, mtlRenderStages); - uint16_t arrayIndex = resourcesToMakeResidentGraphics[key].m_resourceArrayLen++; - resourcesToMakeResidentGraphics[key].m_resourceArray[arrayIndex] = mtlconstantBufferResource; + AZStd::pair key = AZStd::make_pair(MTLResourceUsageRead, mtlRenderStages); + resourcesToMakeResidentGraphics[key].emplace(mtlconstantBufferResource); } } } @@ -440,16 +438,18 @@ namespace AZ //Call UseResource on all resources for Compute stage for (const auto& key : resourcesToMakeResidentCompute) { - [static_cast>(commandEncoder) useResources: key.second.m_resourceArray.data() - count: key.second.m_resourceArrayLen + AZStd::vector> resourcesToProcessVec(key.second.begin(), key.second.end()); + [static_cast>(commandEncoder) useResources: &resourcesToProcessVec[0] + count: resourcesToProcessVec.size() usage: key.first]; } //Call UseResource on all resources for Vertex and Fragment stages for (const auto& key : resourcesToMakeResidentGraphics) { - [static_cast>(commandEncoder) useResources: key.second.m_resourceArray.data() - count: key.second.m_resourceArrayLen + AZStd::vector> resourcesToProcessVec(key.second.begin(), key.second.end()); + [static_cast>(commandEncoder) useResources: &resourcesToProcessVec[0] + count: resourcesToProcessVec.size() usage: key.first.first stages: key.first.second]; } @@ -480,9 +480,9 @@ namespace AZ AZ_Assert(false, "Undefined Resource type"); } } - uint16_t arrayIndex = resourcesToMakeResidentMap[resourceUsage].m_resourceArrayLen++; + id mtlResourceToBind = resourceBindingData.m_resourcPtr->GetGpuAddress>(); - resourcesToMakeResidentMap[resourceUsage].m_resourceArray[arrayIndex] = mtlResourceToBind; + resourcesToMakeResidentMap[resourceUsage].emplace(mtlResourceToBind); } } @@ -516,9 +516,8 @@ namespace AZ } AZStd::pair key = AZStd::make_pair(resourceUsage, mtlRenderStages); - uint16_t arrayIndex = resourcesToMakeResidentMap[key].m_resourceArrayLen++; id mtlResourceToBind = resourceBindingData.m_resourcPtr->GetGpuAddress>(); - resourcesToMakeResidentMap[key].m_resourceArray[arrayIndex] = mtlResourceToBind; + resourcesToMakeResidentMap[key].emplace(mtlResourceToBind); } } } diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.h b/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.h index c4cfd17390..29d7d5e239 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.h +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.h @@ -120,15 +120,10 @@ namespace AZ ResourceBindingsMap m_resourceBindings; static const int MaxEntriesInArgTable = 31; - struct MetalResourceArray - { - AZStd::array, MaxEntriesInArgTable> m_resourceArray; - uint16_t m_resourceArrayLen = 0; - }; - //Map to cache all the resources based on the usage as we can batch all the resources for a given usage - using ComputeResourcesToMakeResidentMap = AZStd::unordered_map; - //Map to cache all the resources based on the usage and shader stage as we can batch all the resources for a given usage/shader usage - using GraphicsResourcesToMakeResidentMap = AZStd::unordered_map, MetalResourceArray>; + //Map to cache all the resources based on the usage as we can batch all the resources for a given usage. + using ComputeResourcesToMakeResidentMap = AZStd::unordered_map>>; + //Map to cache all the resources based on the usage and shader stage as we can batch all the resources for a given usage/shader usage. + using GraphicsResourcesToMakeResidentMap = AZStd::unordered_map, AZStd::unordered_set>>; void CollectResourcesForCompute(id encoder, const ResourceBindingsSet& resourceBindingData, diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp index 594a4931b9..29e0b19b75 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/AsyncUploadQueue.cpp @@ -85,16 +85,36 @@ namespace AZ uint64_t AsyncUploadQueue::QueueUpload(const RHI::BufferStreamRequest& uploadRequest) { - uint64_t queueValue = m_uploadFence.Increment(); + Buffer& destBuffer = static_cast(*uploadRequest.m_buffer); + const MemoryView& destMemoryView = destBuffer.GetMemoryView(); + MTLStorageMode mtlStorageMode = destBuffer.GetMemoryView().GetStorageMode(); + RHI::BufferPool& bufferPool = static_cast(*destBuffer.GetPool()); + + // No need to use staging buffers since it's host memory. + // We just map, copy and then unmap. + if(mtlStorageMode == MTLStorageModeShared || mtlStorageMode == GetCPUGPUMemoryMode()) + { + RHI::BufferMapRequest mapRequest; + mapRequest.m_buffer = uploadRequest.m_buffer; + mapRequest.m_byteCount = uploadRequest.m_byteCount; + mapRequest.m_byteOffset = uploadRequest.m_byteOffset; + RHI::BufferMapResponse mapResponse; + bufferPool.MapBuffer(mapRequest, mapResponse); + ::memcpy(mapResponse.m_data, uploadRequest.m_sourceData, uploadRequest.m_byteCount); + bufferPool.UnmapBuffer(*uploadRequest.m_buffer); + if (uploadRequest.m_fenceToSignal) + { + uploadRequest.m_fenceToSignal->SignalOnCpu(); + } + return m_uploadFence.GetPendingValue(); + } - const MemoryView& memoryView = static_cast(*uploadRequest.m_buffer).GetMemoryView(); - RHI::Ptr buffer = memoryView.GetMemory(); - Fence* fenceToSignal = nullptr; uint64_t fenceToSignalValue = 0; - size_t byteCount = uploadRequest.m_byteCount; - size_t byteOffset = memoryView.GetOffset() + uploadRequest.m_byteOffset; + size_t byteOffset = destMemoryView.GetOffset() + uploadRequest.m_byteOffset; + uint64_t queueValue = m_uploadFence.Increment(); + const uint8_t* sourceData = reinterpret_cast(uploadRequest.m_sourceData); if (uploadRequest.m_fenceToSignal) @@ -125,11 +145,11 @@ namespace AZ } id blitEncoder = [framePacket->m_mtlCommandBuffer blitCommandEncoder]; - [blitEncoder copyFromBuffer:framePacket->m_stagingResource - sourceOffset:0 - toBuffer:buffer->GetGpuAddress>() - destinationOffset:byteOffset + pendingByteOffset - size:bytesToCopy]; + [blitEncoder copyFromBuffer: framePacket->m_stagingResource + sourceOffset: 0 + toBuffer: destMemoryView.GetGpuAddress>() + destinationOffset: byteOffset + pendingByteOffset + size: bytesToCopy]; [blitEncoder endEncoding]; blitEncoder = nil; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.cpp index 2ca8303dc9..b986b8ea75 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.cpp @@ -40,9 +40,8 @@ namespace AZ buffer->m_pendingResolves++; uploadRequest.m_attachmentBuffer = buffer; - uploadRequest.m_byteOffset = request.m_byteOffset; + uploadRequest.m_byteOffset = buffer->GetMemoryView().GetOffset() + request.m_byteOffset; uploadRequest.m_stagingBuffer = stagingBuffer; - uploadRequest.m_byteSize = request.m_byteCount; return stagingBuffer->GetMemoryView().GetCpuAddress(); } @@ -64,12 +63,15 @@ namespace AZ AZ_Assert(stagingBuffer, "Staging Buffer is null."); AZ_Assert(destBuffer, "Attachment Buffer is null."); + //Inform the GPU that the CPU has modified the staging buffer. + Platform::SynchronizeBufferOnCPU(stagingBuffer->GetMemoryView().GetGpuAddress>(), stagingBuffer->GetMemoryView().GetOffset(), stagingBuffer->GetMemoryView().GetSize()); + RHI::CopyBufferDescriptor copyDescriptor; copyDescriptor.m_sourceBuffer = stagingBuffer; - copyDescriptor.m_sourceOffset = 0; + copyDescriptor.m_sourceOffset = stagingBuffer->GetMemoryView().GetOffset(); copyDescriptor.m_destinationBuffer = destBuffer; copyDescriptor.m_destinationOffset = static_cast(packet.m_byteOffset); - copyDescriptor.m_size = static_cast(packet.m_byteSize); + copyDescriptor.m_size = stagingBuffer->GetMemoryView().GetSize(); commandList.Submit(RHI::CopyItem(copyDescriptor)); device.QueueForRelease(stagingBuffer->GetMemoryView()); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.h b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.h index c62d9494db..3e60bb31fa 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.h +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.h @@ -54,7 +54,6 @@ namespace AZ Buffer* m_attachmentBuffer = nullptr; RHI::Ptr m_stagingBuffer; size_t m_byteOffset = 0; - size_t m_byteSize = 0; }; AZStd::mutex m_uploadPacketsLock; diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp index 60581aeb2c..88aa4b4ed1 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/MemoryPageAllocator.cpp @@ -44,7 +44,7 @@ namespace AZ if (memoryView.IsValid()) { heapMemoryUsage.m_residentInBytes += m_descriptor.m_pageSizeInBytes; - memoryView.SetName("BufferPage"); + memoryView.SetName(AZStd::string::format("BufferPage_%s", AZ::Uuid::CreateRandom().ToString().c_str())); } else { diff --git a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/ImageView.cpp b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/ImageView.cpp index 605f61fc33..ec58b5c940 100644 --- a/Gems/Atom/RHI/Vulkan/Code/Source/RHI/ImageView.cpp +++ b/Gems/Atom/RHI/Vulkan/Code/Source/RHI/ImageView.cpp @@ -55,7 +55,11 @@ namespace AZ const auto& image = static_cast(resourceBase); const RHI::ImageViewDescriptor& descriptor = GetDescriptor(); - AZ_Assert(image.GetNativeImage() != VK_NULL_HANDLE, "Image has not been initialized."); + // this can happen when image has been invalidated/released right before re-compiling the image + if (image.GetNativeImage() == VK_NULL_HANDLE) + { + return RHI::ResultCode::Fail; + } RHI::Format viewFormat = descriptor.m_overrideFormat; // If an image is not owner of native image, it is a swapchain image. diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/AssetInitBus.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/AssetInitBus.h new file mode 100644 index 0000000000..e8a1d69ece --- /dev/null +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/AssetInitBus.h @@ -0,0 +1,43 @@ +/* +* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +* its licensors. +* +* For complete copyright and license terms please see the LICENSE at the root of this +* distribution (the "License"). All use of this software is governed by the License, +* or, if provided, by the license below or the license accompanying this file. Do not +* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* +*/ + +#pragma once + +#include + +namespace AZ +{ + namespace RPI + { + //! Bus for post-load initialization of assets. + //! Assets that need to do post-load initialization should connect to this bus in their asset handler's LoadAssetData() function. + //! Be sure to disconnect from this bus as soon as initialization is complete, as it will be called every frame. + //! (Note this bus is needed rather than utilizing TickBus because TickBus is not protected by a mutex which means it can't be + //! connected on an asset load job thread). + class AssetInitEvents + : public EBusTraits + { + public: + // EBus Configuration + static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple; + static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; + typedef AZStd::recursive_mutex MutexType; + + //! This function is called every frame on the main thread to perform any necessary post-load initialization. + //! Connect to the bus after loading the asset data, and disconnect when initialization is complete. + //! @return whether initialization was successful + virtual bool PostLoadInit() = 0; + }; + + using AssetInitBus = AZ::EBus; + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/Shader.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/Shader.h index a81a3a99eb..a8e65e68f4 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/Shader.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Shader/Shader.h @@ -12,6 +12,7 @@ #pragma once #include +#include #include #include @@ -57,6 +58,7 @@ namespace AZ : public Data::InstanceData , public Data::AssetBus::Handler , public ShaderVariantFinderNotificationBus::Handler + , public ShaderReloadNotificationBus::Handler { friend class ShaderSystem; public: @@ -149,6 +151,15 @@ namespace AZ void OnShaderVariantTreeAssetReady(Data::Asset /*shaderVariantTreeAsset*/, bool /*isError*/) override {}; void OnShaderVariantAssetReady(Data::Asset shaderVariantAsset, bool IsError) override; /////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////// + // ShaderReloadNotificationBus overrides... + void OnShaderAssetReinitialized(const Data::Asset& shaderAsset) override; + // Note we don't need OnShaderVariantReinitialized because the Shader class doesn't do anything with the data inside + // the ShaderVariant object. The only thing we might want to do is propagate the message upward, but that's unnecessary + // because the ShaderReloadNotificationBus uses the Shader's AssetId as the ID for all messages including those from the variants. + // And of course we don't need to handle OnShaderReinitialized because this *is* this Shader. + /////////////////////////////////////////////////////////////////// /// Returns the path to the pipeline library cache file. AZStd::string GetPipelineLibraryPath() const; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialAsset.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialAsset.h index c941f1f587..d59f8a5c1c 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialAsset.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialAsset.h @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -38,6 +39,7 @@ namespace AZ : public AZ::Data::AssetData , public Data::AssetBus::Handler , public MaterialReloadNotificationBus::Handler + , public AssetInitBus::Handler { friend class MaterialAssetCreator; friend class MaterialAssetHandler; @@ -90,13 +92,17 @@ namespace AZ AZStd::array_view GetPropertyValues() const; private: - bool PostLoadInit(); + bool PostLoadInit() override; //! Called by asset creators to assign the asset to a ready state. void SetReady(); // AssetBus overrides... void OnAssetReloaded(Data::Asset asset) override; + void OnAssetReady(Data::Asset asset) override; + + //! Replaces the MaterialTypeAsset when a reload occurs + void ReinitializeMaterialTypeAsset(Data::Asset asset); // MaterialReloadNotificationBus overrides... void OnMaterialTypeAssetReinitialized(const Data::Asset& materialTypeAsset) override; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialTypeAsset.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialTypeAsset.h index 6b260b5ae3..f046a1afe2 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialTypeAsset.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Material/MaterialTypeAsset.h @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -52,6 +53,7 @@ namespace AZ class MaterialTypeAsset : public AZ::Data::AssetData , public Data::AssetBus::MultiHandler + , public AssetInitBus::Handler { friend class MaterialTypeAssetCreator; friend class MaterialTypeAssetHandler; @@ -100,13 +102,17 @@ namespace AZ MaterialUvNameMap GetUvNameMap() const; private: - bool PostLoadInit(); + bool PostLoadInit() override; //! Called by asset creators to assign the asset to a ready state. void SetReady(); // AssetBus overrides... void OnAssetReloaded(Data::Asset asset) override; + void OnAssetReady(Data::Asset asset) override; + + //! Replaces the appropriate asset members when a reload occurs + void ReinitializeAsset(Data::Asset asset); //! Holds values for each material property, used to initialize Material instances. //! This is indexed by MaterialPropertyIndex and aligns with entries in m_materialPropertiesLayout. diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h index cc31b0735a..e2926c2eab 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -40,6 +41,7 @@ namespace AZ : public Data::AssetData , public ShaderVariantFinderNotificationBus::Handler , public Data::AssetBus::Handler + , public AssetInitBus::Handler { friend class ShaderAssetCreator; friend class ShaderAssetHandler; @@ -134,8 +136,11 @@ namespace AZ /////////////////////////////////////////////////////////////////// /// AssetBus overrides void OnAssetReloaded(Data::Asset asset) override; + void OnAssetReady(Data::Asset asset) override; /////////////////////////////////////////////////////////////////// + void ReinitializeRootShaderVariant(Data::Asset asset); + /////////////////////////////////////////////////////////////////// /// ShaderVariantFinderNotificationBus overrides void OnShaderVariantTreeAssetReady(Data::Asset shaderVariantTreeAsset, bool isError) override; @@ -165,8 +170,13 @@ namespace AZ RHI::ShaderStageAttributeMapList m_attributeMaps; }; - bool FinalizeAfterLoad(); + bool PostLoadInit() override; void SetReady(); + + //! SelectShaderApiData() must be called before most other ShaderAsset functions. + bool SelectShaderApiData(); + + //! Returns the active ShaderApiDataContainer which was selected in SelectShaderApiData(). ShaderApiDataContainer& GetCurrentShaderApiData(); const ShaderApiDataContainer& GetCurrentShaderApiData() const; @@ -216,7 +226,6 @@ namespace AZ const Data::Asset& asset, AZStd::shared_ptr stream, const Data::AssetFilterCB& assetLoadFilterCB) override; - Data::AssetHandler::LoadResult PostLoadInit(const Data::Asset& asset); }; ////////////////////////////////////////////////////////////////////////// diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp index 44be2dabeb..87b6f5d92e 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -240,6 +241,8 @@ namespace AZ } AZ_ATOM_PROFILE_FUNCTION("RPI", "RPISystem: SimulationTick"); + AssetInitBus::Broadcast(&AssetInitBus::Events::PostLoadInit); + // Update tick time info FillTickTimeInfo(); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp index 147f24d4f8..3a79f32b05 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp @@ -21,7 +21,6 @@ #include #include -#include #include namespace AZ @@ -55,8 +54,9 @@ namespace AZ RHI::ResultCode Shader::Init(ShaderAsset& shaderAsset) { + Data::AssetBus::Handler::BusDisconnect(); + ShaderReloadNotificationBus::Handler::BusDisconnect(); ShaderVariantFinderNotificationBus::Handler::BusDisconnect(); - ShaderVariantFinderNotificationBus::Handler::BusConnect(shaderAsset.GetId()); RHI::RHISystemInterface* rhiSystem = RHI::RHISystemInterface::Get(); RHI::DrawListTagRegistry* drawListTagRegistry = rhiSystem->GetDrawListTagRegistry(); @@ -100,8 +100,10 @@ namespace AZ AZ_Error("Shader", false, "Failed to acquire a DrawListTag. Entries are full."); } } - + + ShaderVariantFinderNotificationBus::Handler::BusConnect(m_asset.GetId()); Data::AssetBus::Handler::BusConnect(m_asset.GetId()); + ShaderReloadNotificationBus::Handler::BusConnect(m_asset.GetId()); return RHI::ResultCode::Success; } @@ -110,6 +112,7 @@ namespace AZ { ShaderVariantFinderNotificationBus::Handler::BusDisconnect(); Data::AssetBus::Handler::BusDisconnect(); + ShaderReloadNotificationBus::Handler::BusDisconnect(); if (m_pipelineLibraryHandle.IsValid()) { @@ -139,7 +142,6 @@ namespace AZ Data::Asset newAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; AZ_Assert(newAsset, "Reloaded ShaderAsset is null"); - Data::AssetBus::Handler::BusDisconnect(); Init(*newAsset.Get()); ShaderReloadNotificationBus::Event(asset.GetId(), &ShaderReloadNotificationBus::Events::OnShaderReinitialized, *this); } @@ -196,6 +198,19 @@ namespace AZ } /////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////// + // ShaderReloadNotificationBus overrides... + void Shader::OnShaderAssetReinitialized(const Data::Asset& shaderAsset) + { + ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->Shader::OnShaderAssetReinitialized %s", this, shaderAsset.GetHint().c_str()); + + Init(*m_asset.Get()); + ShaderReloadNotificationBus::Event(shaderAsset.GetId(), &ShaderReloadNotificationBus::Events::OnShaderReinitialized, *this); + } + /////////////////////////////////////////////////////////////////// + + ConstPtr Shader::LoadPipelineLibrary() const { if (IO::FileIOBase::GetInstance()) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp index 2e56c30652..b8567b12c5 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp @@ -18,6 +18,7 @@ #include #include +#include namespace AZ { @@ -47,6 +48,7 @@ namespace AZ { MaterialReloadNotificationBus::Handler::BusDisconnect(); Data::AssetBus::Handler::BusDisconnect(); + AssetInitBus::Handler::BusDisconnect(); } const Data::Asset& MaterialAsset::GetMaterialTypeAsset() const @@ -97,6 +99,8 @@ namespace AZ { if (!m_materialTypeAsset.Get()) { + AssetInitBus::Handler::BusDisconnect(); + // Any MaterialAsset with invalid MaterialTypeAsset is not a successfully-loaded asset. return false; } @@ -104,6 +108,8 @@ namespace AZ { Data::AssetBus::Handler::BusConnect(m_materialTypeAsset.GetId()); MaterialReloadNotificationBus::Handler::BusConnect(m_materialTypeAsset.GetId()); + + AssetInitBus::Handler::BusDisconnect(); return true; } @@ -116,11 +122,9 @@ namespace AZ // Ultimately it's the Material that cares about these changes, so we just forward any signal we get. MaterialReloadNotificationBus::Event(GetId(), &MaterialReloadNotifications::OnMaterialAssetReinitialized, Data::Asset{this, AZ::Data::AssetLoadBehavior::PreLoad}); } - - void MaterialAsset::OnAssetReloaded(Data::Asset asset) + + void MaterialAsset::ReinitializeMaterialTypeAsset(Data::Asset asset) { - ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->MaterialAsset::OnAssetReloaded %s", this, asset.GetHint().c_str()); - Data::Asset newMaterialTypeAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; if (newMaterialTypeAsset) @@ -135,16 +139,31 @@ namespace AZ } } + void MaterialAsset::OnAssetReloaded(Data::Asset asset) + { + ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->MaterialAsset::OnAssetReloaded %s", this, asset.GetHint().c_str()); + ReinitializeMaterialTypeAsset(asset); + } + + void MaterialAsset::OnAssetReady(Data::Asset asset) + { + // Regarding why we listen to both OnAssetReloaded and OnAssetReady, see explanation in ShaderAsset::OnAssetReady. + ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->MaterialAsset::OnAssetReady %s", this, asset.GetHint().c_str()); + ReinitializeMaterialTypeAsset(asset); + } + Data::AssetHandler::LoadResult MaterialAssetHandler::LoadAssetData( const AZ::Data::Asset& asset, AZStd::shared_ptr stream, const AZ::Data::AssetFilterCB& assetLoadFilterCB) { - Data::AssetHandler::LoadResult baseResult = Base::LoadAssetData(asset, stream, assetLoadFilterCB); - bool postLoadResult = asset.GetAs()->PostLoadInit(); - return ((baseResult == Data::AssetHandler::LoadResult::LoadComplete) && postLoadResult) ? - Data::AssetHandler::LoadResult::LoadComplete : - Data::AssetHandler::LoadResult::Error; + if (Base::LoadAssetData(asset, stream, assetLoadFilterCB) == Data::AssetHandler::LoadResult::LoadComplete) + { + asset.GetAs()->AssetInitBus::Handler::BusConnect(); + return Data::AssetHandler::LoadResult::LoadComplete; + } + + return Data::AssetHandler::LoadResult::Error; } } // namespace RPI diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialTypeAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialTypeAsset.cpp index f7d0a83ac9..eaf6f0fcde 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialTypeAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialTypeAsset.cpp @@ -65,6 +65,7 @@ namespace AZ MaterialTypeAsset::~MaterialTypeAsset() { Data::AssetBus::MultiHandler::BusDisconnect(); + AssetInitBus::Handler::BusDisconnect(); } const ShaderCollection& MaterialTypeAsset::GetShaderCollection() const @@ -116,6 +117,8 @@ namespace AZ Data::AssetBus::MultiHandler::BusConnect(shaderItem.GetShaderAsset().GetId()); } + AssetInitBus::Handler::BusDisconnect(); + return true; } @@ -127,11 +130,9 @@ namespace AZ assetToReplace = newAsset; } } - - void MaterialTypeAsset::OnAssetReloaded(Data::Asset asset) + + void MaterialTypeAsset::ReinitializeAsset(Data::Asset asset) { - ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->MaterialTypeAsset::OnAssetReloaded %s", this, asset.GetHint().c_str()); - // The order of asset reloads is non-deterministic. If the MaterialTypeAsset reloads before these // dependency assets, this will make sure the MaterialTypeAsset gets the latest ones when they reload. // Or in some cases a these assets could get updated and reloaded without reloading the MaterialTypeAsset at all. @@ -146,16 +147,31 @@ namespace AZ MaterialReloadNotificationBus::Event(GetId(), &MaterialReloadNotifications::OnMaterialTypeAssetReinitialized, Data::Asset{this, AZ::Data::AssetLoadBehavior::PreLoad}); } + void MaterialTypeAsset::OnAssetReloaded(Data::Asset asset) + { + ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->MaterialTypeAsset::OnAssetReloaded %s", this, asset.GetHint().c_str()); + ReinitializeAsset(asset); + } + + void MaterialTypeAsset::OnAssetReady(Data::Asset asset) + { + // Regarding why we listen to both OnAssetReloaded and OnAssetReady, see explanation in ShaderAsset::OnAssetReady. + ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->MaterialTypeAsset::OnAssetReady %s", this, asset.GetHint().c_str()); + ReinitializeAsset(asset); + } + AZ::Data::AssetHandler::LoadResult MaterialTypeAssetHandler::LoadAssetData( const AZ::Data::Asset& asset, AZStd::shared_ptr stream, const AZ::Data::AssetFilterCB& assetLoadFilterCB) { - Data::AssetHandler::LoadResult baseResult = Base::LoadAssetData(asset, stream, assetLoadFilterCB); - bool postLoadResult = asset.GetAs()->PostLoadInit(); - return ((baseResult == Data::AssetHandler::LoadResult::LoadComplete) && postLoadResult) ? - Data::AssetHandler::LoadResult::LoadComplete : - Data::AssetHandler::LoadResult::Error; + if (Base::LoadAssetData(asset, stream, assetLoadFilterCB) == Data::AssetHandler::LoadResult::LoadComplete) + { + asset.GetAs()->AssetInitBus::Handler::BusConnect(); + return Data::AssetHandler::LoadResult::LoadComplete; + } + + return Data::AssetHandler::LoadResult::Error; } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAsset.cpp index 75d4a47bc0..b4c041b763 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAsset.cpp @@ -85,6 +85,7 @@ namespace AZ { Data::AssetBus::Handler::BusDisconnect(); ShaderVariantFinderNotificationBus::Handler::BusDisconnect(); + AssetInitBus::Handler::BusDisconnect(); } const Name& ShaderAsset::GetName() const @@ -331,8 +332,8 @@ namespace AZ // We may only endup here when running in a Builder context. return m_perAPIShaderData[0]; } - - bool ShaderAsset::FinalizeAfterLoad() + + bool ShaderAsset::SelectShaderApiData() { // Use the current RHI that is active to select which shader data to use. // We don't assert if the Factory is not available because this method could be called during build time, @@ -370,28 +371,51 @@ namespace AZ } } + return true; + } + + bool ShaderAsset::PostLoadInit() + { // Once the ShaderAsset is loaded, it is necessary to listen for changes in the Root Variant Asset. Data::AssetBus::Handler::BusConnect(GetRootVariant().GetId()); ShaderVariantFinderNotificationBus::Handler::BusConnect(GetId()); + + AssetInitBus::Handler::BusDisconnect(); return true; } + + void ShaderAsset::ReinitializeRootShaderVariant(Data::Asset asset) + { + Data::Asset shaderVariantAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; + AZ_Assert(shaderVariantAsset->GetStableId() == RootShaderVariantStableId, "Was expecting to update the root variant"); + GetCurrentShaderApiData().m_rootShaderVariantAsset = asset; + ShaderReloadNotificationBus::Event(GetId(), &ShaderReloadNotificationBus::Events::OnShaderAssetReinitialized, Data::Asset{ this, AZ::Data::AssetLoadBehavior::PreLoad } ); + } /////////////////////////////////////////////////////////////////////// // AssetBus overrides... void ShaderAsset::OnAssetReloaded(Data::Asset asset) { ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->ShaderAsset::OnAssetReloaded %s", this, asset.GetHint().c_str()); + ReinitializeRootShaderVariant(asset); + } + void ShaderAsset::OnAssetReady(Data::Asset asset) + { + // We have to listen to OnAssetReady, OnAssetReloaded isn't enough, because of the following scenario: + // The user changes a .shader file, which causes the AP to rebuild the ShaderAsset and root ShaderVariantAsset. + // 1) Thread A creates the new ShaderAsset, loads it, and gets the old ShaderVariantAsset. + // 2) Thread B creates the new ShaderVariantAsset, loads it, and calls OnAssetReloaded. + // 3) Main thread calls ShaderAsset::PostLoadInit which connects to the AssetBus but it's too late to receive OnAssetReloaded, + // so it continues using the old ShaderVariantAsset instead of the new one. + // The OnAssetReady bus function is called automatically whenever a connection to AssetBus is made, so listening to this gives + // us the opportunity to assign the appropriate ShaderVariantAsset. - Data::Asset shaderVariantAsset = { asset.GetAs(), AZ::Data::AssetLoadBehavior::PreLoad }; - AZ_Assert(shaderVariantAsset->GetStableId() == RootShaderVariantStableId, - "Was expecting to update the root variant"); - GetCurrentShaderApiData().m_rootShaderVariantAsset = asset; - - ShaderReloadNotificationBus::Event(GetId(), &ShaderReloadNotificationBus::Events::OnShaderAssetReinitialized, Data::Asset{ this, AZ::Data::AssetLoadBehavior::PreLoad } ); + ShaderReloadDebugTracker::ScopedSection reloadSection("{%p}->ShaderAsset::OnAssetReady %s", this, asset.GetHint().c_str()); + ReinitializeRootShaderVariant(asset); } /////////////////////////////////////////////////////////////////////// - + /////////////////////////////////////////////////////////////////// /// ShaderVariantFinderNotificationBus overrides void ShaderAsset::OnShaderVariantTreeAssetReady(Data::Asset shaderVariantTreeAsset, bool isError) @@ -425,25 +449,25 @@ namespace AZ { if (Base::LoadAssetData(asset, stream, assetLoadFilterCB) == Data::AssetHandler::LoadResult::LoadComplete) { - return PostLoadInit(asset); - } - return Data::AssetHandler::LoadResult::Error; - } + ShaderAsset* shaderAsset = asset.GetAs(); - Data::AssetHandler::LoadResult ShaderAssetHandler::PostLoadInit(const Data::Asset& asset) - { - if (ShaderAsset* shaderAsset = asset.GetAs()) - { - if (!shaderAsset->FinalizeAfterLoad()) + // The shader API selection must occur immediately ofter loading, on the same thread, rather than + // deferring to AssetInitBus::PostLoadInit. Many functions in the ShaderAsset class are invalid + // until after SelectShaderApiData() is called and some client code may need to access data in + // the ShaderAsset before then. + if (!shaderAsset->SelectShaderApiData()) { - AZ_Error("ShaderAssetHandler", false, "Shader asset failed to finalize."); return Data::AssetHandler::LoadResult::Error; } + + shaderAsset->AssetInitBus::Handler::BusConnect(); + return Data::AssetHandler::LoadResult::LoadComplete; } + return Data::AssetHandler::LoadResult::Error; } - + /////////////////////////////////////////////////////////////////////// } // namespace RPI diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAssetCreator.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAssetCreator.cpp index 2e2be18e0a..ce912c2a10 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAssetCreator.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderAssetCreator.cpp @@ -218,7 +218,7 @@ namespace AZ return false; } - if (!m_asset->FinalizeAfterLoad()) + if (!m_asset->SelectShaderApiData()) { ReportError("Failed to finalize the ShaderAsset."); return false; diff --git a/Gems/Atom/RPI/Code/Tests/Shader/ShaderTests.cpp b/Gems/Atom/RPI/Code/Tests/Shader/ShaderTests.cpp index 7a3fe2454e..f3c68ac7f6 100644 --- a/Gems/Atom/RPI/Code/Tests/Shader/ShaderTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Shader/ShaderTests.cpp @@ -56,7 +56,7 @@ namespace AZ AZ::Data::Asset SerializeInHelper(const AZ::Data::AssetId& assetId) { AZ::Data::Asset asset = Base::SerializeIn(assetId); - asset->FinalizeAfterLoad(); + asset->SelectShaderApiData(); asset->SetReady(); return asset; } diff --git a/Gems/Atom/RPI/Code/atom_rpi_public_files.cmake b/Gems/Atom/RPI/Code/atom_rpi_public_files.cmake index a1d98bbd38..c70e0bfaa3 100644 --- a/Gems/Atom/RPI/Code/atom_rpi_public_files.cmake +++ b/Gems/Atom/RPI/Code/atom_rpi_public_files.cmake @@ -10,6 +10,7 @@ # set(FILES + Include/Atom/RPI.Public/AssetInitBus.h Include/Atom/RPI.Public/Base.h Include/Atom/RPI.Public/Culling.h Include/Atom/RPI.Public/FeatureProcessor.h diff --git a/Gems/AtomContent/CMakeLists.txt b/Gems/AtomContent/CMakeLists.txt index 4d5680a30d..79842f462c 100644 --- a/Gems/AtomContent/CMakeLists.txt +++ b/Gems/AtomContent/CMakeLists.txt @@ -8,3 +8,7 @@ # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # + +add_subdirectory(LookDevelopmentStudioPixar) +add_subdirectory(ReferenceMaterials) +add_subdirectory(Sponza) diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_AmbientOcclusion.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_AmbientOcclusion.png deleted file mode 100644 index 2ac4eadec2..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_AmbientOcclusion.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6cfa740b94b898e85d93f970a7d7d76581e065662dd8e2b350ea076bd6fe8d35 -size 37187591 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_BaseColor.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_BaseColor.png deleted file mode 100644 index 2d652b9e6f..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_BaseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:254aacfb72ed12743f83740f9eb31a01d28c40c0abeacc39907d20ab82f42636 -size 390896034 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_Displacement.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_Displacement.png deleted file mode 100644 index bb501fb326..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_Displacement.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c164a61daf248f57eacee5167eb9d098a49d7dfc7aea6c68007d7e0c06a29906 -size 74644256 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_Normal.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_Normal.png deleted file mode 100644 index 2d29c01ada..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_Normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ade44968832bf7a3e9cab95ddccc4018c7250b07437cddc51c784815b1dcb930 -size 392066587 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_Roughness.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_Roughness.png deleted file mode 100644 index 26acb09325..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/Bricks038_8K_Roughness.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:51dacbe0048b892a196ea9e6178cca908ba46a6f86b7ec979cf0fd7e381720b3 -size 112681262 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/bricks038.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/bricks038.material deleted file mode 100644 index 82b1cdb590..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Bricks038_8K/bricks038.material +++ /dev/null @@ -1,39 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "occlusion": { - "diffuseTextureMap": "Materials/Bricks038_8K/Bricks038_8K_AmbientOcclusion.png" - }, - "baseColor": { - "color": [ - 0.496940553188324, - 0.496940553188324, - 0.496940553188324, - 1.0 - ], - "factor": 0.6464645862579346, - "textureBlendMode": "LinearLight", - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_BaseColor.png" - }, - "general": { - "applySpecularAA": true - }, - "normal": { - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_Normal.png" - }, - "parallax": { - "algorithm": "POM", - "factor": 0.02500000037252903, - "pdo": true, - "quality": "Ultra", - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_Displacement.png" - }, - "roughness": { - "upperBound": 0.5, - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_Roughness.png" - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016.material deleted file mode 100644 index 03fb0ea5be..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016.material +++ /dev/null @@ -1,41 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.19562065601348878, - 0.22017242014408112, - 0.2503242492675781, - 1.0 - ], - "factor": 0.30000001192092898, - "textureBlendMode": "LinearLight", - "textureMap": "Materials/Concrete016_8K/Concrete016_8K_BaseColor.png" - }, - "clearCoat": { - "enable": true, - "normalMap": "Materials/Concrete016_8K/roller_painted_metal_normal.tif", - "roughness": 0.18181820213794709 - }, - "general": { - "applySpecularAA": true - }, - "normal": { - "factor": 0.6499999761581421, - "textureMap": "Materials/Concrete016_8K/Concrete016_8K_Normal.png" - }, - "parallax": { - "algorithm": "ContactRefinement", - "factor": 0.019999999552965165, - "quality": "Ultra", - "textureMap": "Materials/Concrete016_8K/Concrete016_8K_Displacement.png", - "useTexture": false - }, - "roughness": { - "textureMap": "Materials/Concrete016_8K/Concrete016_8K_Roughness.png" - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_BaseColor.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_BaseColor.png deleted file mode 100644 index ad611fc7e7..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_BaseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:42d3ef187f7f98bcee42ffc4ae0629370f4fc19e6532c2db8cc130ce9ece072a -size 74279846 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_Displacement.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_Displacement.png deleted file mode 100644 index 6c7bd47ac6..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_Displacement.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8e8149f5609ae85f876183f3b4461de4a334658660fc187c5fd469752e5b2d6 -size 93715669 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_Normal.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_Normal.png deleted file mode 100644 index 03fcd69a18..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_Normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f997219d3bb846ea0db7786a394e508d59f99be9548b63d3c73824d97cdacd7 -size 379009988 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_Roughness.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_Roughness.png deleted file mode 100644 index 220a4651a3..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/Concrete016_8K_Roughness.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ea7f520b28d5232697ea9e4fb4cc7d655069d05f9de0313c92c56e4c1526556 -size 25594794 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/roller_painted_metal_normal.tif b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/roller_painted_metal_normal.tif deleted file mode 100644 index 8d7b594be3..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Concrete016_8K/roller_painted_metal_normal.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:94c9398b1f5d71aa3f4debb5a9571f0d9a4b1b1992b662e35ca94996b507e4ff -size 6933173 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001.material deleted file mode 100644 index 7d8c3d5142..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001.material +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "textureMap": "Materials/Fabric001_8K/Fabric001_8K_BaseColor.png" - }, - "clearCoat": { - "enable": true, - "normalMap": "Materials/Fabric001_8K/Fabric001_8K_Normal.png", - "roughness": 0.4040403962135315 - }, - "general": { - "applySpecularAA": true - }, - "normal": { - "textureMap": "Materials/Fabric001_8K/Fabric001_8K_Normal.png" - }, - "parallax": { - "algorithm": "ContactRefinement", - "factor": 0.004999999888241291, - "quality": "Ultra", - "textureMap": "Materials/Fabric001_8K/Fabric001_8K_Displacement.png" - }, - "roughness": { - "textureMap": "Materials/Fabric001_8K/Fabric001_8K_Roughness.png" - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_BaseColor.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_BaseColor.png deleted file mode 100644 index aeb286f3ff..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_BaseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e04ea2d456e13fb45a2c4f3f88d2ed07c2799fbdaeba6b52bab64dcd84fefc77 -size 69539547 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_Displacement.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_Displacement.png deleted file mode 100644 index eab791d40d..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_Displacement.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b41f8b8aa685c443216220063cd6c1de3f620ef66776aecd374025a689dec77 -size 19743435 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_Normal.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_Normal.png deleted file mode 100644 index 48abbdef93..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_Normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:009302f8be232e7fd6b23d368c85afdb74ea4deda8147152f2c92d116a2ac585 -size 56894065 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_Roughness.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_Roughness.png deleted file mode 100644 index 5f00784e4b..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric001_8K/Fabric001_8K_Roughness.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a557862deee7f4ff9bb113f66b1fd432871338d5b801edec7c50f70aa302557d -size 26820294 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030.material deleted file mode 100644 index 493bfab455..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030.material +++ /dev/null @@ -1,32 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "textureMap": "Materials/Fabric030_4K/Fabric030_4K_BaseColor.png" - }, - "clearCoat": { - "enable": true, - "normalMap": "Materials/Fabric030_4K/Fabric030_4K_Normal.png", - "roughness": 0.7676767706871033, - "roughnessMap": "Materials/Fabric030_4K/Fabric030_4K_Roughness.png", - "useInfluenceMap": false - }, - "normal": { - "factor": 0.5, - "textureMap": "Materials/Fabric030_4K/Fabric030_4K_Normal.png" - }, - "parallax": { - "algorithm": "ContactRefinement", - "factor": 0.0020000000949949028, - "pdo": true, - "quality": "Medium", - "textureMap": "Materials/Fabric030_4K/Fabric030_4K_Displacement.png" - }, - "roughness": { - "textureMap": "Materials/Fabric030_4K/Fabric030_4K_Roughness.png" - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_AmbientOcclusion.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_AmbientOcclusion.png deleted file mode 100644 index fa7d1a700a..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_AmbientOcclusion.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb2f62e3166428f137b8712f4527c62d3905a8e177840b56fb1775e39417448d -size 11268075 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_BaseColor.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_BaseColor.png deleted file mode 100644 index 5d41fd1df6..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_BaseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:194674f50a0c868d2a2c12cc7a4ddbe5abbe6ebb9687be4be4e49eece3976e29 -size 94910229 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_Displacement.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_Displacement.png deleted file mode 100644 index 4558f36d0b..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_Displacement.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3f29be8c7afe73b12f5c7df3e3ffd69a0bce46218cef57f73c11638aa07ccc3 -size 19243987 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_Normal.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_Normal.png deleted file mode 100644 index daf33b8e74..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_Normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0bc0c08f0b8e33b3251f7dba85c5042138a201e912752135a0bdcfe9c381d5ab -size 63142427 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_Roughness.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_Roughness.png deleted file mode 100644 index 515967232a..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/Fabric030_4K/Fabric030_4K_Roughness.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa5ffdb5b9ef2363c58eb85b47adc9e1bdde13256bdc6de05cbfb5b04cf91f91 -size 26802284 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015.material deleted file mode 100644 index a2bb2c7704..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015.material +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "occlusion": { - "diffuseFactor": 0.30000001192092898, - "diffuseTextureMap": "Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_AmbientOcclusion.png" - }, - "baseColor": { - "textureMap": "Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_BaseColor.png" - }, - "general": { - "applySpecularAA": true - }, - "normal": { - "textureMap": "Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Normal.png" - }, - "parallax": { - "algorithm": "ContactRefinement", - "factor": 0.009999999776482582, - "pdo": true, - "quality": "Ultra", - "textureMap": "Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Displacement.png" - }, - "roughness": { - "textureMap": "Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Roughness.png" - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_AmbientOcclusion.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_AmbientOcclusion.png deleted file mode 100644 index 4ec3357052..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_AmbientOcclusion.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c271d8a3f305bacafb74037898e8d5841fb8a2fedc0092cbe14134d2ec891d01 -size 115473298 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_BaseColor.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_BaseColor.png deleted file mode 100644 index ad471f2932..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_BaseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:720d85d530e192da6e7daaab89501a9612e145f4aa41405958ff49f765f072ab -size 325006015 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Displacement.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Displacement.png deleted file mode 100644 index dc502609f5..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Displacement.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:71f256cde0427ab8558b09d743d9379899a9a72b4388ca14529bfc9090dd811e -size 88972723 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Normal.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Normal.png deleted file mode 100644 index 92af1ccb1c..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e7eb03dd1ae07ade8e8e99fe6f522fd268ef8e00d3e3f9c3594d9f887b864d8 -size 382741403 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Roughness.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Roughness.png deleted file mode 100644 index 8d73944285..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_Roughness.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3f065a3929ea98b54c725515528c2d40b3908a352d497bcce2f088a91b623b11 -size 98105202 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/baseboards.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/baseboards.material deleted file mode 100644 index dee6ded191..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/baseboards.material +++ /dev/null @@ -1,42 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.496940553188324, - 0.496940553188324, - 0.496940553188324, - 1.0 - ], - "textureBlendMode": "LinearLight", - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_BaseColor.png", - "useTexture": false - }, - "emissive": { - "useTexture": false - }, - "general": { - "applySpecularAA": true - }, - "normal": { - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_Normal.png", - "useTexture": false - }, - "parallax": { - "algorithm": "POM", - "factor": 0.02500000037252903, - "pdo": true, - "quality": "Ultra", - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_Displacement.png", - "useTexture": false - }, - "roughness": { - "factor": 0.4343433976173401, - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_Roughness.png", - "useTexture": false - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/crown.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/crown.material deleted file mode 100644 index d7e2050dbd..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/crown.material +++ /dev/null @@ -1,34 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.496940553188324, - 0.496940553188324, - 0.496940553188324, - 1.0 - ], - "factor": 0.6464645862579346, - "textureBlendMode": "LinearLight" - }, - "general": { - "applySpecularAA": true - }, - "normal": { - "textureMap": "Materials/Concrete016_8K/Concrete016_8K_Normal.png" - }, - "parallax": { - "algorithm": "POM", - "factor": 0.02500000037252903, - "pdo": true, - "quality": "Ultra", - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_Displacement.png" - }, - "roughness": { - "textureMap": "Materials/Concrete016_8K/Concrete016_8K_Roughness.png" - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/metal_fleck_2048_normal.jpg b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/metal_fleck_2048_normal.jpg deleted file mode 100644 index bfa2941bee..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/metal_fleck_2048_normal.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:486712a84618c56b79c6cb12966fe5c44a70bc6573c5eed74381ccdd68592e06 -size 20574 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/metal_fleck_normal.jpg b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/metal_fleck_normal.jpg deleted file mode 100644 index 6a74bf535e..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/metal_fleck_normal.jpg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c2826872e937f6794a62f75b10b5217dd541fc419ebc1ebe2d4469a38344332 -size 24339 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/round_metal_flecks_2048_normal.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/round_metal_flecks_2048_normal.png deleted file mode 100644 index 40e0054efc..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/round_metal_flecks_2048_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d603f570813bad6c2db2c055114a5990d5113f7b2c11074a0e8ba83c2007490 -size 1849470 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/round_metal_flecks_4096_normal.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/round_metal_flecks_4096_normal.png deleted file mode 100644 index 116e39935c..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/round_metal_flecks_4096_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d2715b8a38b8198d84927a881440328b2fe565be27737c970da9366c9eab566a -size 3886331 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/round_metal_flecks_512_normal.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/round_metal_flecks_512_normal.png deleted file mode 100644 index 24cce5654a..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Materials/round_metal_flecks_512_normal.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1658a8fbf035d669c88e112c3922f223e77cccece7cb51a0fa2df50412fb02d0 -size 435923 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/.source/LookDevStudio.mb b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/.source/LookDevStudio.mb deleted file mode 100644 index 59e85a30ab..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/.source/LookDevStudio.mb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b63a99deac3bcf4b9d93359edb68bb22f28da4c9c3d5a7f1d715a84e8c603519 -size 7522972 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/.source/LookDevStudio_original.mb b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/.source/LookDevStudio_original.mb deleted file mode 100644 index 71eaea345b..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/.source/LookDevStudio_original.mb +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d4065dfea401af3b53bcd2906535239d54628c800704f96acbd2767042bc432c -size 8792244 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Backdrop.fbx b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Backdrop.fbx deleted file mode 100644 index 305685670e..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Backdrop.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:93f5e3663a69d9e29bcc64715363420fb8a1331c8f714b9dbdf4d6a6577f943b -size 175120 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Cube_1m.fbx b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Cube_1m.fbx deleted file mode 100644 index 3495326570..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Cube_1m.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d09adbd3e1ef1f1bed98c9ea3034c323bf3f1be25faba5d3721310f46029b0bb -size 24608 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Lighthead.fbx b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Lighthead.fbx deleted file mode 100644 index 638a7b0b8a..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Lighthead.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:391a2e1931263446ee2f38810ee9fc4bc4de29c171cf557398d6bf4a0eba1263 -size 110384 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Lighthead_lightfacingemissive.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Lighthead_lightfacingemissive.material deleted file mode 100644 index ddc298a08b..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/Lighthead_lightfacingemissive.material +++ /dev/null @@ -1,23 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 1.600000023841858, - 1.600000023841858, - 1.600000023841858, - 1.0 - ] - }, - "emissive": { - "enable": true, - "intensity": 0.0 - }, - "opacity": { - "factor": 1.0 - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot.fbx b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot.fbx deleted file mode 100644 index 0ac85540d4..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c6c174dde81f8a37f591108b62666347920d0765f3e61c6d557ebf807f38cd3b -size 4512544 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_base_inner.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_base_inner.material deleted file mode 100644 index 4921ff3051..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_base_inner.material +++ /dev/null @@ -1,25 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.4000000059604645, - 0.4000000059604645, - 0.4000000059604645, - 1.0 - ] - }, - "metallic": { - "factor": 1.0 - }, - "opacity": { - "factor": 1.0 - }, - "roughness": { - "factor": 0.25 - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_base_outer1.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_base_outer1.material deleted file mode 100644 index 4cca9e9538..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_base_outer1.material +++ /dev/null @@ -1,25 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.6000000238418579, - 0.6000000238418579, - 0.6000000238418579, - 1.0 - ] - }, - "metallic": { - "factor": 1.0 - }, - "opacity": { - "factor": 1.0 - }, - "roughness": { - "factor": 0.25 - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_cornell_white.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_cornell_white.material deleted file mode 100644 index d01303f3de..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_cornell_white.material +++ /dev/null @@ -1,25 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.8199999928474426, - 0.8199999928474426, - 0.8199999928474426, - 1.0 - ] - }, - "metallic": { - "factor": 1.0 - }, - "opacity": { - "factor": 1.0 - }, - "roughness": { - "factor": 0.25 - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_playfulteapot.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_playfulteapot.material deleted file mode 100644 index da35fda141..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_playfulteapot.material +++ /dev/null @@ -1,40 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.0, - 0.800000011920929, - 0.800000011920929, - 1.0 - ] - }, - "clearCoat": { - "enable": true, - "normalMap": "EngineAssets/Textures/perlinNoiseNormal_ddn.tif", - "normalStrength": 0.10000000149011612 - }, - "general": { - "applySpecularAA": true - }, - "metallic": { - "factor": 0.10000000149011612 - }, - "normal": { - "factor": 0.05000000074505806, - "textureMap": "Materials/round_metal_flecks_4096_normal.png" - }, - "opacity": { - "factor": 1.0 - }, - "roughness": { - "factor": 0.0 - }, - "specularF0": { - "enableMultiScatterCompensation": true - } - } -} \ No newline at end of file diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_playfulteapotfeet.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_playfulteapotfeet.material deleted file mode 100644 index dadb080e8b..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/PlayfulTeapot_playfulteapotfeet.material +++ /dev/null @@ -1,41 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.800000011920929, - 0.0, - 0.0, - 1.0 - ] - }, - "clearCoat": { - "enable": true, - "normalMap": "Materials/Concrete016_8K/roller_painted_metal_normal.tif", - "roughness": 0.1414141058921814 - }, - "general": { - "applySpecularAA": true - }, - "metallic": { - "factor": 0.20000000298023225 - }, - "normal": { - "factor": 0.10000000149011612, - "textureMap": "Materials/round_metal_flecks_2048_normal.png" - }, - "opacity": { - "factor": 1.0 - }, - "roughness": { - "factor": 0.5 - }, - "uv": { - "tileU": 2.0, - "tileV": 2.0 - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room.fbx b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room.fbx deleted file mode 100644 index d5e1f5665d..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c2f3ea6e00e15901263c06fee2aa4d54b96277f7ac103dd8b3c0f8441158d31e -size 83584 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_ceiling.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_ceiling.material deleted file mode 100644 index e0b3453735..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_ceiling.material +++ /dev/null @@ -1,19 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.0, - 0.0, - 0.800000011920929, - 1.0 - ] - }, - "opacity": { - "factor": 1.0 - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_cornell_green.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_cornell_green.material deleted file mode 100644 index 00b2da857b..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_cornell_green.material +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_BaseColor.png" - }, - "opacity": { - "factor": 1.0 - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_cornell_red.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_cornell_red.material deleted file mode 100644 index 00b2da857b..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_cornell_red.material +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_BaseColor.png" - }, - "opacity": { - "factor": 1.0 - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_cornell_white.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_cornell_white.material deleted file mode 100644 index 8a8044d19b..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_cornell_white.material +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.8199999928474426, - 0.8199999928474426, - 0.8199999928474426, - 1.0 - ], - "textureMap": "Materials/Bricks038_8K/Bricks038_8K_BaseColor.png" - }, - "opacity": { - "factor": 1.0 - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_crown.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_crown.material deleted file mode 100644 index 57991d40fb..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_crown.material +++ /dev/null @@ -1,19 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.0, - 1.0 - ] - }, - "opacity": { - "factor": 1.0 - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_floor.material b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_floor.material deleted file mode 100644 index 0720d45c14..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Objects/cornell_room_floor.material +++ /dev/null @@ -1,19 +0,0 @@ -{ - "description": "", - "materialType": "Materials/Types/StandardPBR.materialtype", - "parentMaterial": "", - "propertyLayoutVersion": 3, - "properties": { - "baseColor": { - "color": [ - 0.4000000059604645, - 0.4000000059604645, - 0.4000000059604645, - 1.0 - ] - }, - "opacity": { - "factor": 1.0 - } - } -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Disk.slice b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Disk.slice deleted file mode 100644 index bec92cea44..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Disk.slice +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Omni.slice b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Omni.slice deleted file mode 100644 index 85dec3a415..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Omni.slice +++ /dev/null @@ -1,951 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Quad.slice b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Quad.slice deleted file mode 100644 index c675449806..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Quad.slice +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Sphere.slice b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Sphere.slice deleted file mode 100644 index 0e2fc880cf..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Sphere.slice +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Spotlight.slice b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Spotlight.slice deleted file mode 100644 index 1efd2fe80b..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Slices/Lighthead-Spotlight.slice +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Textures/sRGB_ColorChecker2014.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Textures/sRGB_ColorChecker2014.png deleted file mode 100644 index de365bc358..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Textures/sRGB_ColorChecker2014.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e2d7323c6a016fa8927a311e757ce1b929888537629abbe3cd9b0bf3277d2108 -size 41983 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Textures/sRGB_Labels_ColorChecker2014.png b/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Textures/sRGB_Labels_ColorChecker2014.png deleted file mode 100644 index 1d3efacced..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Assets/Textures/sRGB_Labels_ColorChecker2014.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c26bdbdb2efe98742b44bf254295893e989bdb751bc3716f9fd87cb06f27490d -size 675101 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/CMakeLists.txt b/Gems/AtomContent/LookDevelopmentStudioPixar/CMakeLists.txt new file mode 100644 index 0000000000..1eef04a86d --- /dev/null +++ b/Gems/AtomContent/LookDevelopmentStudioPixar/CMakeLists.txt @@ -0,0 +1,15 @@ +# +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# + +# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME AtomContent_LookDevelopmentStudioPixar.Builders NAMESPACE Gem) +endif() diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Launch_Cmd.bat b/Gems/AtomContent/LookDevelopmentStudioPixar/Launch_Cmd.bat deleted file mode 100644 index 2056a5bf44..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Launch_Cmd.bat +++ /dev/null @@ -1,49 +0,0 @@ -:: Need to set up - -@echo off - -REM -REM All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -REM its licensors. -REM -REM For complete copyright and license terms please see the LICENSE at the root of this -REM distribution (the "License"). All use of this software is governed by the License, -REM or, if provided, by the license below or the license accompanying this file. Do not -REM remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -REM - -:: Set up and run LY Python CMD prompt -:: Sets up the DccScriptingInterface_Env, -:: Puts you in the CMD within the dev environment - -:: Set up window -TITLE Lumberyard DCC Scripting Interface Cmd -:: Use obvious color to prevent confusion (Grey with Yellow Text) -COLOR 8E - -%~d0 -cd %~dp0 -PUSHD %~dp0 - -:: Keep changes local -SETLOCAL enableDelayedExpansion - -CALL %~dp0\Project_Env.bat - -echo. -echo _____________________________________________________________________ -echo. -echo ~ LY DCC Scripting Interface CMD ... -echo _____________________________________________________________________ -echo. - -:: Create command prompt with environment -CALL %windir%\system32\cmd.exe - -ENDLOCAL - -:: Return to starting directory -POPD - -:END_OF_FILE diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Launch_Maya_2020.bat b/Gems/AtomContent/LookDevelopmentStudioPixar/Launch_Maya_2020.bat deleted file mode 100644 index fab2bb21fd..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Launch_Maya_2020.bat +++ /dev/null @@ -1,70 +0,0 @@ -:: Launches maya wityh a bunch of local hooks for Lumberyard -:: ToDo: move all of this to a .json data driven boostrapping system - -@echo off - -REM -REM All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -REM its licensors. -REM -REM For complete copyright and license terms please see the LICENSE at the root of this -REM distribution (the "License"). All use of this software is governed by the License, -REM or, if provided, by the license below or the license accompanying this file. Do not -REM remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -REM - -%~d0 -cd %~dp0 -PUSHD %~dp0 - -echo ________________________________ -echo ~ calling PROJ_Env.bat - -:: Keep changes local -SETLOCAL enableDelayedExpansion - -:: PY version Major -set DCCSI_PY_VERSION_MAJOR=2 -echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR% - -:: PY version Major -set DCCSI_PY_VERSION_MINOR=7 -echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR% - -:: Maya Version -set MAYA_VERSION=2020 -echo MAYA_VERSION = %MAYA_VERSION% - -:: if a local customEnv.bat exists, run it -IF EXIST "%~dp0Project_Env.bat" CALL %~dp0Project_Env.bat - -echo ________________________________ -echo Launching Maya %MAYA_VERSION% for Lumberyard... - -:::: Set Maya native project acess to this project -::set MAYA_PROJECT=%LY_PROJECT% -::echo MAYA_PROJECT = %MAYA_PROJECT% - -:: DX11 Viewport -Set MAYA_VP2_DEVICE_OVERRIDE = VirtualDeviceDx11 - -:: Default to the right version of Maya if we can detect it... and launch -IF EXIST "%MAYA_LOCATION%\bin\Maya.exe" ( - start "" "%MAYA_LOCATION%\bin\Maya.exe" %* -) ELSE ( - Where maya.exe 2> NUL - IF ERRORLEVEL 1 ( - echo Maya.exe could not be found - pause - ) ELSE ( - start "" Maya.exe %* - ) -) - -:: Return to starting directory -POPD - -:END_OF_FILE - -exit /b 0 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Launch_WingIDE-7-1.bat b/Gems/AtomContent/LookDevelopmentStudioPixar/Launch_WingIDE-7-1.bat deleted file mode 100644 index 9f143fd889..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Launch_WingIDE-7-1.bat +++ /dev/null @@ -1,82 +0,0 @@ -@echo off -:: Launches Wing IDE and the DccScriptingInterface Project Files - -REM -REM All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -REM its licensors. -REM -REM For complete copyright and license terms please see the LICENSE at the root of this -REM distribution (the "License"). All use of this software is governed by the License, -REM or, if provided, by the license below or the license accompanying this file. Do not -REM remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -REM - -echo. -echo _____________________________________________________________________ -echo. -echo ~ Setting up LY DCCsi WingIDE Dev Env... -echo _____________________________________________________________________ -echo. - -:: Store current dir -%~d0 -cd %~dp0 -PUSHD %~dp0 - -:: Keep changes local -SETLOCAL enableDelayedExpansion - -SET ABS_PATH=%~dp0 -echo Current Dir, %ABS_PATH% - -:: WingIDE version Major -SET WING_VERSION_MAJOR=7 -echo WING_VERSION_MAJOR = %WING_VERSION_MAJOR% - -:: WingIDE version Major -SET WING_VERSION_MINOR=1 -echo WING_VERSION_MINOR = %WING_VERSION_MINOR% - -:: note the changed path from IDE to Pro -set WINGHOME=%PROGRAMFILES(X86)%\Wing Pro %WING_VERSION_MAJOR%.%WING_VERSION_MINOR% -echo WINGHOME = %WINGHOME% - -CALL %~dp0\Project_Env.bat - -echo. -echo _____________________________________________________________________ -echo. -echo ~ WingIDE Version %WING_VERSION_MAJOR%.%WING_VERSION_MINOR% -echo _____________________________________________________________________ -echo. - -SET WING_PROJ=%DCCSIG_PATH%\Solutions\.wing\DCCsi_%WING_VERSION_MAJOR%x.wpr -echo WING_PROJ = %WING_PROJ% - -echo. -echo _____________________________________________________________________ -echo. -echo ~ Launching %LY_PROJECT% project in WingIDE %WING_VERSION_MAJOR%.%WING_VERSION_MINOR% ... -echo _____________________________________________________________________ -echo. - - -IF EXIST "%WINGHOME%\bin\wing.exe" ( - start "" "%WINGHOME%\bin\wing.exe" "%WING_PROJ%" -) ELSE ( - Where wing.exe 2> NUL - IF ERRORLEVEL 1 ( - echo wing.exe could not be found - pause - ) ELSE ( - start "" wing.exe "%WING_PROJ%" - ) -) - -ENDLOCAL - -:: Return to starting directory -POPD - -:END_OF_FILE diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/Project_Env.bat b/Gems/AtomContent/LookDevelopmentStudioPixar/Project_Env.bat deleted file mode 100644 index 74bc374ab8..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/Project_Env.bat +++ /dev/null @@ -1,74 +0,0 @@ -@echo off -:: Sets up environment for Lumberyard DCC tools and code access - -REM -REM All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -REM its licensors. -REM -REM For complete copyright and license terms please see the LICENSE at the root of this -REM distribution (the "License"). All use of this software is governed by the License, -REM or, if provided, by the license below or the license accompanying this file. Do not -REM remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -REM - - -:: Store current dir -%~d0 -cd %~dp0 -PUSHD %~dp0 - -for %%a in (.) do set LY_PROJECT=%%~na - -echo. -echo _____________________________________________________________________ -echo. -echo ~ Setting up LY DSI PROJECT Environment ... -echo _____________________________________________________________________ -echo. - -echo LY_PROJECT = %LY_PROJECT% - -:: Put you project env vars and overrides here - -:: chanhe the relative path up to dev -set DEV_REL_PATH=../../.. -set ABS_PATH=%~dp0 - -:: Override the default maya version -set MAYA_VERSION=2020 -echo MAYA_VERSION = %MAYA_VERSION% - -set LY_PROJECT_PATH=%ABS_PATH% -echo LY_PROJECT_PATH = %LY_PROJECT_PATH% - -:: Change to root Lumberyard dev dir -CD /d %LY_PROJECT_PATH%\%DEV_REL_PATH% -set LY_DEV=%CD% -echo LY_DEV = %LY_DEV% - -CALL %LY_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\Launchers\Windows\Env.bat - -rem :: Constant Vars (Global) -rem SET LYPY_GDEBUG=0 -rem echo LYPY_GDEBUG = %LYPY_GDEBUG% -rem SET LYPY_DEV_MODE=0 -rem echo LYPY_DEV_MODE = %LYPY_DEV_MODE% -rem SET LYPY_DEBUGGER=WING -rem echo LYPY_DEBUGGER = %LYPY_DEBUGGER% - -:: Restore original directory -popd - -:: Change to root dir -CD /D %ABS_PATH% - -:: if the user has set up a custom env call it -IF EXIST "%~dp0User_Env.bat" CALL %~dp0User_Env.bat - -GOTO END_OF_FILE - -:: Return to starting directory -POPD - -:END_OF_FILE diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/gem.json b/Gems/AtomContent/LookDevelopmentStudioPixar/gem.json deleted file mode 100644 index 6481cb2e57..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/gem.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "gem_name": "LookDevelopmentStudioPixar", - "GemFormatVersion": 3, - "Uuid": "fe1e0506204f49a28ab352636ec62dfe", - "Name": "LookDevelopmentStudioPixar", - "DisplayName": "LookDevelopmentStudioPixar", - "Version": "0.1.0", - "LinkType": "NoCode", - "Summary": "This is a Asset Gem that includes a modified version of the Pixar Look Development Studio (public domain, non-licensed.) https:\/\/renderman.pixar.com\/look-development-studio ", - "Tags": ["Asset"], - "IconPath": "preview.png" -} diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/preview.png b/Gems/AtomContent/LookDevelopmentStudioPixar/preview.png deleted file mode 100644 index b6f5875b83..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/preview.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:416751d9b01390dce5951e47e75e9e4e0c4a561424486a41179c230fd2d919b7 -size 30881 diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/workspace.mel b/Gems/AtomContent/LookDevelopmentStudioPixar/workspace.mel deleted file mode 100644 index b43657866d..0000000000 --- a/Gems/AtomContent/LookDevelopmentStudioPixar/workspace.mel +++ /dev/null @@ -1,88 +0,0 @@ -//Maya 2020 Project Definition - -workspace -fr "fluidCache" ""; -workspace -fr "images" "Assets/Textures"; -workspace -fr "JT_ATF" ""; -workspace -fr "offlineEdit" ".maya_data/scenes/edits"; -workspace -fr "STEP_ATF Export" ""; -workspace -fr "furShadowMap" ""; -workspace -fr "SVG" ""; -workspace -fr "scripts" "Maya/Scripts"; -workspace -fr "DAE_FBX" ""; -workspace -fr "shaders" "Maya/Shaders"; -workspace -fr "NX_ATF" ""; -workspace -fr "furFiles" ""; -workspace -fr "CATIAV5_ATF Export" ""; -workspace -fr "OBJ" ".maya_data/obj"; -workspace -fr "PARASOLID_ATF Export" ""; -workspace -fr "FBX export" "Assets/Objects"; -workspace -fr "furEqualMap" ""; -workspace -fr "textures" "Assets/textures"; -workspace -fr "BIF" ""; -workspace -fr "lights" ".maya_data/renderData/shaders"; -workspace -fr "DAE_FBX export" ""; -workspace -fr "aliasWire" ".maya_data/data"; -workspace -fr "CATIAV5_ATF" ""; -workspace -fr "SAT_ATF Export" ""; -workspace -fr "movie" ".maya_data/movies"; -workspace -fr "ASS Export" ""; -workspace -fr "autoSave" ".maya_data/autoSave"; -workspace -fr "move" ".maya_data"; -workspace -fr "mayaAscii" ""; -workspace -fr "NX_ATF Export" ""; -workspace -fr "sound" ".maya_data/sound"; -workspace -fr "mayaBinary" ""; -workspace -fr "timeEditor" ""; -workspace -fr "RIBexport" ".maya_data/data"; -workspace -fr "DWG_ATF" ""; -workspace -fr "mentalray" ".maya_data/renderData/mentalray"; -workspace -fr "JT_ATF Export" ""; -workspace -fr "iprImages" ".maya_data/renderData/iprImages"; -workspace -fr "FBX" "Assets/Objects"; -workspace -fr "renderData" ".maya_data/renderData"; -workspace -fr "CATIAV4_ATF" ""; -workspace -fr "fileCache" ""; -workspace -fr "eps" ""; -workspace -fr "Fbx" "Objects"; -workspace -fr "IGESexport" ".maya_data/data"; -workspace -fr "3dPaintTextures" ".maya_data/3dPaintTextures"; -workspace -fr "translatorData" ""; -workspace -fr "mel" ".maya_data/mel"; -workspace -fr "DXF_ATF Export" ""; -workspace -fr "IGES" ".maya_data/data"; -workspace -fr "particles" ".maya_data/particles"; -workspace -fr "DXFexport" ".maya_data/data"; -workspace -fr "DXF_ATF" ""; -workspace -fr "scene" "Assets/Objects"; -workspace -fr "renderScenes" ".maya_data/renderScenes"; -workspace -fr "SAT_ATF" ""; -workspace -fr "PROE_ATF" ""; -workspace -fr "WIRE_ATF Export" ""; -workspace -fr "sourceImages" "ArtSource/Images"; -workspace -fr "RIB" ".maya_data/data"; -workspace -fr "furImages" ""; -workspace -fr "clips" ".maya_data/clips"; -workspace -fr "Adobe(R) Illustrator(R)" ".maya_data/data"; -workspace -fr "animExport" ".maya_data/data"; -workspace -fr "mentalRay" ".maya_data/mentalRay"; -workspace -fr "STEP_ATF" ""; -workspace -fr "DWG_ATF Export" ""; -workspace -fr "depth" ".maya_data/renderData/depth"; -workspace -fr "sceneAssembly" ""; -workspace -fr "IGES_ATF Export" ""; -workspace -fr "teClipExports" ""; -workspace -fr "IGES_ATF" ""; -workspace -fr "PARASOLID_ATF" ""; -workspace -fr "ASS" ""; -workspace -fr "Substance" ".maya_data/data"; -workspace -fr "audio" ".maya_data/sound"; -workspace -fr "EPS" ".maya_data/data"; -workspace -fr "Alembic" "Assets/Objects"; -workspace -fr "diskCache" ".maya_data/cache"; -workspace -fr "illustrator" ""; -workspace -fr "WIRE_ATF" ""; -workspace -fr "templates" "ArtSource/SceneTemplates"; -workspace -fr "animImport" ".maya_data/data"; -workspace -fr "OBJexport" "Assets/Objects"; -workspace -fr "furAttrMap" ""; -workspace -fr "DXF" ".maya_data/data"; diff --git a/Gems/AtomContent/ReferenceMaterials/CMakeLists.txt b/Gems/AtomContent/ReferenceMaterials/CMakeLists.txt new file mode 100644 index 0000000000..9afc5af5a7 --- /dev/null +++ b/Gems/AtomContent/ReferenceMaterials/CMakeLists.txt @@ -0,0 +1,15 @@ +# +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# + +# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME AtomContent_ReferenceMaterials.Builders NAMESPACE Gem) +endif() diff --git a/Gems/AtomContent/Sponza/CMakeLists.txt b/Gems/AtomContent/Sponza/CMakeLists.txt new file mode 100644 index 0000000000..df672f31f3 --- /dev/null +++ b/Gems/AtomContent/Sponza/CMakeLists.txt @@ -0,0 +1,15 @@ +# +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# + +# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME AtomContent_Sponza.Builders NAMESPACE Gem) +endif() diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/brass_bake.spp b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/brass_bake.spp deleted file mode 100644 index 0252c59ba2..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/brass_bake.spp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb8c1839f46df4623818bc1b02f626d85d8f83d77cbeabd0d56c6a5c997c3ab3 -size 495250984 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/low_Default_BaseColor.png b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/low_Default_BaseColor.png deleted file mode 100644 index 7cbf4b4c23..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/low_Default_BaseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9bb547a502aa028624e3f95491d2e459860db5fdc5551eece757c271362c902d -size 42981863 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/low_Default_Metallic.png b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/low_Default_Metallic.png deleted file mode 100644 index 93d17390aa..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/low_Default_Metallic.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:962248929564f7a3a2a25813ba8ab83d72f2f4d8db71eb495bd650ad4eca5c25 -size 8681159 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/low_Default_Roughness.png b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/low_Default_Roughness.png deleted file mode 100644 index 2d971c65ed..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/Brass/low_Default_Roughness.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c5998edda6eb34ace8b7a5f63e72f922e0daebb6aeb453142b31e605157736d -size 17366289 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/bake_channels.psd b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/bake_channels.psd deleted file mode 100644 index bfa8911b3f..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/bake_channels.psd +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a79b82df3f6f908b2ed31f9247d9befde7daf0ff53c87479920c0463cc12d437 -size 1308624196 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/high.fbx b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/high.fbx deleted file mode 100644 index fc13f2345c..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/high.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b9892d5de71db58217f9c942f542c058891ab2f0949443c48111aa71fe621cae -size 128078160 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/low.fbx b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/low.fbx deleted file mode 100644 index a72ddaec16..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/low.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:353ff22364447796ec01799a16e6ee39fbcde337a5fee4de409069316eccbb8f -size 6942256 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/marmoset_bake.tbscene b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/marmoset_bake.tbscene deleted file mode 100644 index 1b7605ff10..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/marmoset_bake.tbscene +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e934a8772f33e6c7bc11e70071c5d14147d01d123a5bed3bd51fc861047f17cb -size 305364828 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/stone/low_Default_BaseColor.png b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/stone/low_Default_BaseColor.png deleted file mode 100644 index c880cef561..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/stone/low_Default_BaseColor.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:247402172cb0539faaae937659507bd72087e629004e3eb2e8f67df97063a92f -size 70531613 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/stone/stone_bake.spp b/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/stone/stone_bake.spp deleted file mode 100644 index a8249fbc6b..0000000000 --- a/Gems/AtomLyIntegration/CommonFeatures/Assets/Objects/Lucy/.wip/stone/stone_bake.spp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa4f9fbb9fc332fa0fb3f35df3b21ef72439073a854ad55d637efbed89ad3b3c -size 562609478 diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp index 69bec21a6c..992b6319d8 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp @@ -112,13 +112,13 @@ namespace AZ ->DataElement(Edit::UIHandlers::Default, &AreaLightComponentConfig::m_enableShutters, "Enable shutters", "Restrict the light to a specific beam angle depending on shape.") ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::ShuttersMustBeEnabled) ->DataElement(Edit::UIHandlers::Slider, &AreaLightComponentConfig::m_innerShutterAngleDegrees, "Inner angle", "The inner angle of the shutters where the light beam begins to be occluded.") - ->Attribute(Edit::Attributes::Min, 0.0f) - ->Attribute(Edit::Attributes::Max, 180.0f) + ->Attribute(Edit::Attributes::Min, 0.5f) + ->Attribute(Edit::Attributes::Max, 90.0f) ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShutters) ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::ShuttersDisabled) ->DataElement(Edit::UIHandlers::Slider, &AreaLightComponentConfig::m_outerShutterAngleDegrees, "Outer angle", "The outer angle of the shutters where the light beam is completely occluded.") - ->Attribute(Edit::Attributes::Min, 0.0f) - ->Attribute(Edit::Attributes::Max, 180.0f) + ->Attribute(Edit::Attributes::Min, 0.5f) + ->Attribute(Edit::Attributes::Max, 90.0f) ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShutters) ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::ShuttersDisabled) diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp index 9f68a7d12c..1c4657d8df 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/ActorAsset.cpp @@ -311,7 +311,8 @@ namespace AZ Data::Asset modelAsset = actor->GetMeshAsset(); if (!modelAsset.IsReady()) { - AZ_Error("CreateSkinnedMeshInputFromActor", false, "Attempting to create skinned mesh input buffers for an actor that doesn't have a loaded model."); + AZ_Warning("CreateSkinnedMeshInputFromActor", false, "Check if the actor has a mesh added. Right click the source file in the asset browser, click edit settings, " + "and navigate to the Meshes tab. Add a mesh if it's missing."); return nullptr; } diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp index 532c8720b5..18a21c93a6 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp @@ -456,9 +456,8 @@ namespace AZ void AtomActorInstance::Create() { Destroy(); - m_skinnedMeshInputBuffers = GetRenderActor()->FindOrCreateSkinnedMeshInputBuffers(); - AZ_Error("AtomActorInstance", m_skinnedMeshInputBuffers, "Failed to get SkinnedMeshInputBuffers from Actor."); + AZ_Warning("AtomActorInstance", m_skinnedMeshInputBuffers, "Failed to create SkinnedMeshInputBuffers from Actor. It is likely that this actor doesn't have any meshes"); if (m_skinnedMeshInputBuffers) { m_boneTransforms = CreateBoneTransformBufferFromActorInstance(m_actorInstance, GetSkinningMethod()); diff --git a/Gems/Blast/Code/Source/Editor/EditorBlastFamilyComponent.cpp b/Gems/Blast/Code/Source/Editor/EditorBlastFamilyComponent.cpp index 873ef7248d..0133690cea 100644 --- a/Gems/Blast/Code/Source/Editor/EditorBlastFamilyComponent.cpp +++ b/Gems/Blast/Code/Source/Editor/EditorBlastFamilyComponent.cpp @@ -44,7 +44,7 @@ namespace Blast ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c)) ->Attribute( AZ::Edit::Attributes::HelpPageURL, - "https://docs.aws.amazon.com/lumberyard/latest/userguide/component-blast-actor.html") + "https://docs.o3de.org/docs/user-guide/components/reference/blast-family/") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement( AZ::Edit::UIHandlers::Default, &EditorBlastFamilyComponent::m_blastAsset, "Blast asset", diff --git a/Gems/Blast/Code/Source/Editor/EditorBlastMeshDataComponent.cpp b/Gems/Blast/Code/Source/Editor/EditorBlastMeshDataComponent.cpp index 77788b6aee..4a6f41331b 100644 --- a/Gems/Blast/Code/Source/Editor/EditorBlastMeshDataComponent.cpp +++ b/Gems/Blast/Code/Source/Editor/EditorBlastMeshDataComponent.cpp @@ -67,7 +67,7 @@ namespace Blast ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c)) ->Attribute( AZ::Edit::Attributes::HelpPageURL, - "https://docs.aws.amazon.com/lumberyard/latest/userguide/component-blast-actor.html") + "https://docs.o3de.org/docs/user-guide/components/reference/blast-family-mesh-data/") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement( AZ::Edit::UIHandlers::CheckBox, &EditorBlastMeshDataComponent::m_showMeshAssets, diff --git a/Gems/DevTextures/CMakeLists.txt b/Gems/DevTextures/CMakeLists.txt index 4d5680a30d..6ec5ba947c 100644 --- a/Gems/DevTextures/CMakeLists.txt +++ b/Gems/DevTextures/CMakeLists.txt @@ -8,3 +8,8 @@ # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # + +# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME DevTextures.Builders NAMESPACE Gem) +endif() diff --git a/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp b/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp index 5c085e96f7..039815fa44 100644 --- a/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp +++ b/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp @@ -459,8 +459,7 @@ namespace EMotionFX void EditorActorComponent::OnAssetReady(AZ::Data::Asset asset) { m_actorAsset = asset; - Actor* actor = m_actorAsset->GetActor(); - AZ_Assert(m_actorAsset.IsReady() && actor, "Actor asset should be loaded and actor valid."); + AZ_Assert(m_actorAsset.IsReady() && m_actorAsset->GetActor(), "Actor asset should be loaded and actor valid."); CheckActorCreation(); } diff --git a/Gems/NvCloth/Code/Source/Components/EditorClothComponent.cpp b/Gems/NvCloth/Code/Source/Components/EditorClothComponent.cpp index 7da677a7eb..7eb07f46d7 100644 --- a/Gems/NvCloth/Code/Source/Components/EditorClothComponent.cpp +++ b/Gems/NvCloth/Code/Source/Components/EditorClothComponent.cpp @@ -52,7 +52,7 @@ namespace NvCloth ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/Cloth.svg") ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Cloth.svg") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c)) - ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://docs.aws.amazon.com/lumberyard/latest/userguide/component-cloth.html") + ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://docs.o3de.org/docs/user-guide/components/reference/cloth/") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->UIElement(AZ::Edit::UIHandlers::CheckBox, "Simulate in editor", diff --git a/Gems/PBSreferenceMaterials/CMakeLists.txt b/Gems/PBSreferenceMaterials/CMakeLists.txt index 4d5680a30d..ae5b2229e5 100644 --- a/Gems/PBSreferenceMaterials/CMakeLists.txt +++ b/Gems/PBSreferenceMaterials/CMakeLists.txt @@ -8,3 +8,8 @@ # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # + +# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME PBSreferenceMaterials.Builders NAMESPACE Gem) +endif() diff --git a/Gems/PhysX/Code/Source/EditorColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorColliderComponent.cpp index 0671e3e77e..3cb931d148 100644 --- a/Gems/PhysX/Code/Source/EditorColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorColliderComponent.cpp @@ -194,7 +194,7 @@ namespace PhysX ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/PhysXCollider.svg") ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/PhysXCollider.svg") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c)) - ->Attribute(AZ::Edit::Attributes::HelpPageURL, "http://docs.aws.amazon.com/console/lumberyard/component/physx/collider") + ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://docs.o3de.org/docs/user-guide/components/reference/physx-collider/") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement(AZ::Edit::UIHandlers::Default, &EditorColliderComponent::m_configuration, "Collider Configuration", "Configuration of the collider") ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) diff --git a/Gems/PhysX/Code/Source/EditorForceRegionComponent.cpp b/Gems/PhysX/Code/Source/EditorForceRegionComponent.cpp index 770200cda0..b783ea3185 100644 --- a/Gems/PhysX/Code/Source/EditorForceRegionComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorForceRegionComponent.cpp @@ -176,7 +176,7 @@ namespace PhysX ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/ForceRegion.png") ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/ForceRegion.png") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c)) - ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://docs.aws.amazon.com/console/lumberyard/physx/force-region") + ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://docs.o3de.org/docs/user-guide/components/reference/physx-force-region/") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->Attribute(AZ::Edit::Attributes::RequiredService, AZ_CRC("PhysXTriggerService", 0x3a117d7b)) ->DataElement(AZ::Edit::UIHandlers::Default, &EditorForceRegionComponent::m_visibleInEditor, "Visible", "Always show the component in viewport") diff --git a/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp b/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp index f68c4d17d8..588b1d918f 100644 --- a/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp @@ -309,7 +309,7 @@ namespace PhysX ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/PhysXRigidBody.svg") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c)) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) - ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://docs.aws.amazon.com/console/lumberyard/components/physx/rigid-body") + ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://docs.o3de.org/docs/user-guide/components/reference/physx-rigid-body-physics/") ->DataElement(0, &EditorRigidBodyComponent::m_config, "Configuration", "Configuration for rigid body physics.") ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorRigidBodyComponent::CreateEditorWorldRigidBody) diff --git a/Gems/PhysXSamples/CMakeLists.txt b/Gems/PhysXSamples/CMakeLists.txt index 4d5680a30d..7ace40940b 100644 --- a/Gems/PhysXSamples/CMakeLists.txt +++ b/Gems/PhysXSamples/CMakeLists.txt @@ -8,3 +8,8 @@ # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # + +# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME PhysXSamples.Builders NAMESPACE Gem) +endif() diff --git a/Gems/PhysicsEntities/CMakeLists.txt b/Gems/PhysicsEntities/CMakeLists.txt index 4d5680a30d..6ec2f6f374 100644 --- a/Gems/PhysicsEntities/CMakeLists.txt +++ b/Gems/PhysicsEntities/CMakeLists.txt @@ -8,3 +8,8 @@ # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # + +# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME PhysicsEntities.Builders NAMESPACE Gem) +endif() diff --git a/Gems/PrimitiveAssets/CMakeLists.txt b/Gems/PrimitiveAssets/CMakeLists.txt index 4d5680a30d..72d532ec9b 100644 --- a/Gems/PrimitiveAssets/CMakeLists.txt +++ b/Gems/PrimitiveAssets/CMakeLists.txt @@ -8,3 +8,9 @@ # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # + +# Add the PrimitiveAssets Asset-only gem as a Builder variant +# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME PrimitiveAssets.Builders NAMESPACE Gem) +endif() diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp index a5c0287cfd..94f0dd974e 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp @@ -475,6 +475,11 @@ namespace continue; } + if (auto excludeFromPointer = AZ::FindAttribute(AZ::ScriptCanvasAttributes::Internal::ImplementedAsNodeGeneric, behaviorClass->m_attributes)) + { + continue; + } + if (auto excludeFromPointer = AZ::FindAttribute(AZ::Script::Attributes::ExcludeFrom, behaviorClass->m_attributes)) { AZ::Script::Attributes::ExcludeFlags excludeFlags{}; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/mainwindow.ui b/Gems/ScriptCanvas/Code/Editor/View/Windows/mainwindow.ui index 3b3043a4a0..c055f9f3ca 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/mainwindow.ui +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/mainwindow.ui @@ -133,12 +133,12 @@ - + &Preferences diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp index bc07d16a7e..356ee22ba3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp @@ -3764,6 +3764,12 @@ namespace ScriptCanvas nextSlot = onceResetSlot; } + if (!nextSlot) + { + AddError(ID.m_node->GetEntityId(), once, "Once node missing next slot, likely needs replacement"); + return; + } + ParseExecutionTreeBody(nextParse, *nextSlot); nextParse->MarkDebugEmptyStatement(); } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingUtilities.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingUtilities.cpp index 131209a521..0c92876e2c 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingUtilities.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingUtilities.cpp @@ -928,6 +928,7 @@ namespace ScriptCanvas { return execution->GetId().m_node && IsOnce(*execution->GetId().m_node) + && execution->GetId().m_slot && execution->GetId().m_slot->GetType() == CombinedSlotType::ExecutionIn; } @@ -938,7 +939,7 @@ namespace ScriptCanvas bool IsOnceReset(const Node& node, const Slot* slot) { - return slot = OnceProperty::GetResetSlot(&node); + return slot == OnceProperty::GetResetSlot(&node); } bool IsOperatorArithmetic(const ExecutionTreeConstPtr& execution) diff --git a/Gems/UiBasics/CMakeLists.txt b/Gems/UiBasics/CMakeLists.txt index 4d5680a30d..91b24308b0 100644 --- a/Gems/UiBasics/CMakeLists.txt +++ b/Gems/UiBasics/CMakeLists.txt @@ -8,3 +8,8 @@ # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # + +# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME UiBasics.Builders NAMESPACE Gem) +endif() diff --git a/Gems/Vegetation_Gem_Assets/CMakeLists.txt b/Gems/Vegetation_Gem_Assets/CMakeLists.txt index 4d5680a30d..a410a242c7 100644 --- a/Gems/Vegetation_Gem_Assets/CMakeLists.txt +++ b/Gems/Vegetation_Gem_Assets/CMakeLists.txt @@ -8,3 +8,8 @@ # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # + +# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME Vegetation_Gem_Assets.Builders NAMESPACE Gem) +endif() diff --git a/Registry/setregbuilder.assetprocessor.setreg b/Registry/setregbuilder.assetprocessor.setreg index 4be46a9d51..5dc6f42446 100644 --- a/Registry/setregbuilder.assetprocessor.setreg +++ b/Registry/setregbuilder.assetprocessor.setreg @@ -22,7 +22,8 @@ // members or entries will be recursively ignored as well. "Excludes": [ - "/Amazon/AzCore/Runtime" + "/Amazon/AzCore/Runtime", + "/Amazon/AzCore/Bootstrap/project_path" ] } } diff --git a/Templates/AssetGem/Template/CMakeLists.txt b/Templates/AssetGem/Template/CMakeLists.txt new file mode 100644 index 0000000000..a220cce911 --- /dev/null +++ b/Templates/AssetGem/Template/CMakeLists.txt @@ -0,0 +1,18 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +# This will export the path to the directory containing the gem.json +# to the "SourcePaths" entry within the "cmake_dependencies..assetbuilder.setreg" +# which is generated when cmake is run +# This path is the gem root directory +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_create_alias(NAME ${Name}.Builders NAMESPACE Gem) +endif() diff --git a/Templates/AssetGem/Template/gem.json b/Templates/AssetGem/Template/gem.json new file mode 100644 index 0000000000..5b8fb3fde0 --- /dev/null +++ b/Templates/AssetGem/Template/gem.json @@ -0,0 +1,14 @@ +{ + "gem_name": "${Name}", + "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "display_name": "${Name}", + "summary": "A short description of ${Name}.", + "canonical_tags": [ + "Gem" + ], + "user_tags": [ + "${Name}" + ], + "icon_path": "preview.png" +} diff --git a/Templates/AssetGem/Template/preview.png b/Templates/AssetGem/Template/preview.png new file mode 100644 index 0000000000..2f1ed47754 --- /dev/null +++ b/Templates/AssetGem/Template/preview.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d6204c6730e5675791765ca194e9b1cbec282208e280507de830afc2805e5fa +size 41127 diff --git a/Templates/AssetGem/template.json b/Templates/AssetGem/template.json new file mode 100644 index 0000000000..e858dc526d --- /dev/null +++ b/Templates/AssetGem/template.json @@ -0,0 +1,38 @@ +{ + "template_name": "AssetGem", + "origin": "The primary repo for AssetGem goes here: i.e. http://www.mydomain.com", + "license": "What license AssetGem uses goes here: i.e. https://opensource.org/licenses/MIT", + "display_name": "AssetGem", + "summary": "A short description of AssetGem template.", + "canonical_tags": [], + "user_tags": [ + "AssetGem" + ], + "icon_path": "preview.png", + "copyFiles": [ + { + "file": "CMakeLists.txt", + "origin": "CMakeLists.txt", + "isTemplated": true, + "isOptional": false + }, + { + "file": "gem.json", + "origin": "gem.json", + "isTemplated": true, + "isOptional": false + }, + { + "file": "preview.png", + "origin": "preview.png", + "isTemplated": false, + "isOptional": false + } + ], + "createDirectories": [ + { + "dir": "Assets", + "origin": "Assets" + } + ] +} diff --git a/Templates/DefaultGem/Template/Code/${NameLower}_editor_shared_files.cmake b/Templates/DefaultGem/Template/Code/${NameLower}_editor_shared_files.cmake index 6b9ddc02aa..415c25bfa1 100644 --- a/Templates/DefaultGem/Template/Code/${NameLower}_editor_shared_files.cmake +++ b/Templates/DefaultGem/Template/Code/${NameLower}_editor_shared_files.cmake @@ -10,5 +10,5 @@ # {END_LICENSE} set(FILES - Source/${Name}Module.cpp + Source/${Name}EditorModule.cpp ) diff --git a/Templates/DefaultGem/Template/Code/${NameLower}_files.cmake b/Templates/DefaultGem/Template/Code/${NameLower}_files.cmake index 0aec97f7cb..b61972a3f5 100644 --- a/Templates/DefaultGem/Template/Code/${NameLower}_files.cmake +++ b/Templates/DefaultGem/Template/Code/${NameLower}_files.cmake @@ -10,6 +10,8 @@ # {END_LICENSE} set(FILES + Include/${Name}/${Name}Bus.h + Source/${Name}ModuleInterface.h Source/${Name}SystemComponent.cpp Source/${Name}SystemComponent.h ) diff --git a/Templates/DefaultGem/Template/Code/Include/${Name}/${Name}Bus.h b/Templates/DefaultGem/Template/Code/Include/${Name}/${Name}Bus.h index 32f34e309e..672e329db4 100644 --- a/Templates/DefaultGem/Template/Code/Include/${Name}/${Name}Bus.h +++ b/Templates/DefaultGem/Template/Code/Include/${Name}/${Name}Bus.h @@ -22,7 +22,7 @@ namespace ${SanitizedCppName} class ${SanitizedCppName}Requests { public: - AZ_RTTI(${SanitizedCppName}Requests, "${Random_Uuid}"); + AZ_RTTI(${SanitizedCppName}Requests, "{${Random_Uuid}}"); virtual ~${SanitizedCppName}Requests() = default; // Put your public methods here }; diff --git a/Templates/DefaultGem/Template/Code/Source/${Name}EditorModule.cpp b/Templates/DefaultGem/Template/Code/Source/${Name}EditorModule.cpp new file mode 100644 index 0000000000..d548e23162 --- /dev/null +++ b/Templates/DefaultGem/Template/Code/Source/${Name}EditorModule.cpp @@ -0,0 +1,51 @@ +// {BEGIN_LICENSE} +/* + * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or + * its licensors. + * + * For complete copyright and license terms please see the LICENSE at the root of this + * distribution (the "License"). All use of this software is governed by the License, + * or, if provided, by the license below or the license accompanying this file. Do not + * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + */ +// {END_LICENSE} + +#include <${Name}ModuleInterface.h> +#include <${Name}EditorSystemComponent.h> + +namespace ${SanitizedCppName} +{ + class ${SanitizedCppName}EditorModule + : public ${SanitizedCppName}ModuleInterface + { + public: + AZ_RTTI(${SanitizedCppName}EditorModule, "${ModuleClassId}", ${SanitizedCppName}ModuleInterface); + AZ_CLASS_ALLOCATOR(${SanitizedCppName}EditorModule, AZ::SystemAllocator, 0); + + ${SanitizedCppName}EditorModule() + { + // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here. + // Add ALL components descriptors associated with this gem to m_descriptors. + // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext. + // This happens through the [MyComponent]::Reflect() function. + m_descriptors.insert(m_descriptors.end(), { + ${SanitizedCppName}EditorSystemComponent::CreateDescriptor(), + }); + } + + /** + * Add required SystemComponents to the SystemEntity. + * Non-SystemComponents should not be added here + */ + AZ::ComponentTypeList GetRequiredSystemComponents() const override + { + return AZ::ComponentTypeList { + azrtti_typeid<${SanitizedCppName}EditorSystemComponent>(), + }; + } + }; +}// namespace ${SanitizedCppName} + +AZ_DECLARE_MODULE_CLASS(Gem_${SanitizedCppName}, ${SanitizedCppName}::${SanitizedCppName}EditorModule) diff --git a/Templates/DefaultGem/Template/Code/Source/${Name}EditorSystemComponent.cpp b/Templates/DefaultGem/Template/Code/Source/${Name}EditorSystemComponent.cpp index fedc37da6b..3cb9551766 100644 --- a/Templates/DefaultGem/Template/Code/Source/${Name}EditorSystemComponent.cpp +++ b/Templates/DefaultGem/Template/Code/Source/${Name}EditorSystemComponent.cpp @@ -21,34 +21,47 @@ namespace ${SanitizedCppName} { if (auto serializeContext = azrtti_cast(context)) { - serializeContext->Class<${SanitizedCppName}EditorSystemComponent, AZ::Component>()->Version(1); + serializeContext->Class<${SanitizedCppName}EditorSystemComponent, ${SanitizedCppName}SystemComponent>() + ->Version(0); } } - ${SanitizedCppName}EditorSystemComponent::${SanitizedCppName}EditorSystemComponent() + ${SanitizedCppName}EditorSystemComponent::${SanitizedCppName}EditorSystemComponent() = default; + + ${SanitizedCppName}EditorSystemComponent::~${SanitizedCppName}EditorSystemComponent() = default; + + void ${SanitizedCppName}EditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { - if (${SanitizedCppName}Interface::Get() == nullptr) - { - ${SanitizedCppName}Interface::Register(this); - } + BaseSystemComponent::GetProvidedServices(provided); + provided.push_back(AZ_CRC_CE("${SanitizedCppName}EditorService")); } - ${SanitizedCppName}EditorSystemComponent::~${SanitizedCppName}EditorSystemComponent() + void ${SanitizedCppName}EditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) { - if (${SanitizedCppName}Interface::Get() == this) - { - ${SanitizedCppName}Interface::Unregister(this); - } + BaseSystemComponent::GetIncompatibleServices(incompatible); + incompatible.push_back(AZ_CRC_CE("${SanitizedCppName}EditorService")); + } + + void ${SanitizedCppName}EditorSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) + { + BaseSystemComponent::GetRequiredServices(required); + } + + void ${SanitizedCppName}EditorSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) + { + BaseSystemComponent::GetDependentServices(dependent); } void ${SanitizedCppName}EditorSystemComponent::Activate() { + ${SanitizedCppName}SystemComponent::Activate(); AzToolsFramework::EditorEvents::Bus::Handler::BusConnect(); } void ${SanitizedCppName}EditorSystemComponent::Deactivate() { AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect(); + ${SanitizedCppName}SystemComponent::Deactivate(); } } // namespace ${SanitizedCppName} diff --git a/Templates/DefaultGem/Template/Code/Source/${Name}EditorSystemComponent.h b/Templates/DefaultGem/Template/Code/Source/${Name}EditorSystemComponent.h index ef7b0a2f2e..8e9a64946f 100644 --- a/Templates/DefaultGem/Template/Code/Source/${Name}EditorSystemComponent.h +++ b/Templates/DefaultGem/Template/Code/Source/${Name}EditorSystemComponent.h @@ -14,7 +14,7 @@ #pragma once -#include +#include <${Name}SystemComponent.h> #include @@ -22,26 +22,22 @@ namespace ${SanitizedCppName} { /// System component for ${SanitizedCppName} editor class ${SanitizedCppName}EditorSystemComponent - : public AZ::Component + : public ${SanitizedCppName}SystemComponent , private AzToolsFramework::EditorEvents::Bus::Handler { + using BaseSystemComponent = ${SanitizedCppName}SystemComponent; public: - AZ_COMPONENT(${SanitizedCppName}EditorSystemComponent, "${EditorSysCompClassId}"); + AZ_COMPONENT(${SanitizedCppName}EditorSystemComponent, "${EditorSysCompClassId}", BaseSystemComponent); static void Reflect(AZ::ReflectContext* context); ${SanitizedCppName}EditorSystemComponent(); ~${SanitizedCppName}EditorSystemComponent(); private: - static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC("${SanitizedCppName}EditorService")); - } - - static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) - { - required.push_back(AZ_CRC("${SanitizedCppName}Service")); - } + static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); + static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible); + static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); + static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent); // AZ::Component void Activate() override; diff --git a/Templates/DefaultGem/Template/Code/Source/${Name}Module.cpp b/Templates/DefaultGem/Template/Code/Source/${Name}Module.cpp index ca4a724f49..d7aa991395 100644 --- a/Templates/DefaultGem/Template/Code/Source/${Name}Module.cpp +++ b/Templates/DefaultGem/Template/Code/Source/${Name}Module.cpp @@ -12,38 +12,18 @@ */ // {END_LICENSE} -#include -#include +#include <${Name}ModuleInterface.h> #include <${Name}SystemComponent.h> namespace ${SanitizedCppName} { class ${SanitizedCppName}Module - : public AZ::Module + : public ${SanitizedCppName}ModuleInterface { public: - AZ_RTTI(${SanitizedCppName}Module, "${ModuleClassId}", AZ::Module); + AZ_RTTI(${SanitizedCppName}Module, "${ModuleClassId}", ${SanitizedCppName}ModuleInterface); AZ_CLASS_ALLOCATOR(${SanitizedCppName}Module, AZ::SystemAllocator, 0); - - ${SanitizedCppName}Module() - : AZ::Module() - { - // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here. - m_descriptors.insert(m_descriptors.end(), { - ${SanitizedCppName}SystemComponent::CreateDescriptor(), - }); - } - - /** - * Add required SystemComponents to the SystemEntity. - */ - AZ::ComponentTypeList GetRequiredSystemComponents() const override - { - return AZ::ComponentTypeList { - azrtti_typeid<${SanitizedCppName}SystemComponent>(), - }; - } }; }// namespace ${SanitizedCppName} diff --git a/Templates/DefaultGem/Template/Code/Source/${Name}ModuleInterface.h b/Templates/DefaultGem/Template/Code/Source/${Name}ModuleInterface.h new file mode 100644 index 0000000000..e2c96a4728 --- /dev/null +++ b/Templates/DefaultGem/Template/Code/Source/${Name}ModuleInterface.h @@ -0,0 +1,49 @@ +// {BEGIN_LICENSE} +/* + * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or + * its licensors. + * + * For complete copyright and license terms please see the LICENSE at the root of this + * distribution (the "License"). All use of this software is governed by the License, + * or, if provided, by the license below or the license accompanying this file. Do not + * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + */ +// {END_LICENSE} + +#include +#include +#include <${Name}SystemComponent.h> + +namespace ${SanitizedCppName} +{ + class ${SanitizedCppName}ModuleInterface + : public AZ::Module + { + public: + AZ_RTTI(${SanitizedCppName}ModuleInterface, "{${Random_Uuid}}", AZ::Module); + AZ_CLASS_ALLOCATOR(${SanitizedCppName}ModuleInterface, AZ::SystemAllocator, 0); + + ${SanitizedCppName}ModuleInterface() + { + // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here. + // Add ALL components descriptors associated with this gem to m_descriptors. + // This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and EditContext. + // This happens through the [MyComponent]::Reflect() function. + m_descriptors.insert(m_descriptors.end(), { + ${SanitizedCppName}SystemComponent::CreateDescriptor(), + }); + } + + /** + * Add required SystemComponents to the SystemEntity. + */ + AZ::ComponentTypeList GetRequiredSystemComponents() const override + { + return AZ::ComponentTypeList{ + azrtti_typeid<${SanitizedCppName}SystemComponent>(), + }; + } + }; +}// namespace ${SanitizedCppName} diff --git a/Templates/DefaultGem/Template/Code/Source/${Name}SystemComponent.cpp b/Templates/DefaultGem/Template/Code/Source/${Name}SystemComponent.cpp index 8f7eabf74e..17aa437151 100644 --- a/Templates/DefaultGem/Template/Code/Source/${Name}SystemComponent.cpp +++ b/Templates/DefaultGem/Template/Code/Source/${Name}SystemComponent.cpp @@ -41,22 +41,20 @@ namespace ${SanitizedCppName} void ${SanitizedCppName}SystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { - provided.push_back(AZ_CRC("${SanitizedCppName}Service")); + provided.push_back(AZ_CRC_CE("${SanitizedCppName}Service")); } void ${SanitizedCppName}SystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) { - incompatible.push_back(AZ_CRC("${SanitizedCppName}Service")); + incompatible.push_back(AZ_CRC_CE("${SanitizedCppName}Service")); } - void ${SanitizedCppName}SystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) + void ${SanitizedCppName}SystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) { - AZ_UNUSED(required); } - void ${SanitizedCppName}SystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) + void ${SanitizedCppName}SystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) { - AZ_UNUSED(dependent); } ${SanitizedCppName}SystemComponent::${SanitizedCppName}SystemComponent() @@ -91,9 +89,8 @@ namespace ${SanitizedCppName} ${SanitizedCppName}RequestBus::Handler::BusDisconnect(); } - void ${SanitizedCppName}SystemComponent::OnTick(float /*deltaTime*/, AZ::ScriptTimePoint /*time*/) + void ${SanitizedCppName}SystemComponent::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) { - } } // namespace ${SanitizedCppName} diff --git a/Templates/DefaultGem/Template/Code/Tests/${Name}EditorTest.cpp b/Templates/DefaultGem/Template/Code/Tests/${Name}EditorTest.cpp index 9b36a3aadb..f998ba88e0 100644 --- a/Templates/DefaultGem/Template/Code/Tests/${Name}EditorTest.cpp +++ b/Templates/DefaultGem/Template/Code/Tests/${Name}EditorTest.cpp @@ -14,24 +14,4 @@ #include -class ${SanitizedCppName}EditorTest - : public ::testing::Test -{ -protected: - void SetUp() override - { - - } - - void TearDown() override - { - - } -}; - -TEST_F(${SanitizedCppName}EditorTest, SanityTest) -{ - ASSERT_TRUE(true); -} - AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV); diff --git a/Templates/DefaultGem/Template/Code/Tests/${Name}Test.cpp b/Templates/DefaultGem/Template/Code/Tests/${Name}Test.cpp index bee38fa9d7..f998ba88e0 100644 --- a/Templates/DefaultGem/Template/Code/Tests/${Name}Test.cpp +++ b/Templates/DefaultGem/Template/Code/Tests/${Name}Test.cpp @@ -14,24 +14,4 @@ #include -class ${SanitizedCppName}Test - : public ::testing::Test -{ -protected: - void SetUp() override - { - - } - - void TearDown() override - { - - } -}; - -TEST_F(${SanitizedCppName}Test, SanityTest) -{ - ASSERT_TRUE(true); -} - AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV); diff --git a/Templates/DefaultGem/template.json b/Templates/DefaultGem/template.json index b653718095..e24632d6a0 100644 --- a/Templates/DefaultGem/template.json +++ b/Templates/DefaultGem/template.json @@ -156,6 +156,12 @@ "isTemplated": true, "isOptional": false }, + { + "file": "Code/Source/${Name}EditorModule.cpp", + "origin": "Code/Source/${Name}EditorModule.cpp", + "isTemplated": true, + "isOptional": false + }, { "file": "Code/Source/${Name}EditorSystemComponent.cpp", "origin": "Code/Source/${Name}EditorSystemComponent.cpp", @@ -174,6 +180,12 @@ "isTemplated": true, "isOptional": false }, + { + "file": "Code/Source/${Name}ModuleInterface.h", + "origin": "Code/Source/${Name}ModuleInterface.h", + "isTemplated": true, + "isOptional": false + }, { "file": "Code/Source/${Name}SystemComponent.cpp", "origin": "Code/Source/${Name}SystemComponent.cpp", diff --git a/Templates/DefaultProject/Template/Code/Source/${Name}SystemComponent.cpp b/Templates/DefaultProject/Template/Code/Source/${Name}SystemComponent.cpp index ed0a47d6db..051ad41b2f 100644 --- a/Templates/DefaultProject/Template/Code/Source/${Name}SystemComponent.cpp +++ b/Templates/DefaultProject/Template/Code/Source/${Name}SystemComponent.cpp @@ -49,14 +49,12 @@ namespace ${SanitizedCppName} incompatible.push_back(AZ_CRC("${SanitizedCppName}Service")); } - void ${SanitizedCppName}SystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) + void ${SanitizedCppName}SystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required) { - AZ_UNUSED(required); } - void ${SanitizedCppName}SystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) + void ${SanitizedCppName}SystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) { - AZ_UNUSED(dependent); } ${SanitizedCppName}SystemComponent::${SanitizedCppName}SystemComponent() diff --git a/Templates/DefaultProject/Template/Code/enabled_gems.cmake b/Templates/DefaultProject/Template/Code/enabled_gems.cmake index ec45be0743..19d1849a4c 100644 --- a/Templates/DefaultProject/Template/Code/enabled_gems.cmake +++ b/Templates/DefaultProject/Template/Code/enabled_gems.cmake @@ -12,17 +12,22 @@ set(ENABLED_GEMS ${Name} Atom_AtomBridge - Camera + AudioSystem + AWSCore CameraFramework + DebugDraw EditorPythonBindings EMotionFX - GradientSignal + GameState ImGui - LmbrCentral + LandscapeCanvas LyShine - Maestro - NvCloth - SceneProcessing + Multiplayer + PhysX + SaveData + ScriptCanvasPhysics + ScriptEvents + StartingPointInput TextureAtlas WhiteBox ) diff --git a/Templates/DefaultProject/Template/EngineFinder.cmake b/Templates/DefaultProject/Template/EngineFinder.cmake index fbbe3d8cfe..cac0f6215c 100644 --- a/Templates/DefaultProject/Template/EngineFinder.cmake +++ b/Templates/DefaultProject/Template/EngineFinder.cmake @@ -1,3 +1,4 @@ +# {BEGIN_LICENSE} # # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or # its licensors. @@ -8,6 +9,7 @@ # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# {END_LICENSE} # This file is copied during engine registration. Edits to this file will be lost next # time a registration happens. diff --git a/Templates/DefaultProject/Template/Registry/assets_scan_folders.setreg b/Templates/DefaultProject/Template/Registry/assets_scan_folders.setreg index 3da517eb83..a42f65efb4 100644 --- a/Templates/DefaultProject/Template/Registry/assets_scan_folders.setreg +++ b/Templates/DefaultProject/Template/Registry/assets_scan_folders.setreg @@ -7,8 +7,7 @@ [ "Assets", "ShaderLib", - "Shaders", - "Registry" + "Shaders" ] } } diff --git a/Templates/DefaultProject/Template/game.cfg b/Templates/DefaultProject/Template/game.cfg index 49fc0346e4..1da374a93b 100644 --- a/Templates/DefaultProject/Template/game.cfg +++ b/Templates/DefaultProject/Template/game.cfg @@ -1,7 +1,3 @@ -sys_game_name = "${Name}" -sys_localization_folder = Localization -ca_useIMG_CAF = 0 - -- Enable warnings when asset loads take longer than the given millisecond threshold cl_assetLoadWarningEnable=true cl_assetLoadWarningMsThreshold=100 diff --git a/Templates/DefaultProject/template.json b/Templates/DefaultProject/template.json index 6f74fb6b26..67df3cccf7 100644 --- a/Templates/DefaultProject/template.json +++ b/Templates/DefaultProject/template.json @@ -25,12 +25,6 @@ "isTemplated": true, "isOptional": false }, - { - "file": "EngineFinder.cmake", - "origin": "EngineFinder.cmake", - "isTemplated": false, - "isOptional": false - }, { "file": "Code/${NameLower}_files.cmake", "origin": "Code/${NameLower}_files.cmake", @@ -49,12 +43,6 @@ "isTemplated": true, "isOptional": false }, - { - "file": "Code/gem.json", - "origin": "Code/gem.json", - "isTemplated": true, - "isOptional": true - }, { "file": "Code/Include/${Name}/${Name}Bus.h", "origin": "Code/Include/${Name}/${Name}Bus.h", @@ -175,12 +163,24 @@ "isTemplated": true, "isOptional": false }, + { + "file": "Code/gem.json", + "origin": "Code/gem.json", + "isTemplated": true, + "isOptional": true + }, { "file": "Config/shader_global_build_options.json", "origin": "Config/shader_global_build_options.json", "isTemplated": false, "isOptional": false }, + { + "file": "EngineFinder.cmake", + "origin": "EngineFinder.cmake", + "isTemplated": false, + "isOptional": false + }, { "file": "Platform/Android/android_project.cmake", "origin": "Platform/Android/android_project.cmake", @@ -478,7 +478,7 @@ { "file": "ShaderLib/README.md", "origin": "ShaderLib/README.md", - "isTemplated": true, + "isTemplated": false, "isOptional": true }, { @@ -514,7 +514,7 @@ { "file": "game.cfg", "origin": "game.cfg", - "isTemplated": true, + "isTemplated": false, "isOptional": false }, { @@ -650,6 +650,10 @@ { "dir": "Shaders", "origin": "Shaders" + }, + { + "dir": "Shaders/ShaderResourceGroups", + "origin": "Shaders/ShaderResourceGroups" } ] } diff --git a/Templates/MinimalProject/Template/.gitignore b/Templates/MinimalProject/Template/.gitignore new file mode 100644 index 0000000000..9a6d119b1b --- /dev/null +++ b/Templates/MinimalProject/Template/.gitignore @@ -0,0 +1,3 @@ +[Bb]uild/ +[Cc]ache/ +[Uu]ser/ \ No newline at end of file diff --git a/Templates/MinimalProject/Template/CMakeLists.txt b/Templates/MinimalProject/Template/CMakeLists.txt new file mode 100644 index 0000000000..4dcfc5325b --- /dev/null +++ b/Templates/MinimalProject/Template/CMakeLists.txt @@ -0,0 +1,35 @@ +# {BEGIN_LICENSE} +# +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# +# {END_LICENSE} + +if(NOT PROJECT_NAME) + cmake_minimum_required(VERSION 3.20) + project(${Name} + LANGUAGES C CXX + VERSION 1.0.0.0 + ) + include(EngineFinder.cmake OPTIONAL) + find_package(o3de REQUIRED) + o3de_initialize() +else() + # Add the project_name to global LY_PROJECTS_TARGET_NAME property + file(READ "${CMAKE_CURRENT_LIST_DIR}/project.json" project_json) + + string(JSON project_target_name ERROR_VARIABLE json_error GET ${project_json} "project_name") + if(json_error) + message(FATAL_ERROR "Unable to read key 'project_name' from 'project.json'") + endif() + + set_property(GLOBAL APPEND PROPERTY LY_PROJECTS_TARGET_NAME ${project_target_name}) + + add_subdirectory(Code) +endif() diff --git a/Templates/MinimalProject/Template/Code/${NameLower}_files.cmake b/Templates/MinimalProject/Template/Code/${NameLower}_files.cmake new file mode 100644 index 0000000000..f77348395b --- /dev/null +++ b/Templates/MinimalProject/Template/Code/${NameLower}_files.cmake @@ -0,0 +1,17 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES + Include/${Name}/${Name}Bus.h + Source/${Name}SystemComponent.cpp + Source/${Name}SystemComponent.h + enabled_gems.cmake +) diff --git a/Templates/MinimalProject/Template/Code/${NameLower}_shared_files.cmake b/Templates/MinimalProject/Template/Code/${NameLower}_shared_files.cmake new file mode 100644 index 0000000000..6b9ddc02aa --- /dev/null +++ b/Templates/MinimalProject/Template/Code/${NameLower}_shared_files.cmake @@ -0,0 +1,14 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES + Source/${Name}Module.cpp +) diff --git a/Templates/MinimalProject/Template/Code/CMakeLists.txt b/Templates/MinimalProject/Template/Code/CMakeLists.txt new file mode 100644 index 0000000000..43459b1606 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/CMakeLists.txt @@ -0,0 +1,116 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +# Currently we are in the ${Name}/Code folder: ${CMAKE_CURRENT_LIST_DIR} +# Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} +# Note: ly_get_list_relative_pal_filename will take care of the details for us, as this may be a restricted platform +# in which case it will see if that platform is present here or in the restricted folder. +# i.e. It could here : ${Name}/Code/Platform/ or +# //${Name}/Code +ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${o3de_project_restricted_path} ${o3de_project_path} ${o3de_project_name}) + +# Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the +# traits for this platform. Traits for a platform are defines for things like whether or not something in this project +# is supported by this platform. +include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) + +# Now that we have loaded our project traits for this platform, see if this project is even supported on this platform. +# If its not supported we just return after including the unsupported. +if(NOT PAL_TRAIT_${NameUpper}_SUPPORTED) + return() +endif() + +# We are on a supported platform, so add the ${Name} target +# Note: We include the common files and the platform specific files which are set in ${NameLower}_files.cmake and +# in ${pal_dir}/${NameLower}_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake +ly_add_target( + NAME ${Name}.Static STATIC + NAMESPACE Gem + FILES_CMAKE + ${NameLower}_files.cmake + ${pal_dir}/${NameLower}_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + INCLUDE_DIRECTORIES + PUBLIC + Include + BUILD_DEPENDENCIES + PRIVATE + AZ::AzGameFramework + Gem::Atom_AtomBridge.Static +) + +ly_add_target( + NAME ${Name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE} + NAMESPACE Gem + FILES_CMAKE + ${NameLower}_shared_files.cmake + ${pal_dir}/${NameLower}_shared_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + INCLUDE_DIRECTORIES + PUBLIC + Include + BUILD_DEPENDENCIES + PRIVATE + Gem::${Name}.Static + AZ::AzCore +) + +# if enabled, ${Name} is used by all kinds of applications +ly_create_alias(NAME ${Name}.Builders NAMESPACE Gem TARGETS Gem::${Name}) +ly_create_alias(NAME ${Name}.Tools NAMESPACE Gem TARGETS Gem::${Name}) +ly_create_alias(NAME ${Name}.Clients NAMESPACE Gem TARGETS Gem::${Name}) +ly_create_alias(NAME ${Name}.Servers NAMESPACE Gem TARGETS Gem::${Name}) + +################################################################################ +# Gem dependencies +################################################################################ + +# The GameLauncher uses "Clients" gem variants: +ly_enable_gems( + PROJECT_NAME ${Name} GEM_FILE enabled_gems.cmake + TARGETS + ${Name}.GameLauncher + VARIANTS + Clients) + +if(PAL_TRAIT_BUILD_HOST_TOOLS) + + # the builder type applications use the "Builders" variants of the enabled gems. + ly_enable_gems( + PROJECT_NAME ${Name} GEM_FILE enabled_gems.cmake + TARGETS + AssetBuilder + AssetProcessor + AssetProcessorBatch + VARIANTS + Builders) + + # the Editor applications use the "Tools" variants of the enabled gems. + ly_enable_gems( + PROJECT_NAME ${Name} GEM_FILE enabled_gems.cmake + TARGETS + Editor + VARIANTS + Tools) +endif() + +if(PAL_TRAIT_BUILD_SERVER_SUPPORTED) + # this property causes it to actually make a ServerLauncher. + # if you don't want a Server application, you can remove this and the + # following ly_enable_gems lines. + set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS ${Name}) + + # The ServerLauncher uses the "Servers" variants of enabled gems: + ly_enable_gems( + PROJECT_NAME ${Name} GEM_FILE enabled_gems.cmake + TARGETS + ${Name}.ServerLauncher + VARIANTS + Servers) +endif() diff --git a/Templates/MinimalProject/Template/Code/Include/${Name}/${Name}Bus.h b/Templates/MinimalProject/Template/Code/Include/${Name}/${Name}Bus.h new file mode 100644 index 0000000000..05e434ec03 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Include/${Name}/${Name}Bus.h @@ -0,0 +1,44 @@ +// {BEGIN_LICENSE} +/* + * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or + * its licensors. + * + * For complete copyright and license terms please see the LICENSE at the root of this + * distribution (the "License"). All use of this software is governed by the License, + * or, if provided, by the license below or the license accompanying this file. Do not + * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + */ + // {END_LICENSE} + +#pragma once + +#include +#include + +namespace ${SanitizedCppName} +{ + class ${SanitizedCppName}Requests + { + public: + AZ_RTTI(${SanitizedCppName}Requests, "${Random_Uuid}"); + virtual ~${SanitizedCppName}Requests() = default; + // Put your public methods here + }; + + class ${SanitizedCppName}BusTraits + : public AZ::EBusTraits + { + public: + ////////////////////////////////////////////////////////////////////////// + // EBusTraits overrides + static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; + static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; + ////////////////////////////////////////////////////////////////////////// + }; + + using ${SanitizedCppName}RequestBus = AZ::EBus<${SanitizedCppName}Requests, ${SanitizedCppName}BusTraits>; + using ${SanitizedCppName}Interface = AZ::Interface<${SanitizedCppName}Requests>; + +} // namespace ${SanitizedCppName} diff --git a/Templates/MinimalProject/Template/Code/Platform/Android/${NameLower}_android_files.cmake b/Templates/MinimalProject/Template/Code/Platform/Android/${NameLower}_android_files.cmake new file mode 100644 index 0000000000..78fd98ba6c --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Android/${NameLower}_android_files.cmake @@ -0,0 +1,14 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES + PAL_android.cmake +) diff --git a/Templates/MinimalProject/Template/Code/Platform/Android/${NameLower}_shared_android_files.cmake b/Templates/MinimalProject/Template/Code/Platform/Android/${NameLower}_shared_android_files.cmake new file mode 100644 index 0000000000..d7112106d2 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Android/${NameLower}_shared_android_files.cmake @@ -0,0 +1,13 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES +) diff --git a/Templates/MinimalProject/Template/Code/Platform/Android/PAL_android.cmake b/Templates/MinimalProject/Template/Code/Platform/Android/PAL_android.cmake new file mode 100644 index 0000000000..8218d1c700 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Android/PAL_android.cmake @@ -0,0 +1,12 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(PAL_TRAIT_${NameUpper}_SUPPORTED TRUE) diff --git a/Templates/MinimalProject/Template/Code/Platform/Linux/${NameLower}_linux_files.cmake b/Templates/MinimalProject/Template/Code/Platform/Linux/${NameLower}_linux_files.cmake new file mode 100644 index 0000000000..ee0b06efc4 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Linux/${NameLower}_linux_files.cmake @@ -0,0 +1,14 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES + PAL_linux.cmake +) diff --git a/Templates/MinimalProject/Template/Code/Platform/Linux/${NameLower}_shared_linux_files.cmake b/Templates/MinimalProject/Template/Code/Platform/Linux/${NameLower}_shared_linux_files.cmake new file mode 100644 index 0000000000..d7112106d2 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Linux/${NameLower}_shared_linux_files.cmake @@ -0,0 +1,13 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES +) diff --git a/Templates/MinimalProject/Template/Code/Platform/Linux/PAL_linux.cmake b/Templates/MinimalProject/Template/Code/Platform/Linux/PAL_linux.cmake new file mode 100644 index 0000000000..8218d1c700 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Linux/PAL_linux.cmake @@ -0,0 +1,12 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(PAL_TRAIT_${NameUpper}_SUPPORTED TRUE) diff --git a/Templates/MinimalProject/Template/Code/Platform/Mac/${NameLower}_mac_files.cmake b/Templates/MinimalProject/Template/Code/Platform/Mac/${NameLower}_mac_files.cmake new file mode 100644 index 0000000000..e14e028c88 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Mac/${NameLower}_mac_files.cmake @@ -0,0 +1,15 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES + ../../../Resources/Platform/Mac/Info.plist + PAL_mac.cmake +) diff --git a/Templates/MinimalProject/Template/Code/Platform/Mac/${NameLower}_shared_mac_files.cmake b/Templates/MinimalProject/Template/Code/Platform/Mac/${NameLower}_shared_mac_files.cmake new file mode 100644 index 0000000000..d9f2e6ec6b --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Mac/${NameLower}_shared_mac_files.cmake @@ -0,0 +1,14 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES + ../../../Resources/Platform/Mac/Info.plist +) diff --git a/Templates/MinimalProject/Template/Code/Platform/Mac/PAL_mac.cmake b/Templates/MinimalProject/Template/Code/Platform/Mac/PAL_mac.cmake new file mode 100644 index 0000000000..8218d1c700 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Mac/PAL_mac.cmake @@ -0,0 +1,12 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(PAL_TRAIT_${NameUpper}_SUPPORTED TRUE) diff --git a/Templates/MinimalProject/Template/Code/Platform/Windows/${NameLower}_shared_windows_files.cmake b/Templates/MinimalProject/Template/Code/Platform/Windows/${NameLower}_shared_windows_files.cmake new file mode 100644 index 0000000000..d7112106d2 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Windows/${NameLower}_shared_windows_files.cmake @@ -0,0 +1,13 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES +) diff --git a/Templates/MinimalProject/Template/Code/Platform/Windows/${NameLower}_windows_files.cmake b/Templates/MinimalProject/Template/Code/Platform/Windows/${NameLower}_windows_files.cmake new file mode 100644 index 0000000000..b6eb718a05 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Windows/${NameLower}_windows_files.cmake @@ -0,0 +1,14 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES + PAL_windows.cmake +) diff --git a/Templates/MinimalProject/Template/Code/Platform/Windows/PAL_windows.cmake b/Templates/MinimalProject/Template/Code/Platform/Windows/PAL_windows.cmake new file mode 100644 index 0000000000..8218d1c700 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/Windows/PAL_windows.cmake @@ -0,0 +1,12 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(PAL_TRAIT_${NameUpper}_SUPPORTED TRUE) diff --git a/Templates/MinimalProject/Template/Code/Platform/iOS/${NameLower}_ios_files.cmake b/Templates/MinimalProject/Template/Code/Platform/iOS/${NameLower}_ios_files.cmake new file mode 100644 index 0000000000..44f15538c8 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/iOS/${NameLower}_ios_files.cmake @@ -0,0 +1,15 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES + ../Resources/Platform/iOS/Info.plist + PAL_ios.cmake +) diff --git a/Templates/MinimalProject/Template/Code/Platform/iOS/${NameLower}_shared_ios_files.cmake b/Templates/MinimalProject/Template/Code/Platform/iOS/${NameLower}_shared_ios_files.cmake new file mode 100644 index 0000000000..d7112106d2 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/iOS/${NameLower}_shared_ios_files.cmake @@ -0,0 +1,13 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(FILES +) diff --git a/Templates/MinimalProject/Template/Code/Platform/iOS/PAL_ios.cmake b/Templates/MinimalProject/Template/Code/Platform/iOS/PAL_ios.cmake new file mode 100644 index 0000000000..8218d1c700 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Platform/iOS/PAL_ios.cmake @@ -0,0 +1,12 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(PAL_TRAIT_${NameUpper}_SUPPORTED TRUE) diff --git a/Templates/MinimalProject/Template/Code/Source/${Name}Module.cpp b/Templates/MinimalProject/Template/Code/Source/${Name}Module.cpp new file mode 100644 index 0000000000..57b473b317 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Source/${Name}Module.cpp @@ -0,0 +1,50 @@ +// {BEGIN_LICENSE} +/* + * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or + * its licensors. + * + * For complete copyright and license terms please see the LICENSE at the root of this + * distribution (the "License"). All use of this software is governed by the License, + * or, if provided, by the license below or the license accompanying this file. Do not + * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + */ + // {END_LICENSE} + +#include +#include + +#include "${Name}SystemComponent.h" + +namespace ${SanitizedCppName} +{ + class ${SanitizedCppName}Module + : public AZ::Module + { + public: + AZ_RTTI(${SanitizedCppName}Module, "${ModuleClassId}", AZ::Module); + AZ_CLASS_ALLOCATOR(${SanitizedCppName}Module, AZ::SystemAllocator, 0); + + ${SanitizedCppName}Module() + : AZ::Module() + { + // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here. + m_descriptors.insert(m_descriptors.end(), { + ${SanitizedCppName}SystemComponent::CreateDescriptor(), + }); + } + + /** + * Add required SystemComponents to the SystemEntity. + */ + AZ::ComponentTypeList GetRequiredSystemComponents() const override + { + return AZ::ComponentTypeList{ + azrtti_typeid<${SanitizedCppName}SystemComponent>(), + }; + } + }; +}// namespace ${SanitizedCppName} + +AZ_DECLARE_MODULE_CLASS(Gem_${SanitizedCppName}, ${SanitizedCppName}::${SanitizedCppName}Module) diff --git a/Templates/MinimalProject/Template/Code/Source/${Name}SystemComponent.cpp b/Templates/MinimalProject/Template/Code/Source/${Name}SystemComponent.cpp new file mode 100644 index 0000000000..ed0a47d6db --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Source/${Name}SystemComponent.cpp @@ -0,0 +1,91 @@ +// {BEGIN_LICENSE} +/* + * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or + * its licensors. + * + * For complete copyright and license terms please see the LICENSE at the root of this + * distribution (the "License"). All use of this software is governed by the License, + * or, if provided, by the license below or the license accompanying this file. Do not + * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + */ + // {END_LICENSE} + +#include +#include +#include + +#include "${Name}SystemComponent.h" + +namespace ${SanitizedCppName} +{ + void ${SanitizedCppName}SystemComponent::Reflect(AZ::ReflectContext* context) + { + if (AZ::SerializeContext* serialize = azrtti_cast(context)) + { + serialize->Class<${SanitizedCppName}SystemComponent, AZ::Component>() + ->Version(0) + ; + + if (AZ::EditContext* ec = serialize->GetEditContext()) + { + ec->Class<${SanitizedCppName}SystemComponent>("${SanitizedCppName}", "[Description of functionality provided by this System Component]") + ->ClassElement(AZ::Edit::ClassElements::EditorData, "") + ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System")) + ->Attribute(AZ::Edit::Attributes::AutoExpand, true) + ; + } + } + } + + void ${SanitizedCppName}SystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) + { + provided.push_back(AZ_CRC("${SanitizedCppName}Service")); + } + + void ${SanitizedCppName}SystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) + { + incompatible.push_back(AZ_CRC("${SanitizedCppName}Service")); + } + + void ${SanitizedCppName}SystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) + { + AZ_UNUSED(required); + } + + void ${SanitizedCppName}SystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) + { + AZ_UNUSED(dependent); + } + + ${SanitizedCppName}SystemComponent::${SanitizedCppName}SystemComponent() + { + if (${SanitizedCppName}Interface::Get() == nullptr) + { + ${SanitizedCppName}Interface::Register(this); + } + } + + ${SanitizedCppName}SystemComponent::~${SanitizedCppName}SystemComponent() + { + if (${SanitizedCppName}Interface::Get() == this) + { + ${SanitizedCppName}Interface::Unregister(this); + } + } + + void ${SanitizedCppName}SystemComponent::Init() + { + } + + void ${SanitizedCppName}SystemComponent::Activate() + { + ${SanitizedCppName}RequestBus::Handler::BusConnect(); + } + + void ${SanitizedCppName}SystemComponent::Deactivate() + { + ${SanitizedCppName}RequestBus::Handler::BusDisconnect(); + } +} diff --git a/Templates/MinimalProject/Template/Code/Source/${Name}SystemComponent.h b/Templates/MinimalProject/Template/Code/Source/${Name}SystemComponent.h new file mode 100644 index 0000000000..10a500aba2 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/Source/${Name}SystemComponent.h @@ -0,0 +1,53 @@ +// {BEGIN_LICENSE} +/* + * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or + * its licensors. + * + * For complete copyright and license terms please see the LICENSE at the root of this + * distribution (the "License"). All use of this software is governed by the License, + * or, if provided, by the license below or the license accompanying this file. Do not + * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + */ + // {END_LICENSE} + +#pragma once + +#include + +#include <${Name}/${Name}Bus.h> + +namespace ${SanitizedCppName} +{ + class ${SanitizedCppName}SystemComponent + : public AZ::Component + , protected ${SanitizedCppName}RequestBus::Handler + { + public: + AZ_COMPONENT(${SanitizedCppName}SystemComponent, "${SysCompClassId}"); + + static void Reflect(AZ::ReflectContext* context); + + static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided); + static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible); + static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required); + static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent); + + ${SanitizedCppName}SystemComponent(); + ~${SanitizedCppName}SystemComponent(); + + protected: + //////////////////////////////////////////////////////////////////////// + // ${SanitizedCppName}RequestBus interface implementation + + //////////////////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////////////////// + // AZ::Component interface implementation + void Init() override; + void Activate() override; + void Deactivate() override; + //////////////////////////////////////////////////////////////////////// + }; +} diff --git a/Templates/MinimalProject/Template/Code/enabled_gems.cmake b/Templates/MinimalProject/Template/Code/enabled_gems.cmake new file mode 100644 index 0000000000..72500a8ada --- /dev/null +++ b/Templates/MinimalProject/Template/Code/enabled_gems.cmake @@ -0,0 +1,17 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + +set(ENABLED_GEMS + ${Name} + Atom_AtomBridge + CameraFramework + ImGui +) diff --git a/Templates/MinimalProject/Template/Code/gem.json b/Templates/MinimalProject/Template/Code/gem.json new file mode 100644 index 0000000000..5b8fb3fde0 --- /dev/null +++ b/Templates/MinimalProject/Template/Code/gem.json @@ -0,0 +1,14 @@ +{ + "gem_name": "${Name}", + "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "display_name": "${Name}", + "summary": "A short description of ${Name}.", + "canonical_tags": [ + "Gem" + ], + "user_tags": [ + "${Name}" + ], + "icon_path": "preview.png" +} diff --git a/Templates/MinimalProject/Template/Config/shader_global_build_options.json b/Templates/MinimalProject/Template/Config/shader_global_build_options.json new file mode 100644 index 0000000000..08e4d7f502 --- /dev/null +++ b/Templates/MinimalProject/Template/Config/shader_global_build_options.json @@ -0,0 +1,11 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "GlobalBuildOptions", + "ClassData": { + "ShaderCompilerArguments" : { + "DefaultMatrixOrder" : "Row", + "AzslcAdditionalFreeArguments" : "--strip-unused-srgs" + } + } +} \ No newline at end of file diff --git a/Templates/MinimalProject/Template/EngineFinder.cmake b/Templates/MinimalProject/Template/EngineFinder.cmake new file mode 100644 index 0000000000..cac0f6215c --- /dev/null +++ b/Templates/MinimalProject/Template/EngineFinder.cmake @@ -0,0 +1,70 @@ +# {BEGIN_LICENSE} +# +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# +# {END_LICENSE} +# This file is copied during engine registration. Edits to this file will be lost next +# time a registration happens. + +include_guard() + +# Read the engine name from the project_json file +file(READ ${CMAKE_CURRENT_LIST_DIR}/project.json project_json) +string(JSON LY_ENGINE_NAME_TO_USE ERROR_VARIABLE json_error GET ${project_json} engine) +if(json_error) + message(FATAL_ERROR "Unable to read key 'engine' from 'project.json', error: ${json_error}") +endif() + +if(DEFINED ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE}) + set(manifest_path $ENV{USERPROFILE}/.o3de/o3de_manifest.json) # Windows +else() + set(manifest_path $ENV{HOME}/.o3de/o3de_manifest.json) # Unix +endif() + +# Read the ~/.o3de/o3de_manifest.json file and look through the 'engines_path' object. +# Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path. +if(EXISTS ${manifest_path}) + file(READ ${manifest_path} manifest_json) + + string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path) + if(json_error) + message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}', error: ${json_error}") + endif() + + string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path) + if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT") + message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object, error: ${json_error}") + endif() + + math(EXPR engines_path_count "${engines_path_count}-1") + foreach(engine_path_index RANGE ${engines_path_count}) + string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index}) + if(json_error) + message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}', error: ${json_error}") + endif() + + if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) + string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name}) + if(json_error) + message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}', error: ${json_error}") + endif() + + if(engine_path) + list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake") + break() + endif() + endif() + endforeach() +else() + # If the user is passing CMAKE_MODULE_PATH we assume thats where we will find the engine + if(NOT CMAKE_MODULE_PATH) + message(FATAL_ERROR "Engine registration is required before configuring a project. Please register an engine by running 'scripts/o3de register --this-engine'") + endif() +endif() diff --git a/Templates/MinimalProject/Template/Platform/Android/android_project.cmake b/Templates/MinimalProject/Template/Platform/Android/android_project.cmake new file mode 100644 index 0000000000..e102985372 --- /dev/null +++ b/Templates/MinimalProject/Template/Platform/Android/android_project.cmake @@ -0,0 +1,11 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + diff --git a/Templates/MinimalProject/Template/Platform/Android/android_project.json b/Templates/MinimalProject/Template/Platform/Android/android_project.json new file mode 100644 index 0000000000..99500f02ba --- /dev/null +++ b/Templates/MinimalProject/Template/Platform/Android/android_project.json @@ -0,0 +1,9 @@ +{ + "Tags": ["Android"], + "android_settings" : { + "package_name" : "com.lumberyard.${Name}", + "version_number" : 1, + "version_name" : "1.0.0.0", + "orientation" : "landscape" + } +} \ No newline at end of file diff --git a/Templates/MinimalProject/Template/Platform/Linux/linux_project.cmake b/Templates/MinimalProject/Template/Platform/Linux/linux_project.cmake new file mode 100644 index 0000000000..e102985372 --- /dev/null +++ b/Templates/MinimalProject/Template/Platform/Linux/linux_project.cmake @@ -0,0 +1,11 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + diff --git a/Templates/MinimalProject/Template/Platform/Linux/linux_project.json b/Templates/MinimalProject/Template/Platform/Linux/linux_project.json new file mode 100644 index 0000000000..d08fbf53ba --- /dev/null +++ b/Templates/MinimalProject/Template/Platform/Linux/linux_project.json @@ -0,0 +1,3 @@ +{ + "Tags": ["Linux"] +} \ No newline at end of file diff --git a/Templates/MinimalProject/Template/Platform/Mac/mac_project.cmake b/Templates/MinimalProject/Template/Platform/Mac/mac_project.cmake new file mode 100644 index 0000000000..e102985372 --- /dev/null +++ b/Templates/MinimalProject/Template/Platform/Mac/mac_project.cmake @@ -0,0 +1,11 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + diff --git a/Templates/MinimalProject/Template/Platform/Mac/mac_project.json b/Templates/MinimalProject/Template/Platform/Mac/mac_project.json new file mode 100644 index 0000000000..d42b6f8186 --- /dev/null +++ b/Templates/MinimalProject/Template/Platform/Mac/mac_project.json @@ -0,0 +1,3 @@ +{ + "Tags": ["Mac"] +} \ No newline at end of file diff --git a/Templates/MinimalProject/Template/Platform/Windows/windows_project.cmake b/Templates/MinimalProject/Template/Platform/Windows/windows_project.cmake new file mode 100644 index 0000000000..e102985372 --- /dev/null +++ b/Templates/MinimalProject/Template/Platform/Windows/windows_project.cmake @@ -0,0 +1,11 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + diff --git a/Templates/MinimalProject/Template/Platform/Windows/windows_project.json b/Templates/MinimalProject/Template/Platform/Windows/windows_project.json new file mode 100644 index 0000000000..a052f1e05a --- /dev/null +++ b/Templates/MinimalProject/Template/Platform/Windows/windows_project.json @@ -0,0 +1,3 @@ +{ + "Tags": ["Windows"] +} \ No newline at end of file diff --git a/Templates/MinimalProject/Template/Platform/iOS/ios_project.cmake b/Templates/MinimalProject/Template/Platform/iOS/ios_project.cmake new file mode 100644 index 0000000000..e102985372 --- /dev/null +++ b/Templates/MinimalProject/Template/Platform/iOS/ios_project.cmake @@ -0,0 +1,11 @@ +# {BEGIN_LICENSE} +# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +# its licensors. +# +# For complete copyright and license terms please see the LICENSE at the root of this +# distribution (the "License"). All use of this software is governed by the License, +# or, if provided, by the license below or the license accompanying this file. Do not +# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# {END_LICENSE} + diff --git a/Templates/MinimalProject/Template/Platform/iOS/ios_project.json b/Templates/MinimalProject/Template/Platform/iOS/ios_project.json new file mode 100644 index 0000000000..b2dab56d05 --- /dev/null +++ b/Templates/MinimalProject/Template/Platform/iOS/ios_project.json @@ -0,0 +1,3 @@ +{ + "Tags": ["iOS"] +} \ No newline at end of file diff --git a/Templates/MinimalProject/Template/Registry/assets_scan_folders.setreg b/Templates/MinimalProject/Template/Registry/assets_scan_folders.setreg new file mode 100644 index 0000000000..a42f65efb4 --- /dev/null +++ b/Templates/MinimalProject/Template/Registry/assets_scan_folders.setreg @@ -0,0 +1,14 @@ +{ + "Amazon": + { + "${Name}.Assets": + { + "SourcePaths": + [ + "Assets", + "ShaderLib", + "Shaders" + ] + } + } +} \ No newline at end of file diff --git a/Templates/MinimalProject/Template/Resources/CryEngineLogoLauncher.bmp b/Templates/MinimalProject/Template/Resources/CryEngineLogoLauncher.bmp new file mode 100644 index 0000000000..fe0adc54a4 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/CryEngineLogoLauncher.bmp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf6d56fe4c367d39bd78500dd34332fcad57ad41241768b52781dbdb60ddd972 +size 347568 diff --git a/Templates/MinimalProject/Template/Resources/GameSDK.ico b/Templates/MinimalProject/Template/Resources/GameSDK.ico new file mode 100644 index 0000000000..cb935cd926 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/GameSDK.ico @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61efd8df621780af995fc1250918df5e00364ff00f849bef67702cd4b0a152e1 +size 65537 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/Contents.json b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/Contents.json new file mode 100644 index 0000000000..da4a164c91 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..bfa8bcf478 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "icon_16_2x.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "icon_32_2x.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "icon_128 _2x.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "icon_256 _2x.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "icon_512_2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png new file mode 100644 index 0000000000..5970ea34ba --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e38257b6917cdf5d73e90e6009f10c8736d62b20c4e785085305075c7e6320e2 +size 32037 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128.png new file mode 100644 index 0000000000..9e30e09547 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f41a37d2347a617e93bd97adaf6d4c161c471ca3ef7e04b98c65ddda52396dc +size 27833 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16.png new file mode 100644 index 0000000000..aeb29abd0a --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b07984494059bf827bc485cbea06d12e0283811face1a18799495f9ba7ae8af1 +size 20779 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16_2x.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16_2x.png new file mode 100644 index 0000000000..445a389d61 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16_2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e645142d284de40aafb7a4a858f3df92b6a5ba9b03fa5f1a2d3cb25211597926 +size 21857 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png new file mode 100644 index 0000000000..0904cf7ce8 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07631f41b8dea80713d2463f81a713a9a93798975b6fb50afbeeb13d26c57fa2 +size 48899 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256.png new file mode 100644 index 0000000000..5970ea34ba --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e38257b6917cdf5d73e90e6009f10c8736d62b20c4e785085305075c7e6320e2 +size 32037 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32.png new file mode 100644 index 0000000000..445a389d61 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e645142d284de40aafb7a4a858f3df92b6a5ba9b03fa5f1a2d3cb25211597926 +size 21857 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32_2x.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32_2x.png new file mode 100644 index 0000000000..1fad9bda96 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32_2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad83faf98b49f4e37112baedeae726f4f8d71bcdd1961d9cdad31f043f8ca666 +size 24003 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512.png new file mode 100644 index 0000000000..e1517dddb6 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68529a6c11d5ffa7ecd9d5bbb11ceea28e6852bd45946b525af09602c9a1e1bf +size 48899 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512_2x.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512_2x.png new file mode 100644 index 0000000000..b425cb685f --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512_2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a70003840b418848b2ce6c18ed7cbbfcd6fcf76598a6601dca8b98d9b6c1a2f +size 114706 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Info.plist b/Templates/MinimalProject/Template/Resources/Platform/Mac/Info.plist new file mode 100644 index 0000000000..6d056ba799 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleInfoDictionaryVersion + + CFBundleDisplayName + ${Name} + CFBundleExecutable + ${Name}.GameLauncher + CFBundleIdentifier + com.amazon.${Name} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + 03DE + CFBundleVersion + 1.0.0 + LSApplicationCategoryType + public.app-category.puzzle-games + + diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/Contents.json b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/Contents.json new file mode 100644 index 0000000000..73c00596a7 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/Contents.json b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000000..f836f07ee7 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,169 @@ +{ + "images" : [ + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "2436h", + "filename" : "iPhoneLaunchImage1125x2436.png", + "minimum-system-version" : "11.0", + "orientation" : "portrait", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "2436h", + "filename" : "iPhoneLaunchImage2436x1125.png", + "minimum-system-version" : "11.0", + "orientation" : "landscape", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "iPhoneLaunchImage1242x2208.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "iPhoneLaunchImage2208x1242.png", + "minimum-system-version" : "8.0", + "orientation" : "landscape", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "667h", + "filename" : "iPhoneLaunchImage750x1334.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "iPhoneLaunchImage640x960.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "retina4", + "filename" : "iPhoneLaunchImage640x1136.png", + "minimum-system-version" : "7.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "iPadLaunchImage768x1024.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "iPadLaunchImage1024x768.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "iPadLaunchImage1536x2048.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "iPadLaunchImage2048x1536.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "subtype" : "retina4", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png new file mode 100644 index 0000000000..1249ef3703 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31afa7ed44c5d9844c8d6ce08beccac482c3f43590869a3d190d06e2df377ccc +size 137472 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png new file mode 100644 index 0000000000..cdb6d5a82a --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0aac8ef9899442820bec0df8bf6434a46cc787d57c5d6d38a04727b8dc310048 +size 338281 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png new file mode 100644 index 0000000000..954d3084c8 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c07495891f15b138ba09f142777b0f43217bf8be05cbb74ba938319f3425980c +size 321125 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png new file mode 100644 index 0000000000..021319fbc3 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6bf6acb92421a453a36fc143ab6cefda14d631ea5e6dbf95c6e252a445fcbac +size 144797 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png new file mode 100644 index 0000000000..a15fd777fa --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9ad650fda925b1c076a67d1ef70315fe4f14db888c9fd36ee4eba1d18c1e7d1 +size 166749 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png new file mode 100644 index 0000000000..2855f4069d --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16f6e9d7bd15fc528d934c252213de8792812e708b1810191c5f1767f7165852 +size 142331 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/Contents.json b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..09621469c3 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/Contents.json @@ -0,0 +1,116 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "iPhoneNotificationIcon40x40.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "iPhoneNotificationIcon60x60.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "iPhoneSettingsIcon58x58.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "iPhoneSettingsIcon87x87.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "iPhoneSpotlightIcon80x80.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "iPhoneSpotlightIcon120x120.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "iPhoneAppIcon120x120.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "iPhoneAppIcon180x180.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "iPadNotificationIcon20x20.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "iPadNotificationIcon40x40.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "iPadSettingsIcon29x29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "iPadSettingsIcon58x58.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "iPadSpotlightIcon40x40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "iPadSpotlightIcon80x80.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "iPadAppIcon76x76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "iPadAppIcon152x152.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "iPadProAppIcon167x167.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "iOSAppStoreIcon1024x1024.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon152x152.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon152x152.png new file mode 100644 index 0000000000..b0dd493c11 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon152x152.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4901093fa6190bf37291b0fb6de23fba1be8ebbd742775a8565a4106722fbb6 +size 31942 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon76x76.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon76x76.png new file mode 100644 index 0000000000..21aa62e96b --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon76x76.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4ae97c4f44910121a61686862c8342ce598db4cdf9d46b29e96d3cb9e43bd06 +size 22158 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadProAppIcon167x167.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadProAppIcon167x167.png new file mode 100644 index 0000000000..6b696a84b2 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadProAppIcon167x167.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:061e2d0ce8dc852dd298c80f2aed5fee8ea4b87511c00662aa2d00922c0ba3c2 +size 30162 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon29x29.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon29x29.png new file mode 100644 index 0000000000..f3dfa05839 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon29x29.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fb4b4b77620d99dae7473b7bd8affe14630419835bd5719167ed200e657fa4f +size 17504 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon58x58.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon58x58.png new file mode 100644 index 0000000000..5325b805fd --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon58x58.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8aa9b1194f3244025578225a6a87cbc2dd12c70955ff615c8af640ea7f1334f1 +size 19619 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon40x40.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon40x40.png new file mode 100644 index 0000000000..98d8455838 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon40x40.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c25ffb1af8160b3202977de8c32aaa235e22c643ffd8004e4546c96868ef3b9 +size 18317 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon80x80.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon80x80.png new file mode 100644 index 0000000000..7482f6c892 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon80x80.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2db961b8f922a552d8ad374fdb56029efd4049a6cde10399b3d961242c82ce53 +size 22571 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon120x120.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon120x120.png new file mode 100644 index 0000000000..da987b86f9 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon120x120.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f39d897a57d4da0a70ede7c91339660b28e9d8c57b3e7d749807b13baa4b85f3 +size 28559 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon180x180.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon180x180.png new file mode 100644 index 0000000000..205e025c36 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon180x180.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:263b75d58328499eef1f8fa2e64c30706f546badcc0c4464a043b231da93cd0d +size 34969 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon58x58.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon58x58.png new file mode 100644 index 0000000000..0deb4f4f35 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon58x58.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33522ad8a8e826b22dd9ad214f56e63e24bf55c00bd8c845925d848b855dfb48 +size 19619 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon87x87.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon87x87.png new file mode 100644 index 0000000000..78591751d7 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon87x87.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f405c9f3d908d038aea26049e533b0d10955adfac370c7b3b80209997ea706d0 +size 24407 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon120x120.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon120x120.png new file mode 100644 index 0000000000..034dcb9fed --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon120x120.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d110f6e151799a2327bcdf5ef94d6fc82b114783a8cc973a8915896679ba4a80 +size 28559 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon80x80.png b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon80x80.png new file mode 100644 index 0000000000..f0fa89149c --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon80x80.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db8f00568fad4e49b05249aaa7a48c9fbf85c8b7a78489c83dc9b8161778bcef +size 22571 diff --git a/Templates/MinimalProject/Template/Resources/Platform/iOS/Info.plist b/Templates/MinimalProject/Template/Resources/Platform/iOS/Info.plist new file mode 100644 index 0000000000..2233733ad8 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/iOS/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${Name} + CFBundleExecutable + ${Name}.GameLauncher + CFBundleIdentifier + com.amazon.lumberyard.${Name} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${Name} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + UIRequiredDeviceCapabilities + + arm64 + metal + + UIRequiresFullScreen + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + + diff --git a/Templates/MinimalProject/Template/ShaderLib/README.md b/Templates/MinimalProject/Template/ShaderLib/README.md new file mode 100644 index 0000000000..034550163d --- /dev/null +++ b/Templates/MinimalProject/Template/ShaderLib/README.md @@ -0,0 +1,5 @@ +# Customizing Shader Resource Groups + +Please read: +*\/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/README.md* +for details on how to customize scenesrg.srgi and viewsrg.srgi. diff --git a/Templates/MinimalProject/Template/ShaderLib/scenesrg.srgi b/Templates/MinimalProject/Template/ShaderLib/scenesrg.srgi new file mode 100644 index 0000000000..0a8cec5963 --- /dev/null +++ b/Templates/MinimalProject/Template/ShaderLib/scenesrg.srgi @@ -0,0 +1,31 @@ +// {BEGIN_LICENSE} +/* +* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +* its licensors. +* +* For complete copyright and license terms please see the LICENSE at the root of this +* distribution (the "License"). All use of this software is governed by the License, +* or, if provided, by the license below or the license accompanying this file. Do not +* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* +*/ +// {END_LICENSE} + +#pragma once + +// Please read README.md for an explanation on why scenesrg.srgi and viewsrg.srgi are +// located in this folder (And how you can optionally customize your own scenesrg.srgi +// and viewsrg.srgi in your game project). + +#include + +partial ShaderResourceGroup SceneSrg : SRG_PerScene +{ +/* Intentionally Empty. Helps define the SrgSemantic for SceneSrg once.*/ +}; + +#define AZ_COLLECTING_PARTIAL_SRGS +#include +#include +#undef AZ_COLLECTING_PARTIAL_SRGS diff --git a/Templates/MinimalProject/Template/ShaderLib/viewsrg.srgi b/Templates/MinimalProject/Template/ShaderLib/viewsrg.srgi new file mode 100644 index 0000000000..bc566590ff --- /dev/null +++ b/Templates/MinimalProject/Template/ShaderLib/viewsrg.srgi @@ -0,0 +1,30 @@ +// {BEGIN_LICENSE} +/* +* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +* its licensors. +* +* For complete copyright and license terms please see the LICENSE at the root of this +* distribution (the "License"). All use of this software is governed by the License, +* or, if provided, by the license below or the license accompanying this file. Do not +* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* +*/ +// {END_LICENSE} + +#pragma once + +// Please read README.md for an explanation on why scenesrg.srgi and viewsrg.srgi are +// located in this folder (And how you can optionally customize your own scenesrg.srgi +// and viewsrg.srgi in your game project). + +#include + +partial ShaderResourceGroup ViewSrg : SRG_PerView +{ +/* Intentionally Empty. Helps define the SrgSemantic for ViewSrg once.*/ +}; + +#define AZ_COLLECTING_PARTIAL_SRGS +#include +#undef AZ_COLLECTING_PARTIAL_SRGS diff --git a/Templates/MinimalProject/Template/Shaders/CommonVS.azsli b/Templates/MinimalProject/Template/Shaders/CommonVS.azsli new file mode 100644 index 0000000000..fc557b9b06 --- /dev/null +++ b/Templates/MinimalProject/Template/Shaders/CommonVS.azsli @@ -0,0 +1,56 @@ +// {BEGIN_LICENSE} +/* +* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +* its licensors. +* +* For complete copyright and license terms please see the LICENSE at the root of this +* distribution (the "License"). All use of this software is governed by the License, +* or, if provided, by the license below or the license accompanying this file. Do not +* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* +*/ +// {END_LICENSE} + +#pragma once + +#include +#include +#include + +struct VertexInput +{ + float3 m_position : POSITION; + float3 m_normal : NORMAL; + float4 m_tangent : TANGENT; + float3 m_bitangent : BITANGENT; + float2 m_uv : UV0; +}; + +struct VertexOutput +{ + float4 m_position : SV_Position; + float3 m_normal : NORMAL; + float3 m_tangent : TANGENT; + float3 m_bitangent : BITANGENT; + float2 m_uv : UV0; + float3 m_view : VIEW; +}; + +VertexOutput CommonVS(VertexInput input) +{ + float4x4 objectToWorld = ObjectSrg::GetWorldMatrix(); + float3x3 objectToWorldIT = ObjectSrg::GetWorldMatrixInverseTranspose(); + + VertexOutput output; + float3 worldPosition = mul(objectToWorld, float4(input.m_position, 1)).xyz; + output.m_position = mul(ViewSrg::m_viewProjectionMatrix, float4(worldPosition, 1.0)); + + output.m_uv = input.m_uv; + + output.m_view = worldPosition - ViewSrg::m_worldPosition; + + ConstructTBN(input.m_normal, input.m_tangent, input.m_bitangent, objectToWorld, objectToWorldIT, output.m_normal, output.m_tangent, output.m_bitangent); + + return output; +} diff --git a/Templates/MinimalProject/Template/Shaders/ShaderResourceGroups/SceneSrg.azsli b/Templates/MinimalProject/Template/Shaders/ShaderResourceGroups/SceneSrg.azsli new file mode 100644 index 0000000000..4c962fbbcd --- /dev/null +++ b/Templates/MinimalProject/Template/Shaders/ShaderResourceGroups/SceneSrg.azsli @@ -0,0 +1,24 @@ +// {BEGIN_LICENSE} +/* +* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +* its licensors. +* +* For complete copyright and license terms please see the LICENSE at the root of this +* distribution (the "License"). All use of this software is governed by the License, +* or, if provided, by the license below or the license accompanying this file. Do not +* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* +*/ +// {END_LICENSE} + +#ifndef AZ_COLLECTING_PARTIAL_SRGS +#error Do not include this file directly. Include the main .srgi file instead. +#endif + +partial ShaderResourceGroup SceneSrg +{ + float m_time; + float m_deltaTime; +} + diff --git a/Gems/AtomContent/LookDevelopmentStudioPixar/LyProjectRootStub b/Templates/MinimalProject/Template/autoexec.cfg similarity index 100% rename from Gems/AtomContent/LookDevelopmentStudioPixar/LyProjectRootStub rename to Templates/MinimalProject/Template/autoexec.cfg diff --git a/Templates/MinimalProject/Template/game.cfg b/Templates/MinimalProject/Template/game.cfg new file mode 100644 index 0000000000..1da374a93b --- /dev/null +++ b/Templates/MinimalProject/Template/game.cfg @@ -0,0 +1,3 @@ +-- Enable warnings when asset loads take longer than the given millisecond threshold +cl_assetLoadWarningEnable=true +cl_assetLoadWarningMsThreshold=100 diff --git a/Templates/MinimalProject/Template/preview.png b/Templates/MinimalProject/Template/preview.png new file mode 100644 index 0000000000..a3e13481c9 --- /dev/null +++ b/Templates/MinimalProject/Template/preview.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a5881b8d6cfbc4ceefb14ab96844484fe19407ee030824768f9fcce2f729d35 +size 2949 diff --git a/Templates/MinimalProject/Template/project.json b/Templates/MinimalProject/Template/project.json new file mode 100644 index 0000000000..7f6b5d3b78 --- /dev/null +++ b/Templates/MinimalProject/Template/project.json @@ -0,0 +1,15 @@ +{ + "project_name": "${Name}", + "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "display_name": "${Name}", + "summary": "A short description of ${Name}.", + "canonical_tags": [ + "Project" + ], + "user_tags": [ + "${Name}" + ], + "icon_path": "preview.png", + "engine": "o3de" +} diff --git a/Templates/MinimalProject/template.json b/Templates/MinimalProject/template.json new file mode 100644 index 0000000000..88214b26fa --- /dev/null +++ b/Templates/MinimalProject/template.json @@ -0,0 +1,656 @@ +{ + "template_name": "MinimalProject", + "origin": "The primary repo for MinimalProject goes here: i.e. http://www.mydomain.com", + "license": "What license MinimalProject uses goes here: i.e. https://opensource.org/licenses/MIT", + "display_name": "MinimalProject", + "summary": "A short description of MinimalProject.", + "canonical_tags": [], + "user_tags": [ + "MinimalProject" + ], + "icon_path": "preview.png", + "copyFiles": [ + { + "file": ".gitignore", + "origin": ".gitignore", + "isTemplated": false, + "isOptional": false + }, + { + "file": "CMakeLists.txt", + "origin": "CMakeLists.txt", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/${NameLower}_files.cmake", + "origin": "Code/${NameLower}_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/${NameLower}_shared_files.cmake", + "origin": "Code/${NameLower}_shared_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/CMakeLists.txt", + "origin": "Code/CMakeLists.txt", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Include/${Name}/${Name}Bus.h", + "origin": "Code/Include/${Name}/${Name}Bus.h", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Android/${NameLower}_android_files.cmake", + "origin": "Code/Platform/Android/${NameLower}_android_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Android/${NameLower}_shared_android_files.cmake", + "origin": "Code/Platform/Android/${NameLower}_shared_android_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Android/PAL_android.cmake", + "origin": "Code/Platform/Android/PAL_android.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Linux/${NameLower}_linux_files.cmake", + "origin": "Code/Platform/Linux/${NameLower}_linux_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", + "origin": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Linux/PAL_linux.cmake", + "origin": "Code/Platform/Linux/PAL_linux.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Mac/${NameLower}_mac_files.cmake", + "origin": "Code/Platform/Mac/${NameLower}_mac_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", + "origin": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Mac/PAL_mac.cmake", + "origin": "Code/Platform/Mac/PAL_mac.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", + "origin": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Windows/${NameLower}_windows_files.cmake", + "origin": "Code/Platform/Windows/${NameLower}_windows_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/Windows/PAL_windows.cmake", + "origin": "Code/Platform/Windows/PAL_windows.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/iOS/${NameLower}_ios_files.cmake", + "origin": "Code/Platform/iOS/${NameLower}_ios_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/iOS/${NameLower}_shared_ios_files.cmake", + "origin": "Code/Platform/iOS/${NameLower}_shared_ios_files.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Platform/iOS/PAL_ios.cmake", + "origin": "Code/Platform/iOS/PAL_ios.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Source/${Name}Module.cpp", + "origin": "Code/Source/${Name}Module.cpp", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Source/${Name}SystemComponent.cpp", + "origin": "Code/Source/${Name}SystemComponent.cpp", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/Source/${Name}SystemComponent.h", + "origin": "Code/Source/${Name}SystemComponent.h", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/enabled_gems.cmake", + "origin": "Code/enabled_gems.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Code/gem.json", + "origin": "Code/gem.json", + "isTemplated": true, + "isOptional": true + }, + { + "file": "Config/shader_global_build_options.json", + "origin": "Config/shader_global_build_options.json", + "isTemplated": false, + "isOptional": false + }, + { + "file": "EngineFinder.cmake", + "origin": "EngineFinder.cmake", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Platform/Android/android_project.cmake", + "origin": "Platform/Android/android_project.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Platform/Android/android_project.json", + "origin": "Platform/Android/android_project.json", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Platform/Linux/linux_project.cmake", + "origin": "Platform/Linux/linux_project.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Platform/Linux/linux_project.json", + "origin": "Platform/Linux/linux_project.json", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Platform/Mac/mac_project.cmake", + "origin": "Platform/Mac/mac_project.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Platform/Mac/mac_project.json", + "origin": "Platform/Mac/mac_project.json", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Platform/Windows/windows_project.cmake", + "origin": "Platform/Windows/windows_project.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Platform/Windows/windows_project.json", + "origin": "Platform/Windows/windows_project.json", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Platform/iOS/ios_project.cmake", + "origin": "Platform/iOS/ios_project.cmake", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Platform/iOS/ios_project.json", + "origin": "Platform/iOS/ios_project.json", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Registry/assets_scan_folders.setreg", + "origin": "Registry/assets_scan_folders.setreg", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Resources/CryEngineLogoLauncher.bmp", + "origin": "Resources/CryEngineLogoLauncher.bmp", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/GameSDK.ico", + "origin": "Resources/GameSDK.ico", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/Contents.json", + "origin": "Resources/Platform/Mac/Images.xcassets/Contents.json", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16_2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16_2x.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32_2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32_2x.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512_2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512_2x.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/Mac/Info.plist", + "origin": "Resources/Platform/Mac/Info.plist", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/Contents.json", + "origin": "Resources/Platform/iOS/Images.xcassets/Contents.json", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/Contents.json", + "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/Contents.json", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png", + "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png", + "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png", + "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png", + "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png", + "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png", + "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon152x152.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon152x152.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon76x76.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon76x76.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadProAppIcon167x167.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadProAppIcon167x167.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon29x29.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon29x29.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon58x58.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon58x58.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon40x40.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon40x40.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon80x80.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon80x80.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon120x120.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon120x120.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon180x180.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon180x180.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon58x58.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon58x58.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon87x87.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon87x87.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon120x120.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon120x120.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon80x80.png", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon80x80.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "Resources/Platform/iOS/Info.plist", + "origin": "Resources/Platform/iOS/Info.plist", + "isTemplated": true, + "isOptional": false + }, + { + "file": "ShaderLib/README.md", + "origin": "ShaderLib/README.md", + "isTemplated": false, + "isOptional": true + }, + { + "file": "ShaderLib/scenesrg.srgi", + "origin": "ShaderLib/scenesrg.srgi", + "isTemplated": true, + "isOptional": false + }, + { + "file": "ShaderLib/viewsrg.srgi", + "origin": "ShaderLib/viewsrg.srgi", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Shaders/CommonVS.azsli", + "origin": "Shaders/CommonVS.azsli", + "isTemplated": true, + "isOptional": false + }, + { + "file": "Shaders/ShaderResourceGroups/SceneSrg.azsli", + "origin": "Shaders/ShaderResourceGroups/SceneSrg.azsli", + "isTemplated": true, + "isOptional": false + }, + { + "file": "autoexec.cfg", + "origin": "autoexec.cfg", + "isTemplated": false, + "isOptional": false + }, + { + "file": "game.cfg", + "origin": "game.cfg", + "isTemplated": false, + "isOptional": false + }, + { + "file": "preview.png", + "origin": "preview.png", + "isTemplated": false, + "isOptional": false + }, + { + "file": "project.json", + "origin": "project.json", + "isTemplated": true, + "isOptional": false + } + ], + "createDirectories": [ + { + "dir": "Assets", + "origin": "Assets" + }, + { + "dir": "Code", + "origin": "Code" + }, + { + "dir": "Code/Include", + "origin": "Code/Include" + }, + { + "dir": "Code/Include/${Name}", + "origin": "Code/Include/${Name}" + }, + { + "dir": "Code/Platform", + "origin": "Code/Platform" + }, + { + "dir": "Code/Platform/Android", + "origin": "Code/Platform/Android" + }, + { + "dir": "Code/Platform/Linux", + "origin": "Code/Platform/Linux" + }, + { + "dir": "Code/Platform/Mac", + "origin": "Code/Platform/Mac" + }, + { + "dir": "Code/Platform/Windows", + "origin": "Code/Platform/Windows" + }, + { + "dir": "Code/Platform/iOS", + "origin": "Code/Platform/iOS" + }, + { + "dir": "Code/Source", + "origin": "Code/Source" + }, + { + "dir": "Config", + "origin": "Config" + }, + { + "dir": "Platform", + "origin": "Platform" + }, + { + "dir": "Platform/Android", + "origin": "Platform/Android" + }, + { + "dir": "Platform/Linux", + "origin": "Platform/Linux" + }, + { + "dir": "Platform/Mac", + "origin": "Platform/Mac" + }, + { + "dir": "Platform/Windows", + "origin": "Platform/Windows" + }, + { + "dir": "Platform/iOS", + "origin": "Platform/iOS" + }, + { + "dir": "Registry", + "origin": "Registry" + }, + { + "dir": "Resources", + "origin": "Resources" + }, + { + "dir": "Resources/Platform", + "origin": "Resources/Platform" + }, + { + "dir": "Resources/Platform/Mac", + "origin": "Resources/Platform/Mac" + }, + { + "dir": "Resources/Platform/Mac/Images.xcassets", + "origin": "Resources/Platform/Mac/Images.xcassets" + }, + { + "dir": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset" + }, + { + "dir": "Resources/Platform/iOS", + "origin": "Resources/Platform/iOS" + }, + { + "dir": "Resources/Platform/iOS/Images.xcassets", + "origin": "Resources/Platform/iOS/Images.xcassets" + }, + { + "dir": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage", + "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage" + }, + { + "dir": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset", + "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset" + }, + { + "dir": "ShaderLib", + "origin": "ShaderLib" + }, + { + "dir": "Shaders", + "origin": "Shaders" + }, + { + "dir": "Shaders/ShaderResourceGroups", + "origin": "Shaders/ShaderResourceGroups" + } + ] +} diff --git a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake index f85048d13e..3908d21ecf 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 lz4-r128-multiplatform ly_associate_package(PACKAGE_NAME expat-2.1.0-multiplatform TARGETS expat PACKAGE_HASH 452256acd1fd699cef24162575b3524fccfb712f5321c83f1df1ce878de5b418) ly_associate_package(PACKAGE_NAME zstd-1.35-multiplatform TARGETS zstd PACKAGE_HASH 45d466c435f1095898578eedde85acf1fd27190e7ea99aeaa9acfd2f09e12665) ly_associate_package(PACKAGE_NAME SQLite-3.32.2-rev3-multiplatform TARGETS SQLite PACKAGE_HASH dd4d3de6cbb4ce3d15fc504ba0ae0587e515dc89a25228037035fc0aef4831f4) -ly_associate_package(PACKAGE_NAME azslc-1.7.21-rev1-multiplatform TARGETS azslc PACKAGE_HASH 772b7a2d9cc68aa1da4f0ee7db57ee1b4e7a8f20b81961fc5849af779582f4df) +ly_associate_package(PACKAGE_NAME azslc-1.7.22-rev1-multiplatform TARGETS azslc PACKAGE_HASH 71b4545d221d4fcd564ccc121c249a8f8f164bcc616faf146f926c3d5c78d527) ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee) ly_associate_package(PACKAGE_NAME lux_core-2.2-rev5-multiplatform TARGETS lux_core PACKAGE_HASH c8c13cf7bc351643e1abd294d0841b24dee60e51647dff13db7aec396ad1e0b5) ly_associate_package(PACKAGE_NAME xxhash-0.7.4-rev1-multiplatform TARGETS xxhash PACKAGE_HASH e81f3e6c4065975833996dd1fcffe46c3cf0f9e3a4207ec5f4a1b564ba75861e) diff --git a/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake b/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake index 1a2cfa4049..e88e3143e8 100644 --- a/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake +++ b/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake @@ -14,7 +14,7 @@ ly_associate_package(PACKAGE_NAME zlib-1.2.8-rev2-multiplatform ly_associate_package(PACKAGE_NAME ilmbase-2.3.0-rev4-multiplatform TARGETS ilmbase PACKAGE_HASH 97547fdf1fbc4d81b8ccf382261f8c25514ed3b3c4f8fd493f0a4fa873bba348) ly_associate_package(PACKAGE_NAME hdf5-1.0.11-rev2-multiplatform TARGETS hdf5 PACKAGE_HASH 11d5e04df8a93f8c52a5684a4cacbf0d9003056360983ce34f8d7b601082c6bd) ly_associate_package(PACKAGE_NAME alembic-1.7.11-rev3-multiplatform TARGETS alembic PACKAGE_HASH ba7a7d4943dd752f5a662374f6c48b93493df1d8e2c5f6a8d101f3b50700dd25) -ly_associate_package(PACKAGE_NAME assimp-5.0.1-rev9-multiplatform TARGETS assimplib PACKAGE_HASH 448530277b51b145ca43b96becd0266e29ae210fc9e2b45f5afe85f301a040e7) +ly_associate_package(PACKAGE_NAME assimp-5.0.1-rev10-multiplatform TARGETS assimplib PACKAGE_HASH d0fb822a6a359f1bebbb720a8502a289540af08baa887c8bc978f0fbbee07385) ly_associate_package(PACKAGE_NAME squish-ccr-20150601-rev3-multiplatform TARGETS squish-ccr PACKAGE_HASH c878c6c0c705e78403c397d03f5aa7bc87e5978298710e14d09c9daf951a83b3) ly_associate_package(PACKAGE_NAME ASTCEncoder-2017_11_14-rev2-multiplatform TARGETS ASTCEncoder PACKAGE_HASH c240ffc12083ee39a5ce9dc241de44d116e513e1e3e4cc1d05305e7aa3bdc326) ly_associate_package(PACKAGE_NAME md5-2.0-multiplatform TARGETS md5 PACKAGE_HASH 29e52ad22c78051551f78a40c2709594f0378762ae03b417adca3f4b700affdf) @@ -26,7 +26,7 @@ ly_associate_package(PACKAGE_NAME lz4-r128-multiplatform ly_associate_package(PACKAGE_NAME expat-2.1.0-multiplatform TARGETS expat PACKAGE_HASH 452256acd1fd699cef24162575b3524fccfb712f5321c83f1df1ce878de5b418) ly_associate_package(PACKAGE_NAME zstd-1.35-multiplatform TARGETS zstd PACKAGE_HASH 45d466c435f1095898578eedde85acf1fd27190e7ea99aeaa9acfd2f09e12665) ly_associate_package(PACKAGE_NAME SQLite-3.32.2-rev3-multiplatform TARGETS SQLite PACKAGE_HASH dd4d3de6cbb4ce3d15fc504ba0ae0587e515dc89a25228037035fc0aef4831f4) -ly_associate_package(PACKAGE_NAME azslc-1.7.21-rev1-multiplatform TARGETS azslc PACKAGE_HASH 772b7a2d9cc68aa1da4f0ee7db57ee1b4e7a8f20b81961fc5849af779582f4df) +ly_associate_package(PACKAGE_NAME azslc-1.7.22-rev1-multiplatform TARGETS azslc PACKAGE_HASH 71b4545d221d4fcd564ccc121c249a8f8f164bcc616faf146f926c3d5c78d527) ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee) ly_associate_package(PACKAGE_NAME lux_core-2.2-rev5-multiplatform TARGETS lux_core PACKAGE_HASH c8c13cf7bc351643e1abd294d0841b24dee60e51647dff13db7aec396ad1e0b5) ly_associate_package(PACKAGE_NAME xxhash-0.7.4-rev1-multiplatform TARGETS xxhash PACKAGE_HASH e81f3e6c4065975833996dd1fcffe46c3cf0f9e3a4207ec5f4a1b564ba75861e) diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index 6c077ac617..2f001cf7ee 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -26,7 +26,9 @@ set(CPACK_DESIRED_CMAKE_VERSION 3.20.2) # when the platform specific settings are applied below. additionally, any variable with # the "CPACK_" prefix will automatically be cached for use in any phase of cpack namely # pre/post build -set(CPACK_PACKAGE_VENDOR "${PROJECT_NAME}") +set(CPACK_PACKAGE_NAME "${PROJECT_NAME}") +set(CPACK_PACKAGE_FULL_NAME "Open3D Engine") +set(CPACK_PACKAGE_VENDOR "TBD") set(CPACK_PACKAGE_VERSION "${LY_VERSION_STRING}") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Installation Tool") @@ -39,7 +41,7 @@ set(DEFAULT_LICENSE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") set(CPACK_RESOURCE_FILE_LICENSE ${DEFAULT_LICENSE_FILE}) set(CPACK_LICENSE_URL ${LY_INSTALLER_LICENSE_URL}) -set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_VERSION}") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") # neither of the SOURCE_DIR variables equate to anything during execution of pre/post build scripts set(CPACK_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake) diff --git a/cmake/Platform/Windows/Packaging/Bootstrapper.wxs b/cmake/Platform/Windows/Packaging/Bootstrapper.wxs index fd8aa68b77..c7146b1b7f 100644 --- a/cmake/Platform/Windows/Packaging/Bootstrapper.wxs +++ b/cmake/Platform/Windows/Packaging/Bootstrapper.wxs @@ -5,7 +5,7 @@ - - [WixBundleName] Setup - [WixBundleName] + [WixBundleName] Release [WixBundleVersion] Setup Version [WixBundleVersion] Are you sure you want to cancel? - Welcome + Welcome to @CPACK_PACKAGE_FULL_NAME@! Setup will install [WixBundleName] on your computer. Click install to continue, options to set the install directory or Close to exit. - [WixBundleName] <a href="#">license terms</a>. - I &agree to the license terms and conditions + By installing, you agree to the @WIX_THEME_EULA_ACCEPTANCE_TEXT@ &Options &Install &Close @@ -34,7 +32,7 @@ Setup will install [WixBundleName] on your computer. Click install to continue, &Close - Setup Progress + Installing @CPACK_PACKAGE_FULL_NAME@... Processing: Initializing... &Cancel @@ -53,7 +51,9 @@ Setup will install [WixBundleName] on your computer. Click install to continue, Uninstall Failed Repair Failed -One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>. +One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information, see the log file. + +<a href="#">View Log File</a> &Close diff --git a/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in b/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in index 61b338cc13..f9a177b646 100644 --- a/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in +++ b/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in @@ -1,87 +1,101 @@ - #(loc.WindowTitle) + #(loc.WindowTitle) - Segoe UI - Segoe UI - Segoe UI - Segoe UI + + Open Sans + + Open Sans + + Open Sans + + Open Sans - - #(loc.Title) + - @WIX_THEME_INSTALL_LICENSE_ELEMENT@ + #(loc.InstallHeader) - #(loc.InstallAcceptCheckbox) - - - +@WIX_THEME_INSTALL_LICENSE_ELEMENTS@ + + + + + - #(loc.OptionsHeader) + #(loc.OptionsHeader) - #(loc.OptionsLocationLabel) - - + #(loc.OptionsLocationLabel) + + - - + + + - #(loc.ModifyHeader) + #(loc.ModifyHeader) - - - + + + + - #(loc.ProgressHeader) + #(loc.ProgressHeader) - #(loc.ProgressLabel) - #(loc.OverallProgressPackageText) - + #(loc.ProgressLabel) + #(loc.OverallProgressPackageText) + - + + - #(loc.SuccessHeader) - #(loc.SuccessInstallHeader) - #(loc.SuccessRepairHeader) - #(loc.SuccessUninstallHeader) + #(loc.SuccessHeader) + #(loc.SuccessInstallHeader) + #(loc.SuccessRepairHeader) + #(loc.SuccessUninstallHeader) - - + + + - #(loc.FailureHeader) - #(loc.FailureInstallHeader) - #(loc.FailureUninstallHeader) - #(loc.FailureRepairHeader) + + #(loc.FailureHeader) + #(loc.FailureInstallHeader) + #(loc.FailureUninstallHeader) + #(loc.FailureRepairHeader) - #(loc.FailureHyperlinkLogText) - + #(loc.FailureHyperlinkLogText) + - + + - #(loc.HelpHeader) - #(loc.HelpText) - + #(loc.HelpHeader) + + #(loc.HelpText) + + + diff --git a/cmake/Platform/Windows/Packaging/product_logo.png b/cmake/Platform/Windows/Packaging/product_logo.png index ac9c06f8f1..1941b2ff8a 100644 --- a/cmake/Platform/Windows/Packaging/product_logo.png +++ b/cmake/Platform/Windows/Packaging/product_logo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c804a6be619b9f35cad46eab30b94def7a4ac7142a92cb3f7c78a659381d834 +oid sha256:e7aaee03713eccd1ca4f909288ae16c9c563b2ac8d32a9e246bbb2eb941b47c7 size 11074 diff --git a/cmake/Platform/Windows/Packaging/warning.png b/cmake/Platform/Windows/Packaging/warning.png new file mode 100644 index 0000000000..75a5fd75a7 --- /dev/null +++ b/cmake/Platform/Windows/Packaging/warning.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d727994fd1819f7ff01d56e2d2f59c1fe2ed1e839156e70e3d2dec93d54ca04 +size 566 diff --git a/cmake/Platform/Windows/Packaging_windows.cmake b/cmake/Platform/Windows/Packaging_windows.cmake index aec0edeee2..6dc806ff56 100644 --- a/cmake/Platform/Windows/Packaging_windows.cmake +++ b/cmake/Platform/Windows/Packaging_windows.cmake @@ -91,23 +91,35 @@ set(CPACK_WIX_EXTENSIONS set(_embed_artifacts "yes") +set(_hyperlink_license [[ + #(loc.InstallEulaAcceptance) +]]) + +set(_raw_text_license [[ + + #(loc.InstallEulaAcceptance) +]]) + if(LY_INSTALLER_DOWNLOAD_URL) + set(WIX_THEME_WARNING_IMAGE ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/warning.png) + if(LY_INSTALLER_LICENSE_URL) - set(WIX_THEME_INSTALL_LICENSE_ELEMENT - "#(loc.InstallLicenseLinkText)" - ) + set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_hyperlink_license}) + set(WIX_THEME_EULA_ACCEPTANCE_TEXT "<a href=\"#\">Terms of Use</a>") else() - set(WIX_THEME_INSTALL_LICENSE_ELEMENT - "" - ) + set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_raw_text_license}) + set(WIX_THEME_EULA_ACCEPTANCE_TEXT "Terms of Use above") endif() + # theme ux file configure_file( "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.xml.in" "${CPACK_BINARY_DIR}/BootstrapperTheme.xml" @ONLY ) + + # theme localization file configure_file( "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.wxl.in" "${CPACK_BINARY_DIR}/BootstrapperTheme.wxl" diff --git a/engine.json b/engine.json index 09bb3f5ff6..21ed239c1c 100644 --- a/engine.json +++ b/engine.json @@ -92,7 +92,9 @@ "AutomatedTesting" ], "templates": [ + "Templates/AssetGem", "Templates/DefaultGem", - "Templates/DefaultProject" + "Templates/DefaultProject", + "Templates/MinimalProject" ] } diff --git a/scripts/o3de/o3de/engine_template.py b/scripts/o3de/o3de/engine_template.py index 06e34cc449..384b8a3c0f 100755 --- a/scripts/o3de/o3de/engine_template.py +++ b/scripts/o3de/o3de/engine_template.py @@ -14,6 +14,7 @@ This file contains all the code that has to do with creating and instantiate eng import argparse import logging import os +import pathlib import shutil import sys import json @@ -79,7 +80,22 @@ restricted_platforms = { } template_file_name = 'template.json' -this_script_parent = os.path.dirname(os.path.realpath(__file__)) +this_script_parent = pathlib.Path(os.path.dirname(os.path.realpath(__file__))) + +def _replace_license_text(source_data: str): + while '{BEGIN_LICENSE}' in source_data: + start = source_data.find('{BEGIN_LICENSE}') + if start != -1: + line_start = source_data.rfind('\n', 0, start) + if line_start == -1: + line_start = 0 + end = source_data.find('{END_LICENSE}') + if end != -1: + end = source_data.find('\n', end) + if end != -1: + source_data = source_data[:line_start] + source_data[end + 1:] + return source_data + def _transform(s_data: str, replacements: list, @@ -92,7 +108,7 @@ def _transform(s_data: str, :return: the potentially transformed data """ # copy the s_data into t_data, then apply all transformations only on t_data - t_data = s_data + t_data = str(s_data) for replacement in replacements: t_data = t_data.replace(replacement[0], replacement[1]) @@ -100,30 +116,13 @@ def _transform(s_data: str, while '${Random_Uuid}' in t_data: t_data = t_data.replace('${Random_Uuid}', str(uuid.uuid4()), 1) - ################################################################## - # For some reason the re.sub call here gets into some kind of infinite - # loop and never returns on some files consistently. - # Until I figure out why we can use the string replacement method - # if not keep_license_text: - # t_data = re.sub(r"^(//|'''|#)\s*{BEGIN_LICENSE}((.|\n)*){END_LICENSE}\n", "", t_data, flags=re.DOTALL) - if not keep_license_text: - while '{BEGIN_LICENSE}' in t_data: - start = t_data.find('{BEGIN_LICENSE}') - if start != -1: - line_start = t_data.rfind('\n', 0, start) - if line_start == -1: - line_start = 0 - end = t_data.find('{END_LICENSE}') - end = t_data.find('\n', end) - if end != -1: - t_data = t_data[:line_start] + t_data[end + 1:] - ################################################################### + t_data = _replace_license_text(t_data) return t_data -def _transform_copy(source_file: str, - destination_file: str, +def _transform_copy(source_file: pathlib.Path, + destination_file: pathlib.Path, replacements: list, keep_license_text: bool = False) -> None: """ @@ -158,18 +157,18 @@ def _transform_copy(source_file: str, def _execute_template_json(json_data: dict, - destination_path: str, - template_path: str, + destination_path: pathlib.Path, + template_path: pathlib.Path, replacements: list, keep_license_text: bool = False) -> None: # create dirs first # for each createDirectory entry, transform the folder name for create_directory in json_data['createDirectories']: # construct the new folder name - new_dir = f"{destination_path}/{create_directory['dir']}" + new_dir = destination_path / create_directory['dir'] # transform the folder name - new_dir = _transform(new_dir, replacements, keep_license_text) + new_dir = _transform(new_dir.as_posix(), replacements, keep_license_text) # create the folder os.makedirs(new_dir, exist_ok=True) @@ -178,7 +177,7 @@ def _execute_template_json(json_data: dict, # regular copy if not templated for copy_file in json_data['copyFiles']: # construct the input file name - in_file = f"{template_path}/Template/{copy_file['file']}" + in_file = template_path / 'Template' /copy_file['file'] # the file can be marked as optional, if it is and it does not exist skip if copy_file['isOptional'] and copy_file['isOptional'] == 'true': @@ -186,10 +185,10 @@ def _execute_template_json(json_data: dict, continue # construct the output file name - out_file = f"{destination_path}/{copy_file['file']}" + out_file = destination_path / copy_file['file'] # transform the output file name - out_file = _transform(out_file, replacements, keep_license_text) + out_file = _transform(out_file.as_posix(), replacements, keep_license_text) # if for some reason the output folder for this file was not created above do it now os.makedirs(os.path.dirname(out_file), exist_ok=True) @@ -205,35 +204,35 @@ def _execute_restricted_template_json(json_data: dict, restricted_platform: str, destination_name, template_name, - destination_path: str, - destination_restricted_path: str, - template_restricted_path: str, - destination_restricted_platform_relative_path: str, - template_restricted_platform_relative_path: str, + destination_path: pathlib.Path, + destination_restricted_path: pathlib.Path, + template_restricted_path: pathlib.Path, + destination_restricted_platform_relative_path: pathlib.Path, + template_restricted_platform_relative_path: pathlib.Path, replacements: list, keep_restricted_in_instance: bool = False, keep_license_text: bool = False) -> None: # if we are not keeping restricted in instance make restricted.json if not present if not keep_restricted_in_instance: - restricted_json = f"{destination_restricted_path}/restricted.json".replace('//', '/') + restricted_json = destination_restricted_path / 'restricted.json' os.makedirs(os.path.dirname(restricted_json), exist_ok=True) if not os.path.isfile(restricted_json): with open(restricted_json, 'w') as s: restricted_json_data = {} restricted_json_data.update({"restricted_name": destination_name}) - s.write(json.dumps(restricted_json_data, indent=4)) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') # create dirs first # for each createDirectory entry, transform the folder name for create_directory in json_data['createDirectories']: # construct the new folder name - new_dir = f"{destination_restricted_path}/{restricted_platform}/{destination_restricted_platform_relative_path}/{destination_name}/{create_directory['dir']}".replace( - '//', '/') + new_dir = destination_restricted_path / restricted_platform / destination_restricted_platform_relative_path\ + / destination_name / create_directory['dir'] if keep_restricted_in_instance: - new_dir = f"{destination_path}/{create_directory['origin']}".replace('//', '/') + new_dir = destination_path / create_directory['origin'] # transform the folder name - new_dir = _transform(new_dir, replacements, keep_license_text) + new_dir = _transform(new_dir.as_posix(), replacements, keep_license_text) # create the folder os.makedirs(new_dir, exist_ok=True) @@ -242,8 +241,8 @@ def _execute_restricted_template_json(json_data: dict, # regular copy if not templated for copy_file in json_data['copyFiles']: # construct the input file name - in_file = f"{template_restricted_path}/{restricted_platform}/{template_restricted_platform_relative_path}/{template_name}/Template/{copy_file['file']}".replace( - '//', '/') + in_file = template_restricted_path / restricted_platform / template_restricted_platform_relative_path\ + / template_name / 'Template'/ copy_file['file'] # the file can be marked as optional, if it is and it does not exist skip if copy_file['isOptional'] and copy_file['isOptional'] == 'true': @@ -251,13 +250,13 @@ def _execute_restricted_template_json(json_data: dict, continue # construct the output file name - out_file = f"{destination_restricted_path}/{restricted_platform}/{destination_restricted_platform_relative_path}/{destination_name}/{copy_file['file']}".replace( - '//', '/') + out_file = destination_restricted_path / restricted_platform / destination_restricted_platform_relative_path\ + / destination_name / copy_file['file'] if keep_restricted_in_instance: - out_file = f"{destination_path}/{copy_file['origin']}".replace('//', '/') + out_file = destination_path / copy_file['origin'] # transform the output file name - out_file = _transform(out_file, replacements, keep_license_text) + out_file = _transform(out_file.as_posix(), replacements, keep_license_text) # if for some reason the output folder for this file was not created above do it now os.makedirs(os.path.dirname(out_file), exist_ok=True) @@ -272,12 +271,12 @@ def _execute_restricted_template_json(json_data: dict, def _instantiate_template(template_json_data: dict, destination_name: str, template_name: str, - destination_path: str, - template_path: str, - destination_restricted_path: str, - template_restricted_path: str, - destination_restricted_platform_relative_path: str, - template_restricted_platform_relative_path: str, + destination_path: pathlib.Path, + template_path: pathlib.Path, + destination_restricted_path: pathlib.Path, + template_restricted_path: pathlib.Path, + destination_restricted_platform_relative_path: pathlib.Path, + template_restricted_platform_relative_path: pathlib.Path, replacements: list, keep_restricted_in_instance: bool = False, keep_license_text: bool = False) -> int: @@ -316,9 +315,9 @@ def _instantiate_template(template_json_data: dict, for restricted_platform in os.listdir(template_restricted_path): if os.path.isfile(restricted_platform): continue - template_restricted_platform = f'{template_restricted_path}/{restricted_platform}' - template_restricted_platform_path_rel = f'{template_restricted_platform}/{template_restricted_platform_relative_path}/{template_name}' - platform_json = f'{template_restricted_platform_path_rel}/{template_file_name}'.replace('//', '/') + template_restricted_platform = template_restricted_path / restricted_platform + template_restricted_platform_path_rel = template_restricted_platform / template_restricted_platform_relative_path / template_name + platform_json = template_restricted_platform_path_rel / template_file_name if os.path.isfile(platform_json): if not validation.valid_o3de_template_json(platform_json): @@ -349,17 +348,18 @@ def _instantiate_template(template_json_data: dict, return 0 -def create_template(source_path: str, - template_path: str, - source_restricted_path: str = None, +def create_template(source_path: pathlib.Path, + template_path: pathlib.Path, + source_restricted_path: pathlib.Path = None, source_restricted_name: str = None, - template_restricted_path: str = None, + template_restricted_path: pathlib.Path = None, template_restricted_name: str = None, - source_restricted_platform_relative_path: str = None, - template_restricted_platform_relative_path: str = None, + source_restricted_platform_relative_path: pathlib.Path = None, + template_restricted_platform_relative_path: pathlib.Path = None, keep_restricted_in_template: bool = False, keep_license_text: bool = False, - replace: list = None) -> int: + replace: list = None, + force: bool = False) -> int: """ Create a template from a source directory using replacement @@ -382,6 +382,7 @@ def create_template(source_path: str, Templated files can have license blocks starting with {BEGIN_LICENSE} and ending with {END_LICENSE}, this controls if you want to keep the license text from the template in the new instance. It is false by default because most people will not want license text in their instances. + :param force Overrides existing files even if they exist :return: 0 for success or non 0 failure code """ @@ -389,24 +390,23 @@ def create_template(source_path: str, if not source_path: logger.error('Src path cannot be empty.') return 1 - source_path = source_path.replace('\\', '/') if not os.path.isdir(source_path): logger.error(f'Src path {source_path} is not a folder.') return 1 # source_name is now the last component of the source_path source_name = os.path.basename(source_path) + sanitized_source_name = utils.sanitize_identifier_for_cpp(source_name) # if no template path, error if not template_path: logger.info(f'Template path empty. Using source name {source_name}') template_path = source_name - template_path = template_path.replace('\\', '/') if not os.path.isabs(template_path): default_templates_folder = manifest.get_registered(default_folder='templates') - template_path = f'{default_templates_folder}/{template_path}' + template_path = default_templates_folder/ template_path logger.info(f'Template path not a full path. Using default templates folder {template_path}') - if os.path.isdir(template_path): + if not force and os.path.isdir(template_path): logger.error(f'Template path {template_path} already exists.') return 1 @@ -423,9 +423,8 @@ def create_template(source_path: str, # source_restricted_path if source_restricted_path: - source_restricted_path = source_restricted_path.replace('\\', '/') if not os.path.isabs(source_restricted_path): - engine_json = f'{manifest.get_this_engine_path()}/engine.json' + engine_json = manifest.get_this_engine_path() / 'engine.json' if not validation.valid_o3de_engine_json(engine_json): logger.error(f"Engine json {engine_json} is not valid.") return 1 @@ -441,7 +440,7 @@ def create_template(source_path: str, logger.error(f"Engine json {engine_json} restricted not found.") return 1 engine_restricted_folder = manifest.get_registered(restricted_name=engine_restricted) - new_source_restricted_path = f'{engine_restricted_folder}/{source_restricted_path}' + new_source_restricted_path = engine_restricted_folder / source_restricted_path logger.info(f'Source restricted path {source_restricted_path} not a full path. We must assume this engines' f' restricted folder {new_source_restricted_path}') if not os.path.isdir(source_restricted_path): @@ -456,10 +455,9 @@ def create_template(source_path: str, # template_restricted_path if template_restricted_path: - template_restricted_path = template_restricted_path.replace('\\', '/') if not os.path.isabs(template_restricted_path): default_templates_restricted_folder = manifest.get_registered(restricted_name='templates') - new_template_restricted_path = f'{default_templates_restricted_folder}/{template_restricted_path}' + new_template_restricted_path = default_templates_restricted_folder / template_restricted_path logger.info(f'Template restricted path {template_restricted_path} not a full path. We must assume the' f' default templates restricted folder {new_template_restricted_path}') template_restricted_path = new_template_restricted_path @@ -467,7 +465,7 @@ def create_template(source_path: str, if os.path.isdir(template_restricted_path): # see if this is already a restricted path, if it is get the "restricted_name" from the restricted json # so we can set "restricted_name" to it for this template - restricted_json = f'{template_restricted_path}/restricted.json' + restricted_json = template_restricted_path / 'restricted.json' if os.path.isfile(restricted_json): if not validation.valid_o3de_restricted_json(restricted_json): logger.error(f'{restricted_json} is not valid.') @@ -484,18 +482,14 @@ def create_template(source_path: str, logger.error(f'Failed to read restricted_name from {restricted_json}') return 1 else: - os.makedirs(template_restricted_path) + os.makedirs(template_restricted_path, exist_ok=True) # source restricted relative - if source_restricted_platform_relative_path: - source_restricted_platform_relative_path = source_restricted_platform_relative_path.replace('\\', '/') - else: + if not source_restricted_platform_relative_path: source_restricted_platform_relative_path = '' # template restricted relative - if template_restricted_platform_relative_path: - template_restricted_platform_relative_path = template_restricted_platform_relative_path.replace('\\', '/') - else: + if not template_restricted_platform_relative_path: template_restricted_platform_relative_path = '' logger.info(f'Processing Src: {source_path}') @@ -513,8 +507,9 @@ def create_template(source_path: str, replacements.append((source_name.lower(), '${NameLower}')) replacements.append((source_name.upper(), '${NameUpper}')) replacements.append((source_name, '${Name}')) + replacements.append((sanitized_source_name, '${SanitizedCppName}')) - def _transform_into_template(s_data: object) -> (bool, object): + def _transform_into_template(s_data: object) -> (bool, str): """ Internal function to transform any data into templated data :param s_data: the input data, this could be file data or file name data @@ -522,18 +517,18 @@ def create_template(source_path: str, t_data: potentially transformed data 0 for success or non 0 failure code """ # copy the src data to the transformed data, then operate only on transformed data - t_data = s_data + t_data = str(s_data) # run all the replacements for replacement in replacements: t_data = t_data.replace(replacement[0], replacement[1]) if not keep_license_text: - t_data = re.sub(r"(//|'''|#)\s*{BEGIN_LICENSE}((.|\n)*){END_LICENSE}\n", "", t_data, flags=re.DOTALL) + t_data = _replace_license_text(t_data) # See if this file has the ModuleClassId try: - pattern = r'.*AZ_RTTI\(\$\{Name\}Module, \"(?P\{.*-.*-.*-.*-.*\})\", AZ::Module' + pattern = r'.*AZ_RTTI\(\$\{SanitizedCppName\}Module, \"(?P\{.*-.*-.*-.*-.*\})\",' module_class_id = re.search(pattern, t_data).group('ModuleClassId') replacements.append((module_class_id, '${ModuleClassId}')) t_data = t_data.replace(module_class_id, '${ModuleClassId}') @@ -542,7 +537,7 @@ def create_template(source_path: str, # See if this file has the SysCompClassId try: - pattern = r'.*AZ_COMPONENT\(\$\{Name\}SystemComponent, \"(?P\{.*-.*-.*-.*-.*\})\"' + pattern = r'.*AZ_COMPONENT\(\$\{SanitizedCppName\}SystemComponent, \"(?P\{.*-.*-.*-.*-.*\})\"' sys_comp_class_id = re.search(pattern, t_data).group('SysCompClassId') replacements.append((sys_comp_class_id, '${SysCompClassId}')) t_data = t_data.replace(sys_comp_class_id, '${SysCompClassId}') @@ -551,7 +546,7 @@ def create_template(source_path: str, # See if this file has the EditorSysCompClassId try: - pattern = r'.*AZ_COMPONENT\(\$\{Name\}EditorSystemComponent, \"(?P\{.*-.*-.*-.*-.*\})\"' + pattern = r'.*AZ_COMPONENT\(\$\{SanitizedCppName\}EditorSystemComponent, \"(?P\{.*-.*-.*-.*-.*\})\"' editor_sys_comp_class_id = re.search(pattern, t_data).group('EditorSysCompClassId') replacements.append((editor_sys_comp_class_id, '${EditorSysCompClassId}')) t_data = t_data.replace(editor_sys_comp_class_id, '${EditorSysCompClassId}') @@ -595,10 +590,10 @@ def create_template(source_path: str, else: return False, t_data - def _transform_restricted_into_copyfiles_and_createdirs(source_path: str, + def _transform_restricted_into_copyfiles_and_createdirs(source_path: pathlib.Path, restricted_platform: str, - root_abs: str, - path_abs: str = None) -> None: + root_abs: pathlib.Path, + path_abs: pathlib.Path = None) -> None: """ Internal function recursively called to transform any paths files into copyfiles and create dirs relative to the root. This will transform and copy the files, and save the copyfiles and createdirs data, no not save it @@ -613,10 +608,13 @@ def create_template(source_path: str, for entry in entries: # create the absolute entry by joining the path_abs and the entry - entry_abs = f'{path_abs}/{entry}' + entry_abs = path_abs / entry # create the relative entry by removing the root_abs - entry_rel = entry_abs.replace(root_abs + '/', '') + try: + entry_rel = entry_abs.relative_to(root_abs) + except ValueError as err: + logger.warning(f'Unable to create relative path: {str(err)}') # report what file we are processing so we have a good idea if it breaks on what file it broke on logger.info(f'Processing file: {entry_abs}') @@ -628,8 +626,8 @@ def create_template(source_path: str, # C:/repo/Lumberyard/restricted/Jasper/TestDP/CMakeLists.txt -> # C:/repo/Lumberyard/TestDP/Platform/Jasper/CMakeLists.txt # - _, origin_entry_rel = _transform_into_template(entry_rel) - components = origin_entry_rel.split('/') + _, origin_entry_rel = _transform_into_template(entry_rel.as_posix()) + components = list(origin_entry_rel.parts) num_components = len(components) # see how far along the source path the restricted folder matches @@ -656,29 +654,24 @@ def create_template(source_path: str, after.append(components[num_components - 1]) before.append("Platform") - warn_if_not_platform = f'{source_path}/{"/".join(before)}' + warn_if_not_platform = source_path / pathlib.Path(*before) before.append(restricted_platform) before.extend(after) - origin_entry_rel = '/'.join(before) + origin_entry_rel = pathlib.Path(*before) if not os.path.isdir(warn_if_not_platform): logger.warning( f'{entry_abs} -> {origin_entry_rel}: Other Platforms not found in {warn_if_not_platform}') destination_entry_rel = origin_entry_rel - destination_entry_abs = f'{template_path}/Template/{origin_entry_rel}' - - # clean up any collapsed folders - origin_entry_rel = origin_entry_rel.replace('//', '/') - destination_entry_abs = destination_entry_abs.replace('//', '/') - destination_entry_rel = destination_entry_rel.replace('//', '/') + destination_entry_abs = template_path / 'Template' / origin_entry_rel # clean up any relative leading slashes - while origin_entry_rel.startswith('/'): - origin_entry_rel = origin_entry_rel[1:] - while destination_entry_rel.startswith('/'): - destination_entry_rel = destination_entry_rel[1:] + if origin_entry_rel.as_posix().startswith('/'): + origin_entry_rel = pathlib.Path(origin_entry_rel.as_posix().lstrip('/')) + if destination_entry_rel.as_posix().startswith('/'): + destination_entry_rel = pathlib.Path(destination_entry_rel.as_posix().lstrip('/')) # make sure the dst folder may or may not exist yet, make sure it does exist before we transform # data into it @@ -735,8 +728,8 @@ def create_template(source_path: str, _transform_restricted_into_copyfiles_and_createdirs(source_path, restricted_platform, root_abs, entry_abs) - def _transform_dir_into_copyfiles_and_createdirs(root_abs: str, - path_abs: str = None) -> None: + def _transform_dir_into_copyfiles_and_createdirs(root_abs: pathlib.Path, + path_abs: pathlib.Path = None) -> None: """ Internal function recursively called to transform any paths files into copyfiles and create dirs relative to the root. This will transform and copy the files, and save the copyfiles and createdirs data, no not save it @@ -751,10 +744,14 @@ def create_template(source_path: str, for entry in entries: # create the absolute entry by joining the path_abs and the entry - entry_abs = f'{path_abs}/{entry}' + entry_abs = path_abs / entry # create the relative entry by removing the root_abs - entry_rel = entry_abs.replace(root_abs + '/', '') + entry_rel = entry_abs + try: + entry_rel = entry_abs.relative_to(root_abs) + except ValueError as err: + logger.warning(f'Unable to create relative path: {str(err)}') # report what file we are processing so we have a good idea if it breaks on what file it broke on logger.info(f'Processing file: {entry_abs}') @@ -763,7 +760,7 @@ def create_template(source_path: str, # then at the end we can save the restricted ones separately found_platform = '' platform = False - if not keep_restricted_in_template and '/Platform' in entry_abs: + if not keep_restricted_in_template and 'Platform' in entry_abs.parts: platform = True try: # the name of the Platform should follow the '/Platform/' @@ -787,7 +784,7 @@ def create_template(source_path: str, # Now if we found a platform and still have a found_platform which is a restricted platform # then transform the entry relative name into a dst relative entry name and dst abs entry. # if not then create a normal relative and abs dst entry name - _, origin_entry_rel = _transform_into_template(entry_rel) + _, origin_entry_rel = _transform_into_template(entry_rel.as_posix()) if platform and found_platform in restricted_platforms: # if we don't have a template restricted path and we found restricted files... warn and skip # the file/dir @@ -795,21 +792,22 @@ def create_template(source_path: str, logger.warning("Restricted platform files found!!! {entry_rel}, {found_platform}") continue _, destination_entry_rel = _transform_into_template_restricted_filename(entry_rel, found_platform) - destination_entry_abs = f'{template_restricted_path}/{found_platform}/{template_restricted_platform_relative_path}/{template_name}/Template/{destination_entry_rel}' + destination_entry_abs = template_restricted_path / found_platform\ + / template_restricted_platform_relative_path / template_name / 'Template'\ + / destination_entry_rel else: destination_entry_rel = origin_entry_rel - destination_entry_abs = f'{template_path}/Template/{destination_entry_rel}' - - # clean up any collapsed folders - origin_entry_rel = origin_entry_rel.replace('//', '/') - destination_entry_abs = destination_entry_abs.replace('//', '/') - destination_entry_rel = destination_entry_rel.replace('//', '/') + destination_entry_abs = template_path / 'Template' / destination_entry_rel # clean up any relative leading slashes - while origin_entry_rel.startswith('/'): - origin_entry_rel = origin_entry_rel[1:] - while destination_entry_rel.startswith('/'): - destination_entry_rel = destination_entry_rel[1:] + if isinstance(origin_entry_rel, pathlib.Path): + origin_entry_rel = origin_entry_rel.as_posix() + if origin_entry_rel.startswith('/'): + origin_entry_rel = pathlib.Path(origin_entry_rel.lstrip('/')) + if isinstance(destination_entry_rel, pathlib.Path): + destination_entry_rel = destination_entry_rel.as_posix() + if destination_entry_rel.startswith('/'): + destination_entry_rel = pathlib.Path(destination_entry_rel.lstrip('/')) # make sure the dst folder may or may not exist yet, make sure it does exist before we transform # data into it @@ -905,8 +903,8 @@ def create_template(source_path: str, # run the transformation on each src restricted folder if source_restricted_path: for restricted_platform in os.listdir(source_restricted_path): - restricted_platform_src_path_abs = f'{source_restricted_path}/{restricted_platform}/{source_restricted_platform_relative_path}/{source_name}'.replace( - '//', '/') + restricted_platform_src_path_abs = source_restricted_path / restricted_platform\ + / source_restricted_platform_relative_path / source_name if os.path.isdir(restricted_platform_src_path_abs): _transform_restricted_into_copyfiles_and_createdirs(source_path, restricted_platform, restricted_platform_src_path_abs) @@ -934,17 +932,14 @@ def create_template(source_path: str, json_data.update({'copyFiles': copy_files}) json_data.update({'createDirectories': create_dirs}) - json_name = f'{template_path}/{template_file_name}' + json_name = template_path / template_file_name - # if the json file we are about to write already exists for some reason, delete it - if os.path.isfile(json_name): - os.unlink(json_name) - with open(json_name, 'w') as s: - s.write(json.dumps(json_data, indent=4)) + with json_name.open('w') as s: + s.write(json.dumps(json_data, indent=4) + '\n') # copy the default preview.png - preview_png_src = f'{this_script_parent}/resources/preview.png' - preview_png_dst = f'{template_path}/Template/preview.png' + preview_png_src = this_script_parent / 'resources' /' preview.png' + preview_png_dst = template_path / 'Template' / 'preview.png' if not os.path.isfile(preview_png_dst): shutil.copy(preview_png_src, preview_png_dst) @@ -955,8 +950,8 @@ def create_template(source_path: str, if template_restricted_path: # now write out each restricted platform template json separately for restricted_platform in restricted_platform_entries: - restricted_template_path = f'{template_restricted_path}/{restricted_platform}/{template_restricted_platform_relative_path}/{template_name}'.replace( - '//', '/') + restricted_template_path = template_restricted_path / restricted_platform\ + / template_restricted_platform_relative_path / template_name # sort restricted_platform_entries[restricted_platform]['copyFiles'].sort(key=lambda x: x['file']) @@ -976,34 +971,32 @@ def create_template(source_path: str, json_data.update({'copyFiles': restricted_platform_entries[restricted_platform]['copyFiles']}) json_data.update({'createDirectories': restricted_platform_entries[restricted_platform]['createDirs']}) - json_name = f'{restricted_template_path}/{template_file_name}' + json_name = restricted_template_path / template_file_name os.makedirs(os.path.dirname(json_name), exist_ok=True) - # if the json file we are about to write already exists for some reason, delete it - if os.path.isfile(json_name): - os.unlink(json_name) - with open(json_name, 'w') as s: - s.write(json.dumps(json_data, indent=4)) + with json_name.open('w') as s: + s.write(json.dumps(json_data, indent=4) + '\n') - preview_png_dst = f'{restricted_template_path}/Template/preview.png' + preview_png_dst = restricted_template_path / 'Template' /' preview.png' if not os.path.isfile(preview_png_dst): shutil.copy(preview_png_src, preview_png_dst) return 0 -def create_from_template(destination_path: str, - template_path: str = None, +def create_from_template(destination_path: pathlib.Path, + template_path: pathlib.Path = None, template_name: str = None, - destination_restricted_path: str = None, + destination_restricted_path: pathlib.Path = None, destination_restricted_name: str = None, - template_restricted_path: str = None, + template_restricted_path: pathlib.Path = None, template_restricted_name: str = None, - destination_restricted_platform_relative_path: str = None, - template_restricted_platform_relative_path: str = None, + destination_restricted_platform_relative_path: pathlib.Path = None, + template_restricted_platform_relative_path: pathlib.Path = None, keep_restricted_in_instance: bool = False, keep_license_text: bool = False, - replace: list = None) -> int: + replace: list = None, + force: bool = False) -> int: """ Generic template instantiation for non o3de object templates. This function makes NO assumptions! Assumptions are made only for specializations like create_project or create_gem etc... So this function @@ -1026,6 +1019,7 @@ def create_from_template(destination_path: str, :param replace: optional list of strings uses to make concrete names out of templated parameters. X->Y pairs Ex. ${Name},TestGem,${Player},TestGemPlayer This will cause all references to ${Name} be replaced by TestGem, and all ${Player} replaced by 'TestGemPlayer' + :param force Overrides existing files even if they exist :return: 0 for success or non 0 failure code """ if template_name and template_path: @@ -1057,7 +1051,7 @@ def create_from_template(destination_path: str, template_folder_name = os.path.basename(template_path) # the template.json should be in the template_path, make sure it's there a nd valid - template_json = f'{template_path}/template.json' + template_json = template_path / 'template.json' if not validation.valid_o3de_template_json(template_json): logger.error(f'Template json {template_path} is invalid.') return 1 @@ -1116,7 +1110,6 @@ def create_from_template(destination_path: str, # The user has supplied the --template-restricted-path, see if that matches the template specifies. # If it does then we do not have a problem. If it doesn't match then error out. If not specified # in the template then warn and use the --template-restricted-path - template_restricted_path = template_restricted_path.replace('\\', '/') try: template_json_restricted_name = template_json_data['restricted_name'] except KeyError as e: @@ -1148,11 +1141,9 @@ def create_from_template(destination_path: str, # If not supplied and not in the template set empty string. if template_restricted_platform_relative_path: # The user specified a --template-restricted-platform-relative-path - template_restricted_platform_relative_path = template_restricted_platform_relative_path.replace( - '\\', '/') try: - template_json_restricted_platform_relative_path = template_json_data[ - 'restricted_platform_relative_path'] + template_json_restricted_platform_relative_path = pathlib.Path( + template_json_data['restricted_platform_relative_path']) except KeyError as e: # the template json doesn't have a 'restricted_platform_relative_path' element warn and use it logger.info(f'The template does not specify a "restricted_platform_relative_path".' @@ -1161,19 +1152,20 @@ def create_from_template(destination_path: str, # the template has a 'restricted_platform_relative_path', if it matches we are fine, if not # something is wrong with either the --template-restricted-platform-relative or the template is. if template_restricted_platform_relative_path != template_json_restricted_platform_relative_path: - logger.error(f'The supplied --template-restricted-platform-relative-path does not match the' - f' templates "restricted_platform_relative_path". Either' - f' --template-restricted-platform-relative-path is incorrect or the templates' - f' "restricted_platform_relative_path" is wrong. Note that since this template' - f' specifies "restricted_platform_relative_path" it need not be supplied and' - f' {template_json_restricted_platform_relative_path} will be used.') + logger.error(f'The supplied --template-restricted-platform-relative-path' + f' "{template_restricted_platform_relative_path}" does not match the' + f' templates.json "restricted_platform_relative_path". Either' + f' --template-restricted-platform-relative-path is incorrect or the templates' + f' "restricted_platform_relative_path" is wrong. Note that since this template' + f' specifies "restricted_platform_relative_path" it need not be supplied and' + f' "{template_json_restricted_platform_relative_path}" will be used.') return 1 else: # The user has not supplied --template-restricted-platform-relative-path, try to read it from # the template json. try: - template_restricted_platform_relative_path = template_json_data[ - 'restricted_platform_relative_path'] + template_restricted_platform_relative_path = pathlib.Path( + template_json_data['restricted_platform_relative_path']) except KeyError as e: # The template json doesn't have a 'restricted_platform_relative_path' element, set empty string. template_restricted_platform_relative_path = '' @@ -1185,12 +1177,11 @@ def create_from_template(destination_path: str, if not destination_path: logger.error('Destination path cannot be empty.') return 1 - destination_path = destination_path.replace('\\', '/') - if os.path.isdir(destination_path): + if not force and os.path.isdir(destination_path): logger.error(f'Destination path {destination_path} already exists.') return 1 else: - os.makedirs(destination_path) + os.makedirs(destination_path, exist_ok=force) # destination name is now the last component of the destination_path destination_name = os.path.basename(destination_path) @@ -1206,23 +1197,20 @@ def create_from_template(destination_path: str, # destination restricted path elif destination_restricted_path: - destination_restricted_path = destination_restricted_path.replace('\\', '/') if os.path.isabs(destination_restricted_path): restricted_default_path = manifest.get_registered(default='restricted') - new_destination_restricted_path = f'{restricted_default_path}/{destination_restricted_path}' + new_destination_restricted_path = restricted_default_path / destination_restricted_path logger.info(f'{destination_restricted_path} is not a full path, making it relative' f' to default restricted path = {new_destination_restricted_path}') destination_restricted_path = new_destination_restricted_path elif template_restricted_path: - restricted_default_path = manifest.get_registered(default='restricted') + restricted_default_path = manifest.get_registered(restricted_name='restricted') logger.info(f'--destination-restricted-path is not specified, using default restricted path / destination name' f' = {restricted_default_path}') destination_restricted_path = restricted_default_path # destination restricted relative - if destination_restricted_platform_relative_path: - destination_restricted_platform_relative_path = destination_restricted_platform_relative_path.replace('\\', '/') - else: + if not destination_restricted_platform_relative_path: destination_restricted_platform_relative_path = '' # any user supplied replacements @@ -1265,34 +1253,35 @@ def create_from_template(destination_path: str, os.makedirs(destination_restricted_path, exist_ok=True) # read the restricted_name from the destination restricted.json - restricted_json = f"{destination_restricted_path}/restricted.json".replace('//', '/') + restricted_json = destination_restricted_path / restricted.json if not os.path.isfile(restricted_json): with open(restricted_json, 'w') as s: restricted_json_data = {} restricted_json_data.update({'restricted_name': destination_name}) - s.write(json.dumps(restricted_json_data, indent=4)) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') logger.warning(f'Instantiation successful. NOTE: This is a generic instantiation of the template. If this' - f' was a template of an o3de object like a project, gem, template, etc. then you should have used' - f' specialization that knows how to link that object type via its project.json or gem.json, etc.' + f' was a template of an o3de object like a project, gem, template, etc. then the create-project' + f' or create-gem command can be used to register the object type via its project.json or gem.json, etc.' f' Create from template is meant only to instance a template of a non o3de object.') return 0 -def create_project(project_path: str, +def create_project(project_path: pathlib.Path, project_name: str = None, - template_path: str = None, + template_path: pathlib.Path = None, template_name: str = None, - project_restricted_path: str = None, + project_restricted_path: pathlib.Path = None, project_restricted_name: str = None, - template_restricted_path: str = None, + template_restricted_path: pathlib.Path = None, template_restricted_name: str = None, - project_restricted_platform_relative_path: str = None, - template_restricted_platform_relative_path: str = None, + project_restricted_platform_relative_path: pathlib.Path = None, + template_restricted_platform_relative_path: pathlib.Path = None, keep_restricted_in_project: bool = False, keep_license_text: bool = False, replace: list = None, + force: bool = False, system_component_class_id: str = None, editor_system_component_class_id: str = None, module_id: str = None) -> int: @@ -1318,6 +1307,7 @@ def create_project(project_path: str, :param replace: optional list of strings uses to make concrete names out of templated parameters. X->Y pairs Ex. ${Name},TestGem,${Player},TestGemPlayer This will cause all references to ${Name} be replaced by TestGem, and all ${Player} replaced by 'TestGemPlayer' + :param force Overrides existing files even if they exist :param system_component_class_id: optionally specify a uuid for the system component class, default is random uuid :param editor_system_component_class_id: optionally specify a uuid for the editor system component class, default is random uuid @@ -1354,7 +1344,7 @@ def create_project(project_path: str, template_folder_name = os.path.basename(template_path) # the template.json should be in the template_path, make sure it's there and valid - template_json = f'{template_path}/template.json' + template_json = template_path / 'template.json' if not validation.valid_o3de_template_json(template_json): logger.error(f'Template json {template_path} is not valid.') return 1 @@ -1413,7 +1403,6 @@ def create_project(project_path: str, # The user has supplied the --template-restricted-path, see if that matches the template specifies. # If it does then we do not have a problem. If it doesn't match then error out. If not specified # in the template then warn and use the --template-restricted-path - template_restricted_path = template_restricted_path.replace('\\', '/') try: template_json_restricted_name = template_json_data['restricted_name'] except KeyError as e: @@ -1445,10 +1434,9 @@ def create_project(project_path: str, # If not supplied and not in the template set empty string. if template_restricted_platform_relative_path: # The user specified a --template-restricted-platform-relative-path - template_restricted_platform_relative_path = template_restricted_platform_relative_path.replace('\\', '/') try: - template_json_restricted_platform_relative_path = template_json_data[ - 'restricted_platform_relative_path'] + template_json_restricted_platform_relative_path = pathlib.Path( + template_json_data['restricted_platform_relative_path']) except KeyError as e: # the template json doesn't have a 'restricted_platform_relative_path' element warn and use it logger.info(f'The template does not specify a "restricted_platform_relative_path".' @@ -1457,19 +1445,20 @@ def create_project(project_path: str, # the template has a 'restricted_platform_relative_path', if it matches we are fine, if not # something is wrong with either the --template-restricted-platform-relative or the template is. if template_restricted_platform_relative_path != template_json_restricted_platform_relative_path: - logger.error(f'The supplied --template-restricted-platform-relative-path does not match the' - f' templates "restricted_platform_relative_path". Either' + logger.error(f'The supplied --template-restricted-platform-relative-path' + f' "{template_restricted_platform_relative_path}" does not match the' + f' templates.json "restricted_platform_relative_path". Either' f' --template-restricted-platform-relative-path is incorrect or the templates' f' "restricted_platform_relative_path" is wrong. Note that since this template' f' specifies "restricted_platform_relative_path" it need not be supplied and' - f' {template_json_restricted_platform_relative_path} will be used.') + f' "{template_json_restricted_platform_relative_path}" will be used.') return 1 else: # The user has not supplied --template-restricted-platform-relative-path, try to read it from # the template json. try: - template_restricted_platform_relative_path = template_json_data[ - 'restricted_platform_relative_path'] + template_restricted_platform_relative_path = pathlib.Path( + template_json_data['restricted_platform_relative_path']) except KeyError as e: # The template json doesn't have a 'restricted_platform_relative_path' element, set empty string. template_restricted_platform_relative_path = '' @@ -1480,18 +1469,17 @@ def create_project(project_path: str, if not project_path: logger.error('Project path cannot be empty.') return 1 - project_path = project_path.replace('\\', '/') if not os.path.isabs(project_path): default_projects_folder = manifest.get_registered(default_folder='projects') - new_project_path = f'{default_projects_folder}/{project_path}' + new_project_path = default_projects_folder / project_path logger.info(f'Project Path {project_path} is not a full path, we must assume its relative' f' to default projects path = {new_project_path}') project_path = new_project_path - if os.path.isdir(project_path) and len(os.listdir(project_path)) > 0: + if not force and os.path.isdir(project_path) and len(os.listdir(project_path)) > 0: logger.error(f'Project path {project_path} already exists and is not empty.') return 1 elif not os.path.isdir(project_path): - os.makedirs(project_path) + os.makedirs(project_path, exist_ok=force) if not project_name: # project name is now the last component of the project_path @@ -1512,10 +1500,9 @@ def create_project(project_path: str, # project restricted path elif project_restricted_path: - project_restricted_path = project_restricted_path.replace('\\', '/') if not os.path.isabs(project_restricted_path): default_projects_restricted_folder = manifest.get_registered(restricted_name='projects') - new_project_restricted_path = f'{default_projects_restricted_folder}/{project_restricted_path}' + new_project_restricted_path = default_projects_restricted_folder/ project_restricted_path logger.info(f'Project restricted path {project_restricted_path} is not a full path, we must assume its' f' relative to default projects restricted path = {new_project_restricted_path}') project_restricted_path = new_project_restricted_path @@ -1526,9 +1513,7 @@ def create_project(project_path: str, project_restricted_path = project_restricted_default_path # project restricted relative path - if project_restricted_platform_relative_path: - project_restricted_platform_relative_path = project_restricted_platform_relative_path.replace('\\', '/') - else: + if not project_restricted_platform_relative_path: project_restricted_platform_relative_path = '' # any user supplied replacements @@ -1597,7 +1582,7 @@ def create_project(project_path: str, os.makedirs(project_restricted_path, exist_ok=True) # read the restricted_name from the projects restricted.json - restricted_json = f"{project_restricted_path}/restricted.json".replace('//', '/') + restricted_json = project_restricted_path / 'restricted.json' if os.path.isfile(restricted_json): if not validation.valid_o3de_restricted_json(restricted_json): logger.error(f'Restricted json {restricted_json} is not valid.') @@ -1606,7 +1591,7 @@ def create_project(project_path: str, with open(restricted_json, 'w') as s: restricted_json_data = {} restricted_json_data.update({'restricted_name': project_name}) - s.write(json.dumps(restricted_json_data, indent=4)) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') with open(restricted_json, 'r') as s: try: @@ -1622,7 +1607,7 @@ def create_project(project_path: str, return 1 # set the "restricted_name": "restricted_name" element of the project.json - project_json = f"{project_path}/project.json".replace('//', '/') + project_json = project_path / 'project.json' if not validation.valid_o3de_project_json(project_json): logger.error(f'Project json {project_json} is not valid.') return 1 @@ -1638,15 +1623,15 @@ def create_project(project_path: str, os.unlink(project_json) with open(project_json, 'w') as s: try: - s.write(json.dumps(project_json_data, indent=4)) + s.write(json.dumps(project_json_data, indent=4) + '\n') except OSError as e: logger.error(f'Failed to write project json {project_json}.') return 1 for restricted_platform in restricted_platforms: - restricted_project = f'{project_restricted_path}/{restricted_platform}/{project_name}' + restricted_project = project_restricted_path / restricted_platform / project_name os.makedirs(restricted_project, exist_ok=True) - cmakelists_file_name = f'{restricted_project}/CMakeLists.txt' + cmakelists_file_name = restricted_project/ 'CMakeLists.txt' if not os.path.isfile(cmakelists_file_name): with open(cmakelists_file_name, 'w') as d: if keep_license_text: @@ -1675,10 +1660,14 @@ def create_project(project_path: str, return 1 project_json_data = manifest.get_project_json_data(project_path=project_path) + if not project_json_data: + # get_project_json_data already logs an error if the project.json is mising + return 1 + project_json_data.update({"engine": engine_name}) with open(project_json, 'w') as s: try: - s.write(json.dumps(project_json_data, indent=4)) + s.write(json.dumps(project_json_data, indent=4) + '\n') except OSError as e: logger.error(f'Failed to write project json at {project_path}.') return 1 @@ -1686,18 +1675,19 @@ def create_project(project_path: str, return 0 -def create_gem(gem_path: str, - template_path: str = None, +def create_gem(gem_path: pathlib.Path, + template_path: pathlib.Path = None, template_name: str = None, - gem_restricted_path: str = None, + gem_restricted_path: pathlib.Path = None, gem_restricted_name: str = None, - template_restricted_path: str = None, + template_restricted_path: pathlib.Path = None, template_restricted_name: str = None, - gem_restricted_platform_relative_path: str = None, - template_restricted_platform_relative_path: str = None, + gem_restricted_platform_relative_path: pathlib.Path = None, + template_restricted_platform_relative_path: pathlib.Path = None, keep_restricted_in_gem: bool = False, keep_license_text: bool = False, replace: list = None, + force: bool = False, system_component_class_id: str = None, editor_system_component_class_id: str = None, module_id: str = None) -> int: @@ -1722,6 +1712,7 @@ def create_gem(gem_path: str, :param replace: optional list of strings uses to make concrete names out of templated parameters. X->Y pairs Ex. ${Name},TestGem,${Player},TestGemPlayer This will cause all references to ${Name} be replaced by TestGem, and all ${Player} replaced by 'TestGemPlayer' + :param force Overrides existing files even if they exist :param system_component_class_id: optionally specify a uuid for the system component class, default is random uuid :param editor_system_component_class_id: optionally specify a uuid for the editor system component class, default is random uuid @@ -1754,7 +1745,7 @@ def create_gem(gem_path: str, template_folder_name = os.path.basename(template_path) # the template.json should be in the template_path, make sure it's there and valid - template_json = f'{template_path}/template.json' + template_json = template_path / 'template.json' if not validation.valid_o3de_template_json(template_json): logger.error(f'Template json {template_path} is not valid.') return 1 @@ -1812,7 +1803,6 @@ def create_gem(gem_path: str, # The user has supplied the --template-restricted-path, see if that matches the template specifies. # If it does then we do not have a problem. If it doesn't match then error out. If not specified # in the template then warn and use the --template-restricted-path - template_restricted_path = template_restricted_path.replace('\\', '/') try: template_json_restricted_name = template_json_data['restricted_name'] except KeyError as e: @@ -1843,10 +1833,9 @@ def create_gem(gem_path: str, # If not supplied and not in the template set empty string. if template_restricted_platform_relative_path: # The user specified a --template-restricted-platform-relative-path - template_restricted_platform_relative_path = template_restricted_platform_relative_path.replace('\\', '/') try: - template_json_restricted_platform_relative_path = template_json_data[ - 'restricted_platform_relative_path'] + template_json_restricted_platform_relative_path = pathlib.Path( + template_json_data['restricted_platform_relative_path']) except KeyError as e: # the template json doesn't have a 'restricted_platform_relative_path' element warn and use it logger.info(f'The template does not specify a "restricted_platform_relative_path".' @@ -1855,12 +1844,13 @@ def create_gem(gem_path: str, # the template has a 'restricted_platform_relative_path', if it matches we are fine, if not something is # wrong with either the --template-restricted-platform-relative or the template is if template_restricted_platform_relative_path != template_json_restricted_platform_relative_path: - logger.error(f'The supplied --template-restricted-platform-relative-path does not match the' - f' templates "restricted_platform_relative_path". Either' + logger.error(f'The supplied --template-restricted-platform-relative-path' + f' "{template_restricted_platform_relative_path}" does not match the' + f' templates.json "restricted_platform_relative_path". Either' f' --template-restricted-platform-relative-path is incorrect or the templates' f' "restricted_platform_relative_path" is wrong. Note that since this template' f' specifies "restricted_platform_relative_path" it need not be supplied and' - f' {template_json_restricted_platform_relative_path} will be used.') + f' "{template_json_restricted_platform_relative_path}" will be used.') return 1 else: # The user has not supplied --template-restricted-platform-relative-path, try to read it from @@ -1878,20 +1868,21 @@ def create_gem(gem_path: str, if not gem_path: logger.error('Gem path cannot be empty.') return 1 - gem_path = gem_path.replace('\\', '/') if not os.path.isabs(gem_path): default_gems_folder = manifest.get_registered(default_folder='gems') - new_gem_path = f'{default_gems_folder}/{gem_path}' + new_gem_path = default_gems_folder / gem_path logger.info(f'Gem Path {gem_path} is not a full path, we must assume its relative' f' to default gems path = {new_gem_path}') gem_path = new_gem_path - if os.path.isdir(gem_path): + if not force and os.path.isdir(gem_path): logger.error(f'Gem path {gem_path} already exists.') return 1 else: - os.makedirs(gem_path) + os.makedirs(gem_path, exist_ok=force) - # gem name is now the last component of the gem_path + # gem nam + # + # e is now the last component of the gem_path gem_name = os.path.basename(gem_path) if not utils.validate_identifier(gem_name): @@ -1909,10 +1900,9 @@ def create_gem(gem_path: str, # gem restricted path elif gem_restricted_path: - gem_restricted_path = gem_restricted_path.replace('\\', '/') if not os.path.isabs(gem_restricted_path): default_gems_restricted_folder = manifest.get_registered(restricted_name='gems') - new_gem_restricted_path = f'{default_gems_restricted_folder}/{gem_restricted_path}' + new_gem_restricted_path = default_gems_restricted_folder /gem_restricted_path logger.info(f'Gem restricted path {gem_restricted_path} is not a full path, we must assume its' f' relative to default gems restricted path = {new_gem_restricted_path}') gem_restricted_path = new_gem_restricted_path @@ -1923,9 +1913,7 @@ def create_gem(gem_path: str, gem_restricted_path = gem_restricted_default_path # gem restricted relative - if gem_restricted_platform_relative_path: - gem_restricted_platform_relative_path = gem_restricted_platform_relative_path.replace('\\', '/') - else: + if not gem_restricted_platform_relative_path: gem_restricted_platform_relative_path = '' # any user supplied replacements @@ -1995,7 +1983,7 @@ def create_gem(gem_path: str, os.makedirs(gem_restricted_path, exist_ok=True) # read the restricted_name from the gems restricted.json - restricted_json = f"{gem_restricted_path}/restricted.json".replace('//', '/') + restricted_json = gem_restricted_path / 'restricted.json' if os.path.isfile(restricted_json): if not validation.valid_o3de_restricted_json(restricted_json): logger.error(f'Restricted json {restricted_json} is not valid.') @@ -2004,7 +1992,7 @@ def create_gem(gem_path: str, with open(restricted_json, 'w') as s: restricted_json_data = {} restricted_json_data.update({'restricted_name': gem_name}) - s.write(json.dumps(restricted_json_data, indent=4)) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') with open(restricted_json, 'r') as s: try: @@ -2020,7 +2008,7 @@ def create_gem(gem_path: str, return 1 # set the "restricted_name": "restricted_name" element of the gem.json - gem_json = f"{gem_path}/gem.json".replace('//', '/') + gem_json = gem_path / 'gem.json' if not validation.valid_o3de_gem_json(gem_json): logger.error(f'Gem json {gem_json} is not valid.') return 1 @@ -2036,15 +2024,15 @@ def create_gem(gem_path: str, os.unlink(gem_json) with open(gem_json, 'w') as s: try: - s.write(json.dumps(gem_json_data, indent=4)) + s.write(json.dumps(gem_json_data, indent=4) + '\n') except OSError as e: logger.error(f'Failed to write project json {gem_json}.') return 1 for restricted_platform in restricted_platforms: - restricted_gem = f'{gem_restricted_path}/{restricted_platform}/{gem_name}' + restricted_gem = gem_restricted_path / restricted_platform/ gem_name os.makedirs(restricted_gem, exist_ok=True) - cmakelists_file_name = f'{restricted_gem}/CMakeLists.txt' + cmakelists_file_name = restricted_gem / 'CMakeLists.txt' if not os.path.isfile(cmakelists_file_name): with open(cmakelists_file_name, 'w') as d: if keep_license_text: @@ -2077,7 +2065,8 @@ def _run_create_template(args: argparse) -> int: args.template_restricted_platform_relative_path, args.keep_restricted_in_template, args.keep_license_text, - args.replace) + args.replace, + args.force) def _run_create_from_template(args: argparse) -> int: @@ -2092,7 +2081,8 @@ def _run_create_from_template(args: argparse) -> int: args.template_restricted_platform_relative_path, args.keep_restricted_in_instance, args.keep_license_text, - args.replace) + args.replace, + args.force) def _run_create_project(args: argparse) -> int: @@ -2109,6 +2099,7 @@ def _run_create_project(args: argparse) -> int: args.keep_restricted_in_project, args.keep_license_text, args.replace, + args.force, args.system_component_class_id, args.editor_system_component_class_id, args.module_id) @@ -2127,6 +2118,7 @@ def _run_create_gem(args: argparse) -> int: args.keep_restricted_in_gem, args.keep_license_text, args.replace, + args.force, args.system_component_class_id, args.editor_system_component_class_id, args.module_id) @@ -2144,13 +2136,13 @@ def add_args(subparsers) -> None: """ # turn a directory into a template create_template_subparser = subparsers.add_parser('create-template') - create_template_subparser.add_argument('-sp', '--source-path', type=str, required=True, + create_template_subparser.add_argument('-sp', '--source-path', type=pathlib.Path, required=True, help='The path to the source that you want to make into a template') - create_template_subparser.add_argument('-tp', '--template-path', type=str, required=False, + create_template_subparser.add_argument('-tp', '--template-path', type=pathlib.Path, required=False, help='The path to the template to create, can be absolute or relative' ' to default templates path') group = create_template_subparser.add_mutually_exclusive_group(required=False) - group.add_argument('-srp', '--source-restricted-path', type=str, required=False, + group.add_argument('-srp', '--source-restricted-path', type=pathlib.Path, required=False, default=None, help='The path to the source restricted folder.') group.add_argument('-srn', '--source-restricted-name', type=str, required=False, @@ -2159,7 +2151,7 @@ def add_args(subparsers) -> None: ' the --source-restricted-path.') group = create_template_subparser.add_mutually_exclusive_group(required=False) - group.add_argument('-trp', '--template-restricted-path', type=str, required=False, + group.add_argument('-trp', '--template-restricted-path', type=pathlib.Path, required=False, default=None, help='The path to the templates restricted folder.') group.add_argument('-trn', '--template-restricted-name', type=str, required=False, @@ -2167,7 +2159,7 @@ def add_args(subparsers) -> None: help='The name of the templates restricted folder. If supplied this will resolve' ' the --template-restricted-path.') - create_template_subparser.add_argument('-srprp', '--source-restricted-platform-relative-path', type=str, + create_template_subparser.add_argument('-srprp', '--source-restricted-platform-relative-path', type=pathlib.Path, required=False, default=None, help='Any path to append to the --source-restricted-path/' @@ -2175,7 +2167,7 @@ def add_args(subparsers) -> None: ' --source-restricted-path C:/restricted' ' --source-restricted-platform-relative-path some/folder' ' => C:/restricted//some/folder/') - create_template_subparser.add_argument('-trprp', '--template-restricted-platform-relative-path', type=str, + create_template_subparser.add_argument('-trprp', '--template-restricted-platform-relative-path', type=pathlib.Path, required=False, default=None, help='Any path to append to the --template-restricted-path/' @@ -2202,18 +2194,20 @@ def add_args(subparsers) -> None: ' Note: is automatically ${Name}' ' Note: is automatically ${NameLower}' ' Note: is automatically ${NameUpper}') + create_template_subparser.add_argument('-f', '--force', action='store_true', default=False, + help='Copies to new template directory even if it exist.') create_template_subparser.set_defaults(func=_run_create_template) # create from template create_from_template_subparser = subparsers.add_parser('create-from-template') - create_from_template_subparser.add_argument('-dp', '--destination-path', type=str, required=True, + create_from_template_subparser.add_argument('-dp', '--destination-path', type=pathlib.Path, required=True, help='The path to where you want the template instantiated,' ' can be absolute or dev root relative.' 'Ex. C:/o3de/Test' 'Test = ') group = create_from_template_subparser.add_mutually_exclusive_group(required=True) - group.add_argument('-tp', '--template-path', type=str, required=False, + group.add_argument('-tp', '--template-path', type=pathlib.Path, required=False, help='The path to the template you want to instantiate, can be absolute' ' or dev root/Templates relative.' 'Ex. C:/o3de/Template/TestTemplate' @@ -2222,8 +2216,8 @@ def add_args(subparsers) -> None: help='The name to the registered template you want to instantiate. If supplied this will' ' resolve the --template-path.') - group = create_from_template_subparser.add_mutually_exclusive_group(required=True) - group.add_argument('-drp', '--destination-restricted-path', type=str, required=False, + group = create_from_template_subparser.add_mutually_exclusive_group(required=False) + group.add_argument('-drp', '--destination-restricted-path', type=pathlib.Path, required=False, default=None, help='The destination restricted path is where the restricted files' ' will be written to.') @@ -2233,7 +2227,7 @@ def add_args(subparsers) -> None: ' will be written to. If supplied this will resolve the --destination-restricted-path.') group = create_from_template_subparser.add_mutually_exclusive_group(required=False) - group.add_argument('-trp', '--template-restricted-path', type=str, required=False, + group.add_argument('-trp', '--template-restricted-path', type=pathlib.Path, required=False, default=None, help='The template restricted path to read from if any') group.add_argument('-trn', '--template-restricted-name', type=str, required=False, @@ -2241,17 +2235,17 @@ def add_args(subparsers) -> None: help='The name of the registered restricted path to read from if any. If supplied this will' ' resolve the --template-restricted-path.') - create_from_template_subparser.add_argument('-drprp', '--destination-restricted-platform-relative-path', type=str, + create_from_template_subparser.add_argument('-drprp', '--destination-restricted-platform-relative-path', type=pathlib.Path, required=False, - default='', + default=None, help='Any path to append to the --destination-restricted-path/' ' to where the restricted destination is.' ' --destination-restricted-path C:/instance' ' --destination-restricted-platform-relative-path some/folder' ' => C:/instance//some/folder/') - create_from_template_subparser.add_argument('-trprp', '--template-restricted-platform-relative-path', type=str, + create_from_template_subparser.add_argument('-trprp', '--template-restricted-platform-relative-path', type=pathlib.Path, required=False, - default='Templates', + default=None, help='Any path to append to the --template-restricted-path/' ' to where the restricted template is.' ' --template-restricted-path C:/restricted' @@ -2276,11 +2270,13 @@ def add_args(subparsers) -> None: ' Note: ${Name} is automatically ' ' Note: ${NameLower} is automatically ' ' Note: ${NameUpper} is automatically ') + create_from_template_subparser.add_argument('-f', '--force', action='store_true', default=False, + help='Copies over instantiated template directory even if it exist.') create_from_template_subparser.set_defaults(func=_run_create_from_template) # creation of a project from a template (like create from template but makes project assumptions) create_project_subparser = subparsers.add_parser('create-project') - create_project_subparser.add_argument('-pp', '--project-path', type=str, required=True, + create_project_subparser.add_argument('-pp', '--project-path', type=pathlib.Path, required=True, help='The location of the project you wish to create from the template,' ' can be an absolute path or dev root relative.' ' Ex. C:/o3de/TestProject' @@ -2292,7 +2288,7 @@ def add_args(subparsers) -> None: ' Ex. New_Project-123') group = create_project_subparser.add_mutually_exclusive_group(required=False) - group.add_argument('-tp', '--template-path', type=str, required=False, + group.add_argument('-tp', '--template-path', type=pathlib.Path, required=False, default=None, help='the path to the template you want to instance, can be absolute or' ' relative to default templates path') @@ -2302,7 +2298,7 @@ def add_args(subparsers) -> None: ' to DefaultProject. If supplied this will resolve the --template-path.') group = create_project_subparser.add_mutually_exclusive_group(required=False) - group.add_argument('-prp', '--project-restricted-path', type=str, required=False, + group.add_argument('-prp', '--project-restricted-path', type=pathlib.Path, required=False, default=None, help='path to the projects restricted folder, can be absolute or relative' ' to the restricted="projects"') @@ -2312,7 +2308,7 @@ def add_args(subparsers) -> None: ' the --project-restricted-path.') group = create_project_subparser.add_mutually_exclusive_group(required=False) - group.add_argument('-trp', '--template-restricted-path', type=str, required=False, + group.add_argument('-trp', '--template-restricted-path', type=pathlib.Path, required=False, default=None, help='The templates restricted path can be absolute or relative to' ' restricted="templates"') @@ -2321,7 +2317,7 @@ def add_args(subparsers) -> None: help='The name of the registered templates restricted path. If supplied this will resolve' ' the --template-restricted-path.') - create_project_subparser.add_argument('-prprp', '--project-restricted-platform-relative-path', type=str, + create_project_subparser.add_argument('-prprp', '--project-restricted-platform-relative-path', type=pathlib.Path, required=False, default=None, help='Any path to append to the --project-restricted-path/' @@ -2329,7 +2325,7 @@ def add_args(subparsers) -> None: ' --project-restricted-path C:/restricted' ' --project-restricted-platform-relative-path some/folder' ' => C:/restricted//some/folder/') - create_project_subparser.add_argument('-trprp', '--template-restricted-platform-relative-path', type=str, + create_project_subparser.add_argument('-trprp', '--template-restricted-platform-relative-path', type=pathlib.Path, required=False, default=None, help='Any path to append to the --template-restricted-path/' @@ -2358,25 +2354,27 @@ def add_args(subparsers) -> None: ' Note: ${Name} is automatically ' ' Note: ${NameLower} is automatically ' ' Note: ${NameUpper} is automatically ') - create_project_subparser.add_argument('--system-component-class-id', type=utils.validate_uuid4, required=False, + create_project_subparser.add_argument('--system-component-class-id', type=uuid.UUID, required=False, help='The uuid you want to associate with the system class component, default' ' is a random uuid Ex. {b60c92eb-3139-454b-a917-a9d3c5819594}') - create_project_subparser.add_argument('--editor-system-component-class-id', type=utils.validate_uuid4, + create_project_subparser.add_argument('--editor-system-component-class-id', type=uuid.UUID, required=False, help='The uuid you want to associate with the editor system class component,' ' default is a random uuid Ex. {b60c92eb-3139-454b-a917-a9d3c5819594}') - create_project_subparser.add_argument('--module-id', type=utils.validate_uuid4, required=False, + create_project_subparser.add_argument('--module-id', type=uuid.UUID, required=False, help='The uuid you want to associate with the module, default is a random' ' uuid Ex. {b60c92eb-3139-454b-a917-a9d3c5819594}') + create_project_subparser.add_argument('-f', '--force', action='store_true', default=False, + help='Copies over instantiated template directory even if it exist.') create_project_subparser.set_defaults(func=_run_create_project) # creation of a gem from a template (like create from template but makes gem assumptions) create_gem_subparser = subparsers.add_parser('create-gem') - create_gem_subparser.add_argument('-gp', '--gem-path', type=str, required=True, + create_gem_subparser.add_argument('-gp', '--gem-path', type=pathlib.Path, required=True, help='The gem path, can be absolute or relative to default gems path') group = create_gem_subparser.add_mutually_exclusive_group(required=False) - group.add_argument('-tp', '--template-path', type=str, required=False, + group.add_argument('-tp', '--template-path', type=pathlib.Path, required=False, default=None, help='The template path you want to instance, can be absolute or relative' ' to default templates path') @@ -2386,7 +2384,7 @@ def add_args(subparsers) -> None: ' to DefaultGem. If supplied this will resolve the --template-path.') group = create_gem_subparser.add_mutually_exclusive_group(required=False) - group.add_argument('-grp', '--gem-restricted-path', type=str, required=False, + group.add_argument('-grp', '--gem-restricted-path', type=pathlib.Path, required=False, default=None, help='The path to the gem restricted to write to folder if any, can be' 'absolute or dev root relative, default is dev root/restricted.') @@ -2397,7 +2395,7 @@ def add_args(subparsers) -> None: ' this will resolve the --gem-restricted-path.') group = create_gem_subparser.add_mutually_exclusive_group(required=False) - group.add_argument('-trp', '--template-restricted-path', type=str, required=False, + group.add_argument('-trp', '--template-restricted-path', type=pathlib.Path, required=False, default=None, help='The templates restricted path, can be absolute or relative to' ' the restricted="templates"') @@ -2406,7 +2404,7 @@ def add_args(subparsers) -> None: help='The name of the registered templates restricted path. If supplied' ' this will resolve the --template-restricted-path.') - create_gem_subparser.add_argument('-grprp', '--gem-restricted-platform-relative-path', type=str, + create_gem_subparser.add_argument('-grprp', '--gem-restricted-platform-relative-path', type=pathlib.Path, required=False, default=None, help='Any path to append to the --gem-restricted-path/' @@ -2414,7 +2412,7 @@ def add_args(subparsers) -> None: ' --gem-restricted-path C:/restricted' ' --gem-restricted-platform-relative-path some/folder' ' => C:/restricted//some/folder/') - create_gem_subparser.add_argument('-trprp', '--template-restricted-platform-relative-path', type=str, + create_gem_subparser.add_argument('-trprp', '--template-restricted-platform-relative-path', type=pathlib.Path, required=False, default=None, help='Any path to append to the --template-restricted-path/' @@ -2443,16 +2441,18 @@ def add_args(subparsers) -> None: ' default is False, so will not keep license text by default.' ' License text is defined as all lines of text starting on a line' ' with {BEGIN_LICENSE} and ending line {END_LICENSE}.') - create_gem_subparser.add_argument('--system-component-class-id', type=utils.validate_uuid4, required=False, + create_gem_subparser.add_argument('--system-component-class-id', type=uuid.UUID, required=False, help='The uuid you want to associate with the system class component, default' ' is a random uuid Ex. {b60c92eb-3139-454b-a917-a9d3c5819594}') - create_gem_subparser.add_argument('--editor-system-component-class-id', type=utils.validate_uuid4, + create_gem_subparser.add_argument('--editor-system-component-class-id', type=uuid.UUID, required=False, help='The uuid you want to associate with the editor system class component,' ' default is a random uuid Ex. {b60c92eb-3139-454b-a917-a9d3c5819594}') - create_gem_subparser.add_argument('--module-id', type=utils.validate_uuid4, required=False, + create_gem_subparser.add_argument('--module-id', type=uuid.UUID, required=False, help='The uuid you want to associate with the gem module,' ' default is a random uuid Ex. {b60c92eb-3139-454b-a917-a9d3c5819594}') + create_gem_subparser.add_argument('-f', '--force', action='store_true', default=False, + help='Copies over instantiated template directory even if it exist.') create_gem_subparser.set_defaults(func=_run_create_gem)