Merge branch 'upstream/development' into GitIssue3155_MultiplayerComponentsUsingNetInputRequirePlayerInputComponent

This commit is contained in:
Gene Walters
2021-09-01 09:55:30 -07:00
139 changed files with 1326 additions and 1601 deletions
@@ -0,0 +1,36 @@
---
name: Nightly Build Error bug report
about: Create a report when the nightly build process fails
title: 'Nightly Build Failure'
labels: 'needs-triage,needs-sig,kind/bug,kind/nightlybuildfailure'
---
**Describe the bug**
A clear and concise description of what the bug is.
**Failure type**
Build | Asset Processing | Test Tools | Infrastructure | Test
**To Reproduce Test Failures**
- Paste the command line that reproduces the test failure
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Logs**
Attach the Jenkins logs that are relevant to the failure
**Desktop/Device (please complete the following information):**
- Device: [e.g. PC, Mac, iPhone, Samsung]
- OS: [e.g. Windows, macOS, iOS, Android]
- Version [e.g. 10, Bug Sur, Oreo]
- CPU [e.g. Intel I9-9900k , Ryzen 5900x, ]
- GPU [AMD 6800 XT, NVidia RTX 3090]
- Memory [e.g. 16GB]
**Additional context**
Add any other context about the problem here.
+3 -29
View File
@@ -35,37 +35,11 @@ ly_create_alias(NAME AutomatedTesting.Servers NAMESPACE Gem TARGETS Gem::Automa
# Gem dependencies
################################################################################
# The GameLauncher uses "Clients" gem variants:
ly_enable_gems(PROJECT_NAME AutomatedTesting GEM_FILE enabled_gems.cmake
TARGETS AutomatedTesting.GameLauncher
VARIANTS Clients)
# Enable the enabled_gems for the Project:
ly_enable_gems(PROJECT_NAME AutomatedTesting GEM_FILE enabled_gems.cmake)
# If we build a server, then apply the gems to the server
# Add project to the list server projects to create the AutomatedTesting.ServerLauncher
if(PAL_TRAIT_BUILD_SERVER_SUPPORTED)
# if we're making a server, then add the "Server" gem variants to it:
ly_enable_gems(PROJECT_NAME AutomatedTesting GEM_FILE enabled_gems.cmake
TARGETS AutomatedTesting.ServerLauncher
VARIANTS Servers)
set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS AutomatedTesting)
endif()
if (PAL_TRAIT_BUILD_HOST_TOOLS)
# The Editor uses "Tools" gem variants:
ly_enable_gems(
PROJECT_NAME AutomatedTesting GEM_FILE enabled_gems.cmake
TARGETS Editor
VARIANTS Tools)
# The Material Editor needs the Lyshine "Tools" gem variant for the custom LyShine pass
ly_enable_gems(
PROJECT_NAME AutomatedTesting GEMS LyShine
TARGETS MaterialEditor
VARIANTS Tools)
# The pipeline tools use "Builders" gem variants:
ly_enable_gems(
PROJECT_NAME AutomatedTesting GEM_FILE enabled_gems.cmake
TARGETS AssetBuilder AssetProcessor AssetProcessorBatch
VARIANTS Builders)
endif()
@@ -17,7 +17,7 @@
namespace PythonCoverage
{
static constexpr char* const LogCallSite = "PythonCoverageEditorSystemComponent";
static constexpr const char* const LogCallSite = "PythonCoverageEditorSystemComponent";
void PythonCoverageEditorSystemComponent::Reflect(AZ::ReflectContext* context)
{
@@ -33,6 +33,7 @@ MATERIAL_TYPE_PATH = os.path.join(
azlmbr.paths.devroot, "Gems", "Atom", "Feature", "Common", "Assets",
"Materials", "Types", "StandardPBR.materialtype",
)
CACHE_FILE_EXTENSION = ".azmaterial"
def run():
@@ -67,6 +68,7 @@ def run():
material_editor.save_document_as_child(document_id, target_path)
material_editor.wait_for_condition(lambda: os.path.exists(target_path), 2.0)
print(f"New asset created: {os.path.exists(target_path)}")
time.sleep(2.0)
# Verify if the newly created document is open
new_document_id = material_editor.open_material(target_path)
@@ -101,22 +103,29 @@ def run():
expected_color = math.Color(0.25, 0.25, 0.25, 1.0)
material_editor.set_property(document_id, property_name, expected_color)
material_editor.save_document(document_id)
time.sleep(2.0)
# 7) Test Case: Saving as a New Material
# Assign new color to the material file and save the document as copy
expected_color_1 = math.Color(0.5, 0.5, 0.5, 1.0)
material_editor.set_property(document_id, property_name, expected_color_1)
target_path_1 = os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Materials", NEW_MATERIAL_1)
cache_file_name_1 = os.path.splitext(NEW_MATERIAL_1) # Example output: ('test_material_1', '.material')
cache_file_1 = f"{cache_file_name_1[0]}{CACHE_FILE_EXTENSION}"
target_path_1_cache = os.path.join(azlmbr.paths.devassets, "Cache", "pc", "materials", cache_file_1)
material_editor.save_document_as_copy(document_id, target_path_1)
time.sleep(2.0)
material_editor.wait_for_condition(lambda: os.path.exists(target_path_1_cache), 4.0)
# 8) Test Case: Saving as a Child Material
# Assign new color to the material file save the document as child
expected_color_2 = math.Color(0.75, 0.75, 0.75, 1.0)
material_editor.set_property(document_id, property_name, expected_color_2)
target_path_2 = os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Materials", NEW_MATERIAL_2)
cache_file_name_2 = os.path.splitext(NEW_MATERIAL_1) # Example output: ('test_material_2', '.material')
cache_file_2 = f"{cache_file_name_2[0]}{CACHE_FILE_EXTENSION}"
target_path_2_cache = os.path.join(azlmbr.paths.devassets, "Cache", "pc", "materials", cache_file_2)
material_editor.save_document_as_child(document_id, target_path_2)
time.sleep(2.0)
material_editor.wait_for_condition(lambda: os.path.exists(target_path_2_cache), 4.0)
# Close/Reopen documents
material_editor.close_all_documents()
@@ -16,7 +16,6 @@ import editor_python_test_tools.hydra_test_utils as hydra
from atom_renderer.atom_utils.atom_constants import LIGHT_TYPES
logger = logging.getLogger(__name__)
EDITOR_TIMEOUT = 120
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
@@ -175,7 +174,7 @@ class TestAtomEditorComponentsMain(object):
TEST_DIRECTORY,
editor,
"hydra_AtomEditorComponents_AddedToEntity.py",
timeout=EDITOR_TIMEOUT,
timeout=120,
expected_lines=expected_lines,
unexpected_lines=unexpected_lines,
halt_on_unexpected=True,
@@ -236,7 +235,7 @@ class TestAtomEditorComponentsMain(object):
TEST_DIRECTORY,
editor,
"hydra_AtomEditorComponents_LightComponent.py",
timeout=EDITOR_TIMEOUT,
timeout=120,
expected_lines=expected_lines,
unexpected_lines=unexpected_lines,
halt_on_unexpected=True,
@@ -299,7 +298,7 @@ class TestMaterialEditorBasicTests(object):
generic_launcher,
"hydra_AtomMaterialEditor_BasicTests.py",
run_python="--runpython",
timeout=80,
timeout=120,
expected_lines=expected_lines,
unexpected_lines=unexpected_lines,
halt_on_unexpected=True,
@@ -90,6 +90,7 @@ AzAssetBrowserWindow::AzAssetBrowserWindow(QWidget* parent)
m_tableModel->setFilterRole(Qt::DisplayRole);
m_tableModel->setSourceModel(m_filterModel.data());
m_tableModel->setDynamicSortFilter(true);
m_ui->m_assetBrowserTableViewWidget->setModel(m_tableModel.data());
connect(
+2
View File
@@ -174,6 +174,8 @@ ly_add_target(
Legacy::EditorLib
ProjectManager
)
ly_set_gem_variant_to_load(TARGETS Editor VARIANTS Tools)
set_property(SOURCE
CryEdit.cpp
APPEND PROPERTY
+1 -8
View File
@@ -47,7 +47,6 @@ struct ToolTip
class CEditorPanelUtils_Impl
: public IEditorPanelUtils
{
#pragma region Drag & Drop
public:
void SetViewportDragOperation(void(* dropCallback)(CViewport* viewport, int dragPointX, int dragPointY, void* custom), void* custom) override
{
@@ -56,8 +55,7 @@ public:
GetIEditor()->GetViewManager()->GetView(i)->SetGlobalDropCallback(dropCallback, custom);
}
}
#pragma endregion
#pragma region Preview Window
public:
int PreviewWindow_GetDisplaySettingsDebugFlags(CDisplaySettings* settings) override
@@ -72,8 +70,6 @@ public:
settings->SetDebugFlags(flags);
}
#pragma endregion
#pragma region Shortcuts
protected:
QVector<HotKey> hotkeys;
bool m_hotkeysAreEnabled;
@@ -408,8 +404,6 @@ public:
return m_hotkeysAreEnabled;
}
#pragma endregion
#pragma region ToolTip
protected:
QMap<QString, ToolTip> m_tooltips;
@@ -539,7 +533,6 @@ public:
}
return GetToolTip(path).disabledContent;
}
#pragma endregion ToolTip
};
IEditorPanelUtils* CreateEditorPanelUtils()
-8
View File
@@ -84,12 +84,6 @@ AZ_POP_DISABLE_WARNING
#include "IEditorPanelUtils.h"
#include "EditorPanelUtils.h"
// even in Release mode, the editor will return its heap, because there's no Profile build configuration for the editor
#ifdef _RELEASE
#undef _RELEASE
#endif
#include "Core/QtEditorApplication.h" // for Editor::EditorQtApplication
static CCryEditDoc * theDocument;
@@ -104,8 +98,6 @@ static CCryEditDoc * theDocument;
#define VERIFY(EXPRESSION) { auto e = EXPRESSION; assert(e); }
#endif
#undef GetCommandLine
const char* CEditorImpl::m_crashLogFileName = "SessionStatus/editor_statuses.json";
CEditorImpl::CEditorImpl()
+1 -1
View File
@@ -66,7 +66,7 @@ int main(int argc, char* argv[])
processLaunchInfo.m_environmentVariables = &envVars;
processLaunchInfo.m_showWindow = true;
AZStd::unique_ptr<AzFramework::ProcessWatcher> processWatcher(AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE));
AzFramework::ProcessLauncher::LaunchUnwatchedProcess(processLaunchInfo);
application.Destroy();
-1
View File
@@ -35,7 +35,6 @@
#include "CryEdit.h"
#include "MainWindow.h"
#pragma comment(lib, "Gdi32.lib")
//////////////////////////////////////////////////////////////////////////
// Global Instance of Editor settings.
@@ -174,6 +174,8 @@ namespace AZ
AZStd::this_thread::sleep_for(milliseconds(1));
}
return AZ::Debug::Trace::IsDebuggerPresent();
#else
return false;
#endif
}
+25 -6
View File
@@ -11,6 +11,7 @@
#include <AzCore/std/containers/array.h>
#include <AzCore/std/string/wildcard.h>
#include <AzCore/Casting/numeric_cast.h>
#include <AzCore/AzCore_Traits_Platform.h>
// extern instantiations of Path templates to prevent implicit instantiations
namespace AZ::IO
@@ -92,11 +93,23 @@ namespace AZ::IO::Internal
constexpr auto ConsumeRootName(InputIt entryBeginIter, InputIt entryEndIter, const char preferredSeparator)
-> AZStd::enable_if_t<AZStd::Internal::is_forward_iterator_v<InputIt>, InputIt>
{
if (preferredSeparator == '/')
if (preferredSeparator == PosixPathSeparator)
{
// If the preferred separator is forward slash the parser is in posix path
// parsing mode, which doesn't have a root name
// parsing mode, which doesn't have a root name,
// unless we're on a posix platform that uses a custom path root separator
#if defined(AZ_TRAIT_CUSTOM_PATH_ROOT_SEPARATOR)
const AZStd::string_view path{ entryBeginIter, entryEndIter };
const auto positionOfPathSeparator = path.find(AZ_TRAIT_CUSTOM_PATH_ROOT_SEPARATOR);
if (positionOfPathSeparator == AZStd::string_view::npos)
{
return entryBeginIter;
}
const AZStd::string_view rootName{ path.substr(0, positionOfPathSeparator + 1) };
return AZStd::next(entryBeginIter, rootName.size());
#else
return entryBeginIter;
#endif
}
else
{
@@ -185,13 +198,18 @@ namespace AZ::IO::Internal
template <typename InputIt, typename EndIt, typename = AZStd::enable_if_t<AZStd::Internal::is_input_iterator_v<InputIt>>>
static constexpr bool IsAbsolute(InputIt first, EndIt last, const char preferredSeparator)
{
size_t pathSize = AZStd::distance(first, last);
// If the preferred separator is a forward slash
// than an absolute path is simply one that starts with a forward slash
if (preferredSeparator == '/')
// than an absolute path is simply one that starts with a forward slash,
// unless we're on a posix platform that uses a custom path root separator
if (preferredSeparator == PosixPathSeparator)
{
#if defined(AZ_TRAIT_CUSTOM_PATH_ROOT_SEPARATOR)
const AZStd::string_view path{ first, last };
return path.find(AZ_TRAIT_CUSTOM_PATH_ROOT_SEPARATOR) != AZStd::string_view::npos;
#else
const size_t pathSize = AZStd::distance(first, last);
return pathSize > 0 && IsSeparator(*first);
#endif
}
else
{
@@ -199,6 +217,7 @@ namespace AZ::IO::Internal
{
// If a windows path ends starts with C:foo it is a root relative path
// A path is absolute root absolute on windows if it starts with <drive_letter><colon><path_separator>
const size_t pathSize = AZStd::distance(first, last);
return pathSize > 2 && Internal::IsSeparator(*AZStd::next(first, 2));
}
@@ -550,7 +550,7 @@ namespace AZ::SettingsRegistryMergeUtils
}
registry.Set(FilePathKey_ProjectUserPath, projectUserPath.Native());
// Set the user directory with the provided path or using project/user as default
// Set the log directory with the provided path or using project/user/log as default
auto projectLogPathKey = FixedValueString::format("%s/project_log_path", BootstrapSettingsRootKey);
AZ::IO::FixedMaxPath projectLogPath;
if (!registry.Get(projectLogPath.Native(), projectLogPathKey))
@@ -640,7 +640,7 @@ namespace AZ::SettingsRegistryMergeUtils
}
#if !AZ_TRAIT_OS_IS_HOST_OS_PLATFORM
// Setup the cache and user paths when to platform specific locations when running on non-host platforms
// Setup the cache, user, and log paths to platform specific locations when running on non-host platforms
path = engineRoot;
if (AZStd::optional<AZ::IO::FixedMaxPathString> nonHostCacheRoot = Utils::GetDefaultAppRootPath();
nonHostCacheRoot)
@@ -656,13 +656,16 @@ namespace AZ::SettingsRegistryMergeUtils
if (AZStd::optional<AZ::IO::FixedMaxPathString> devWriteStorage = Utils::GetDevWriteStoragePath();
devWriteStorage)
{
registry.Set(FilePathKey_DevWriteStorage, *devWriteStorage);
registry.Set(FilePathKey_ProjectUserPath, *devWriteStorage);
const AZ::IO::FixedMaxPath devWriteStoragePath(*devWriteStorage);
registry.Set(FilePathKey_DevWriteStorage, devWriteStoragePath.LexicallyNormal().Native());
registry.Set(FilePathKey_ProjectUserPath, (devWriteStoragePath / "user").LexicallyNormal().Native());
registry.Set(FilePathKey_ProjectLogPath, (devWriteStoragePath / "user/log").LexicallyNormal().Native());
}
else
{
registry.Set(FilePathKey_DevWriteStorage, path.LexicallyNormal().Native());
registry.Set(FilePathKey_ProjectUserPath, (path / "user").LexicallyNormal().Native());
registry.Set(FilePathKey_ProjectLogPath, (path / "user/log").LexicallyNormal().Native());
}
#endif // AZ_TRAIT_OS_IS_HOST_OS_PLATFORM
}
@@ -19,6 +19,7 @@
#include <AzCore/std/typetraits/is_member_pointer.h>
#include <AzCore/std/typetraits/is_const.h>
#include <AzCore/std/typetraits/remove_cvref.h>
#include <AzCore/std/typetraits/is_volatile.h>
#include <AzCore/std/createdestroy.h>
#define AZSTD_FUNCTION_TARGET_FIX(x)
@@ -591,8 +592,8 @@ namespace AZStd
Internal::function_util::function_buffer type_result;
type_result.type.type = aztypeid(Functor);
type_result.type.const_qualified = is_const<Functor>::value;
type_result.type.volatile_qualified = is_volatile<Functor>::value;
type_result.type.const_qualified = AZStd::is_const<Functor>::value;
type_result.type.volatile_qualified = AZStd::is_volatile<Functor>::value;
vtable->manager(functor, type_result, Internal::function_util::check_functor_type_tag);
return static_cast<Functor*>(type_result.obj_ptr);
}
@@ -608,7 +609,7 @@ namespace AZStd
Internal::function_util::function_buffer type_result;
type_result.type.type = aztypeid(Functor);
type_result.type.const_qualified = true;
type_result.type.volatile_qualified = is_volatile<Functor>::value;
type_result.type.volatile_qualified = AZStd::is_volatile<Functor>::value;
vtable->manager(functor, type_result, Internal::function_util::check_functor_type_tag);
// GCC 2.95.3 gets the CV qualifiers wrong here, so we
// can't do the static_cast that we should do.
@@ -359,7 +359,7 @@ namespace AZStd
{
functor.obj_ref.obj_ptr = (void*)&f.get();
functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
functor.obj_ref.is_volatile_qualified = AZStd::is_volatile<FunctionObj>::value;
return true;
}
else
@@ -70,11 +70,11 @@ namespace AZStd
bool try_acquire_until(const chrono::time_point<Clock, Duration>& abs_time)
{
auto timeNow = chrono::system_clock::now();
if (timeNow >= absTime)
if (timeNow >= abs_time)
{
return false; // we timed out already!
}
auto deltaTime = absTime - timeNow;
auto deltaTime = abs_time - timeNow;
auto timeToTry = chrono::duration_cast<chrono::milliseconds>(deltaTime);
return (WaitForSingleObject(m_event, aznumeric_cast<DWORD>(timeToTry.count())) == AZ_WAIT_OBJECT_0);
}
@@ -198,7 +198,7 @@ namespace AZStd
AZ_FORCE_INLINE cv_status condition_variable_any::wait_for(Lock& lock, const chrono::duration<Rep, Period>& rel_time)
{
chrono::milliseconds toWait = rel_time;
EnterCriticalSection(&m_mutex);
EnterCriticalSection(AZ_STD_MUTEX_CAST(m_mutex));
lock.unlock();
// We need to make sure we use CriticalSection based mutex.
@@ -217,7 +217,7 @@ namespace AZStd
returnCode = cv_status::timeout;
}
}
LeaveCriticalSection(&m_mutex);
LeaveCriticalSection(AZ_STD_MUTEX_CAST(m_mutex));
lock.lock();
return returnCode;
}
@@ -480,7 +480,9 @@ namespace UnitTest
TEST_F(AnyTest, Any_CopyAssignSelfEmpty_IsEmpty)
{
any a;
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
a = a;
AZ_POP_DISABLE_WARNING
EXPECT_TRUE(a.empty());
}
@@ -491,7 +493,9 @@ namespace UnitTest
any a((TypeParam(1)));
EXPECT_EQ(TypeParam::s_count, 1);
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
a = a;
AZ_POP_DISABLE_WARNING
EXPECT_EQ(TypeParam::s_count, 1);
EXPECT_EQ(any_cast<const TypeParam&>(a).val(), 1);
@@ -285,7 +285,9 @@ namespace UnitTest
// Invocation and self-assignment
global_int = 0;
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
v1 = v1;
AZ_POP_DISABLE_WARNING
v1();
AZ_TEST_ASSERT(global_int == 3);
@@ -294,7 +296,9 @@ namespace UnitTest
// Invocation and self-assignment
global_int = 0;
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
v1 = (v1);
AZ_POP_DISABLE_WARNING
v1();
AZ_TEST_ASSERT(global_int == 5);
+2 -2
View File
@@ -2100,8 +2100,8 @@ namespace UnitTest
typename TypeParam::ContainerType container;
container.emplace(-2352);
container.emplace(3534);
container.emplace(1535408957);
container.emplace(3310556522);
container.emplace(535408957);
container.emplace(1310556522);
container.emplace(55546193);
container.emplace(1582);
@@ -1805,8 +1805,8 @@ namespace UnitTest
typename TypeParam::ContainerType container;
container.emplace(-2352);
container.emplace(3534);
container.emplace(1535408957);
container.emplace(3310556522);
container.emplace(535408957);
container.emplace(1310556522);
container.emplace(55546193);
container.emplace(1582);
@@ -920,7 +920,9 @@ namespace UnitTest
AZStd::shared_ptr<incomplete> p1;
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
p1 = p1;
AZ_POP_DISABLE_WARNING
EXPECT_EQ(p1, p1);
EXPECT_FALSE(p1);
@@ -950,7 +952,9 @@ namespace UnitTest
{
AZStd::shared_ptr<void> p1;
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
p1 = p1;
AZ_POP_DISABLE_WARNING
EXPECT_EQ(p1, p1);
EXPECT_FALSE(p1);
@@ -996,7 +1000,9 @@ namespace UnitTest
using X = SharedPtr::test::X;
AZStd::shared_ptr<X> p1;
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
p1 = p1;
AZ_POP_DISABLE_WARNING
EXPECT_EQ(p1, p1);
EXPECT_FALSE(p1);
@@ -72,11 +72,8 @@ namespace AzFramework
/// Retrieves the app root path for the application.
virtual const char* GetAppRoot() const { return nullptr; }
#pragma push_macro("GetCommandLine")
#undef GetCommandLine
/// Get the Command Line arguments passed in.
virtual const CommandLine* GetCommandLine() { return nullptr; }
#pragma pop_macro("GetCommandLine")
/// Get the Command Line arguments passed in. (Avoids collisions with platform specific macros.)
virtual const CommandLine* GetApplicationCommandLine() { return nullptr; }
@@ -707,6 +707,7 @@ namespace AZ
resolvedPathLen += postAliasView.size();
// Null-Terminated the resolved path
resolvedPath[resolvedPathLen] = '\0';
// If the path started with one of the "asset cache" path aliases, lowercase the path
const char* assetAliasPath = GetAlias("@assets@");
const char* rootAliasPath = GetAlias("@root@");
@@ -714,10 +715,13 @@ namespace AZ
const bool lowercasePath = (assetAliasPath != nullptr && AZ::StringFunc::StartsWith(resolvedPath, assetAliasPath)) ||
(rootAliasPath != nullptr && AZ::StringFunc::StartsWith(resolvedPath, rootAliasPath)) ||
(projectPlatformCacheAliasPath != nullptr && AZ::StringFunc::StartsWith(resolvedPath, projectPlatformCacheAliasPath));
if (lowercasePath)
{
AZStd::to_lower(resolvedPath, resolvedPath + resolvedPathLen);
// Lowercase only the relative part after the replaced alias.
AZStd::to_lower(resolvedPath + aliasValue.size(), resolvedPath + resolvedPathLen);
}
// Replace any backslashes with posix slashes
AZStd::replace(resolvedPath, resolvedPath + resolvedPathLen, AZ::IO::WindowsPathSeparator, AZ::IO::PosixPathSeparator);
return true;
@@ -31,10 +31,10 @@ namespace AzToolsFramework
AssetBrowserFilterModel::AssetBrowserFilterModel(QObject* parent)
: QSortFilterProxyModel(parent)
{
m_showColumn.insert(aznumeric_cast<int>(AssetBrowserEntry::Column::DisplayName));
m_shownColumns.insert(aznumeric_cast<int>(AssetBrowserEntry::Column::DisplayName));
if (ed_useNewAssetBrowserTableView)
{
m_showColumn.insert(aznumeric_cast<int>(AssetBrowserEntry::Column::Path));
m_shownColumns.insert(aznumeric_cast<int>(AssetBrowserEntry::Column::Path));
}
m_collator.setNumericMode(true);
AssetBrowserComponentNotificationBus::Handler::BusConnect();
@@ -96,7 +96,7 @@ namespace AzToolsFramework
bool AssetBrowserFilterModel::filterAcceptsColumn(int source_column, const QModelIndex&) const
{
//if the column is in the set we want to show it
return m_showColumn.find(source_column) != m_showColumn.end();
return m_shownColumns.find(source_column) != m_shownColumns.end();
}
bool AssetBrowserFilterModel::lessThan(const QModelIndex& source_left, const QModelIndex& source_right) const
@@ -27,6 +27,8 @@ namespace AzToolsFramework
{
namespace AssetBrowser
{
using ShownColumnsSet = AZStd::fixed_unordered_set<int, 3, aznumeric_cast<int>(AssetBrowserEntry::Column::Count)>;
class AssetBrowserFilterModel
: public QSortFilterProxyModel
, public AssetBrowserComponentNotificationBus::Handler
@@ -61,11 +63,11 @@ namespace AzToolsFramework
void filterUpdatedSlot();
protected:
//set for filtering columns
//if the column is in the set the column is not filtered and is shown
AZStd::fixed_unordered_set<int, 3, aznumeric_cast<int>(AssetBrowserEntry::Column::Count)> m_showColumn;
// Set for filtering columns
// If the column is in the set the column is not filtered and is shown
ShownColumnsSet m_shownColumns;
bool m_alreadyRecomputingFilters = false;
//asset source name match filter
//Asset source name match filter
FilterConstType m_filter;
AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") // 4251: class '...' needs to have dll-interface to be used by clients of class '...'
QWeakPointer<const StringFilter> m_stringFilter;
@@ -16,7 +16,6 @@ namespace AzToolsFramework
AssetBrowserTableModel::AssetBrowserTableModel(QObject* parent /* = nullptr */)
: QSortFilterProxyModel(parent)
{
setDynamicSortFilter(false);
}
void AssetBrowserTableModel::setSourceModel(QAbstractItemModel* sourceModel)
@@ -47,7 +46,7 @@ namespace AzToolsFramework
QModelIndex AssetBrowserTableModel::mapToSource(const QModelIndex& proxyIndex) const
{
Q_ASSERT(!proxyIndex.isValid() || proxyIndex.model() == this);
Q_ASSERT(!proxyIndex.isValid() || proxyIndex.model() != this);
if (!proxyIndex.isValid() || !m_indexMap.contains(proxyIndex.row()))
{
return QModelIndex();
@@ -132,7 +131,7 @@ namespace AzToolsFramework
{
QModelIndex index = model->index(currentRow, 0, parent);
AssetBrowserEntry* entry = GetAssetEntry(m_filterModel->mapToSource(index));
// We only want to see the source assets.
// We only want to see source and product assets.
if (entry->GetEntryType() == AssetBrowserEntry::AssetEntryType::Source ||
entry->GetEntryType() == AssetBrowserEntry::AssetEntryType::Product)
{
@@ -21,8 +21,7 @@ namespace AzToolsFramework
class AssetBrowserFilterModel;
class AssetBrowserEntry;
class AssetBrowserTableModel
: public QSortFilterProxyModel
class AssetBrowserTableModel : public QSortFilterProxyModel
{
Q_OBJECT
@@ -9,9 +9,11 @@
#include <AzCore/UserSettings/UserSettings.h>
#include <AzQtComponents/Components/DockBar.h>
#include <AzCore/Console/IConsole.h>
#include <AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserFilterModel.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserTableModel.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserModel.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserBus.h>
#include <AzToolsFramework/AssetBrowser/AssetSelectionModel.h>
@@ -26,6 +28,11 @@ AZ_PUSH_DISABLE_WARNING(4251 4244, "-Wunknown-warning-option") // disable warnin
#include <QTimer>
AZ_POP_DISABLE_WARNING
AZ_CVAR(
bool, ed_hideAssetPickerPathColumn, false, nullptr, AZ::ConsoleFunctorFlags::Null,
"Hide AssetPicker path column for a clearer view.");
AZ_CVAR_EXTERNED(bool, ed_useNewAssetBrowserTableView);
namespace AzToolsFramework
{
namespace AssetBrowser
@@ -34,6 +41,7 @@ namespace AzToolsFramework
: QDialog(parent)
, m_ui(new Ui::AssetPickerDialogClass())
, m_filterModel(new AssetBrowserFilterModel(parent))
, m_tableModel(new AssetBrowserTableModel(parent))
, m_selection(selection)
, m_hasFilter(false)
{
@@ -97,6 +105,56 @@ namespace AzToolsFramework
m_persistentState = AZ::UserSettings::CreateFind<AzToolsFramework::QWidgetSavedState>(AZ::Crc32(("AssetBrowserTreeView_Dialog_" + name).toUtf8().data()), AZ::UserSettings::CT_GLOBAL);
m_ui->m_assetBrowserTableViewWidget->setVisible(false);
if (ed_useNewAssetBrowserTableView)
{
m_ui->m_assetBrowserTreeViewWidget->setVisible(false);
m_ui->m_assetBrowserTableViewWidget->setVisible(true);
m_tableModel->setSourceModel(m_filterModel.get());
m_ui->m_assetBrowserTableViewWidget->setModel(m_tableModel.get());
m_ui->m_assetBrowserTableViewWidget->SetName("AssetBrowserTableView_" + name);
m_ui->m_assetBrowserTableViewWidget->setDragEnabled(false);
m_ui->m_assetBrowserTableViewWidget->setSelectionMode(
selection.GetMultiselect() ? QAbstractItemView::SelectionMode::ExtendedSelection
: QAbstractItemView::SelectionMode::SingleSelection);
if (ed_hideAssetPickerPathColumn)
{
m_ui->m_assetBrowserTableViewWidget->hideColumn(1);
}
// if the current selection is invalid, disable the Ok button
m_ui->m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(EvaluateSelection());
connect(
m_filterModel.data(), &AssetBrowserFilterModel::filterChanged, this,
[this]()
{
m_tableModel->UpdateTableModelMaps();
});
connect(
m_ui->m_assetBrowserTableViewWidget, &AssetBrowserTableView::selectionChangedSignal, this,
[this](const QItemSelection&, const QItemSelection&)
{
AssetPickerDialog::SelectionChangedSlot();
});
connect(m_ui->m_assetBrowserTableViewWidget, &QAbstractItemView::doubleClicked, this, &AssetPickerDialog::DoubleClickedSlot);
connect(
m_ui->m_assetBrowserTableViewWidget, &AssetBrowserTableView::ClearStringFilter, m_ui->m_searchWidget,
&SearchWidget::ClearStringFilter);
connect(
m_ui->m_assetBrowserTableViewWidget, &AssetBrowserTableView::ClearTypeFilter, m_ui->m_searchWidget,
&SearchWidget::ClearTypeFilter);
m_ui->m_assetBrowserTableViewWidget->SetName("AssetBrowserTableView_main");
m_tableModel->UpdateTableModelMaps();
}
QTimer::singleShot(0, this, &AssetPickerDialog::RestoreState);
SelectionChangedSlot();
}
@@ -134,6 +192,7 @@ namespace AzToolsFramework
{
m_ui->m_assetBrowserTreeViewWidget->expandAll();
});
m_tableModel->UpdateTableModelMaps();
}
if (m_hasFilter && !hasFilter)
@@ -166,7 +225,8 @@ namespace AzToolsFramework
bool AssetPickerDialog::EvaluateSelection() const
{
auto selectedAssets = m_ui->m_assetBrowserTreeViewWidget->GetSelectedAssets();
auto selectedAssets = m_ui->m_assetBrowserTreeViewWidget->isVisible() ? m_ui->m_assetBrowserTreeViewWidget->GetSelectedAssets()
: m_ui->m_assetBrowserTableViewWidget->GetSelectedAssets();
// exactly one item must be selected, even if multi-select option is disabled, still good practice to check
if (selectedAssets.empty())
{
@@ -197,7 +257,10 @@ namespace AzToolsFramework
void AssetPickerDialog::UpdatePreview() const
{
auto selectedAssets = m_ui->m_assetBrowserTreeViewWidget->GetSelectedAssets();
auto selectedAssets = m_ui->m_assetBrowserTreeViewWidget->isVisible()
? m_ui->m_assetBrowserTreeViewWidget->GetSelectedAssets()
: m_ui->m_assetBrowserTableViewWidget->GetSelectedAssets();
;
if (selectedAssets.size() != 1)
{
m_ui->m_previewerFrame->Clear();
@@ -33,6 +33,7 @@ namespace AzToolsFramework
{
class ProductAssetBrowserEntry;
class AssetBrowserFilterModel;
class AssetBrowserTableModel;
class AssetBrowserModel;
class AssetSelectionModel;
@@ -69,6 +70,7 @@ namespace AzToolsFramework
QScopedPointer<Ui::AssetPickerDialogClass> m_ui;
AssetBrowserModel* m_assetBrowserModel = nullptr;
QScopedPointer<AssetBrowserFilterModel> m_filterModel;
QScopedPointer<AssetBrowserTableModel> m_tableModel;
AssetSelectionModel& m_selection;
bool m_hasFilter;
AZStd::unique_ptr<TreeViewState> m_filterStateSaver;
@@ -142,6 +142,9 @@
</property>
</widget>
</item>
<item>
<widget class="AzToolsFramework::AssetBrowser::AssetBrowserTableView" name="m_assetBrowserTableViewWidget"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="verticalLayoutWidget">
@@ -197,6 +200,11 @@
<header>AzToolsFramework/AssetBrowser/Previewer/PreviewerFrame.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>AzToolsFramework::AssetBrowser::AssetBrowserTableView</class>
<extends>QTableView</extends>
<header>AzToolsFramework/AssetBrowser/Views/AssetBrowserTableView.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
@@ -53,7 +53,6 @@ namespace AzToolsFramework
// AssetBrowserComponentNotificationBus
void OnAssetBrowserComponentReady() override;
//////////////////////////////////////////////////////////////////////////
Q_SIGNALS:
void selectionChangedSignal(const QItemSelection& selected, const QItemSelection& deselected);
void ClearStringFilter();
@@ -6,8 +6,8 @@
#
#
set_property(GLOBAL PROPERTY LAUNCHER_UNIFIED_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
# Launcher targets for a project need to be generated when configuring a project.
# When building the engine source, this file will be included by LauncherUnified's CMakeLists.txt
# When using an installed engine, this file will be included by the FindLauncherGenerator.cmake script
@@ -121,6 +121,7 @@ foreach(project_name project_path IN ZIP_LISTS LY_PROJECTS_TARGET_NAME LY_PROJEC
set_target_properties(${project_name}.GameLauncher
PROPERTIES
FOLDER ${project_name}
LY_PROJECT_NAME ${project_name}
)
# After ensuring that we correctly support DPI scaling, this should be switched to "PerMonitor"
@@ -129,6 +130,9 @@ foreach(project_name project_path IN ZIP_LISTS LY_PROJECTS_TARGET_NAME LY_PROJEC
set_property(TARGET ${project_name}.GameLauncher APPEND PROPERTY VS_DEBUGGER_COMMAND_ARGUMENTS "--project-path=\"${LY_DEFAULT_PROJECT_PATH}\"")
endif()
# Associate the Clients Gem Variant with each projects GameLauncher
ly_set_gem_variant_to_load(TARGETS ${project_name}.GameLauncher VARIANTS Clients)
################################################################################
# Server
################################################################################
@@ -168,11 +172,15 @@ foreach(project_name project_path IN ZIP_LISTS LY_PROJECTS_TARGET_NAME LY_PROJEC
set_target_properties(${project_name}.ServerLauncher
PROPERTIES
FOLDER ${project_name}
LY_PROJECT_NAME ${project_name}
)
if(LY_DEFAULT_PROJECT_PATH)
set_property(TARGET ${project_name}.ServerLauncher APPEND PROPERTY VS_DEBUGGER_COMMAND_ARGUMENTS "--project-path=\"${LY_DEFAULT_PROJECT_PATH}\"")
endif()
# Associate the Servers Gem Variant with each projects ServerLauncher
ly_set_gem_variant_to_load(TARGETS ${project_name}.ServerLauncher VARIANTS Servers)
endif()
endif()
@@ -9,4 +9,5 @@
set(FILES
LauncherProject.cpp
StaticModules.in
launcher_generator.cmake
)
-4
View File
@@ -13,10 +13,6 @@
#define CRYINCLUDE_CRYCOMMON_APPLESPECIFIC_H
#pragma once
#if defined(__clang__)
#pragma diagnostic ignore "-W#pragma-messages"
#endif
//////////////////////////////////////////////////////////////////////////
// Standard includes.
//////////////////////////////////////////////////////////////////////////
-4
View File
@@ -118,10 +118,6 @@ struct IConsoleVarSink
// </interfuscator:shuffle>
};
#if defined(GetCommandLine)
#undef GetCommandLine
#endif
// Interface to the arguments of the console command.
struct IConsoleCmdArgs
{
@@ -39,6 +39,7 @@ ly_add_source_properties(
)
if(TARGET AssetBuilder)
ly_set_gem_variant_to_load(TARGETS AssetBuilder VARIANTS Builders)
# Adds the AssetBuilder target as a C preprocessor define so that it can be used as a Settings Registry
# specialization in order to look up the generated .setreg which contains the dependencies
# specified for the AssetBuilder in the <Project>/Gem/Code/CMakeLists via ly_add_project_dependencies
+2
View File
@@ -81,6 +81,7 @@ ly_add_target(
# specialization in order to look up the generated .setreg which contains the dependencies
# specified for the target.
if(TARGET AssetProcessor)
ly_set_gem_variant_to_load(TARGETS AssetProcessor VARIANTS Builders)
set_source_files_properties(
native/AssetProcessorBuildTarget.cpp
PROPERTIES
@@ -130,6 +131,7 @@ endif()
# specialization in order to look up the generated .setreg which contains the dependencies
# specified for the target.
if(TARGET AssetProcessorBatch)
ly_set_gem_variant_to_load(TARGETS AssetProcessorBatch VARIANTS Builders)
set_source_files_properties(
native/AssetProcessorBatchBuildTarget.cpp
PROPERTIES
@@ -66,7 +66,7 @@ int main(int argc, char* argv[])
processLaunchInfo.m_environmentVariables = &envVars;
processLaunchInfo.m_showWindow = true;
AZStd::unique_ptr<AzFramework::ProcessWatcher> processWatcher(AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_NONE));
AzFramework::ProcessLauncher::LaunchUnwatchedProcess(processLaunchInfo);
application.Destroy();
@@ -715,12 +715,7 @@ void AssetProcessingStateDataUnitTest::DataTest(AssetProcessor::AssetDatabaseCon
//try retrieving this source by id
UNIT_TEST_EXPECT_TRUE(stateData->GetJobByJobID(job.m_jobID, job));
if (job.m_jobID == AzToolsFramework::AssetDatabase::InvalidEntryId ||
job.m_jobID != job.m_jobID ||
job.m_sourcePK != job.m_sourcePK ||
job.m_jobKey != job.m_jobKey ||
job.m_fingerprint != job.m_fingerprint ||
job.m_platform != job.m_platform)
if (job.m_jobID == AzToolsFramework::AssetDatabase::InvalidEntryId)
{
Q_EMIT UnitTestFailed("AssetProcessingStateDataTest Failed - GetJobByJobID failed");
return;
@@ -57,9 +57,6 @@
#include <sstream>
// windows headers bring in a macro which conflicts GetCommandLine
#undef GetCommandLine
namespace AssetUtilsInternal
{
static const unsigned int g_RetryWaitInterval = 250; // The amount of time that we are waiting for retry.
@@ -64,7 +64,7 @@ namespace AzTestRunner
{
static char cwd_buffer[AZ_MAX_PATH_LEN] = { '\0' };
AZ::Utils::ExecutablePathResult result = AZ::Utils::GetExecutableDirectory(cwd_buffer, AZ_ARRAY_SIZE(cwd_buffer));
[[maybe_unused]] AZ::Utils::ExecutablePathResult result = AZ::Utils::GetExecutableDirectory(cwd_buffer, AZ_ARRAY_SIZE(cwd_buffer));
AZ_Assert(result == AZ::Utils::ExecutablePathResult::Success, "Error retrieving executable path");
return static_cast<const char*>(cwd_buffer);
@@ -19,6 +19,18 @@
#include <SceneAPI/SceneCore/Containers/Views/PairIterator.h>
#include <SceneAPI/SceneCore/Tests/Containers/Views/IteratorTestsBase.h>
// This test gives trouble with /permissive-, the following instantiation workarounds the missing resolution
namespace std
{
template<>
void iter_swap(
AZ::SceneAPI::Containers::Views::PairIterator<int*, int*, std::random_access_iterator_tag> lhs,
AZ::SceneAPI::Containers::Views::PairIterator<int*, int*, std::random_access_iterator_tag> rhs)
{
AZStd::iter_swap(lhs, rhs);
}
}
namespace AZ
{
namespace SceneAPI
@@ -230,6 +230,19 @@ namespace AZ
return m_uniqueId;
}
namespace Helper
{
template <typename T>
T ReturnOptionalValue(AZStd::optional<T> value)
{
if (!value)
{
return {};
}
return value.value();
}
}
void MaterialData::Reflect(ReflectContext* context)
{
SerializeContext* serializeContext = azrtti_cast<SerializeContext*>(context);
@@ -285,6 +298,76 @@ namespace AZ
->DataElement(AZ::Edit::UIHandlers::Default, &MaterialData::m_useAOMap, "Use Ambient Occlusion Map", "True to use an ambient occlusion map, false to ignore it.");
}
}
BehaviorContext* behaviorContext = azrtti_cast<BehaviorContext*>(context);
if (behaviorContext)
{
behaviorContext->Class<SceneAPI::DataTypes::IMaterialData>()
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
->Attribute(AZ::Script::Attributes::Module, "scene");
using namespace Helper;
using DataTypes::IMaterialData;
behaviorContext->Class<MaterialData>()
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
->Attribute(AZ::Script::Attributes::Module, "scene")
->Constant("AmbientOcclusion", BehaviorConstant(TextureMapType::AmbientOcclusion))
->Constant("BaseColor", BehaviorConstant(TextureMapType::BaseColor))
->Constant("Bump", BehaviorConstant(TextureMapType::Bump))
->Constant("Diffuse", BehaviorConstant(TextureMapType::Diffuse))
->Constant("Emissive", BehaviorConstant(TextureMapType::Emissive))
->Constant("Metallic", BehaviorConstant(TextureMapType::Metallic))
->Constant("Normal", BehaviorConstant(TextureMapType::Normal))
->Constant("Roughness", BehaviorConstant(TextureMapType::Roughness))
->Constant("Specular", BehaviorConstant(TextureMapType::Specular))
->Method("GetTexture", &MaterialData::GetTexture)
->Method("GetMaterialName", &MaterialData::GetMaterialName)
->Method("IsNoDraw", &MaterialData::IsNoDraw)
->Method("GetDiffuseColor", &MaterialData::GetDiffuseColor)
->Method("GetSpecularColor", &MaterialData::GetSpecularColor)
->Method("GetEmissiveColor", &MaterialData::GetEmissiveColor)
->Method("GetOpacity", &MaterialData::GetOpacity)
->Method("GetUniqueId", &MaterialData::GetUniqueId)
->Method("GetShininess", &MaterialData::GetShininess)
->Method("GetUseColorMap", [](const MaterialData& self)
{
return ReturnOptionalValue(self.GetUseColorMap());
})
->Method("GetBaseColor", [](const MaterialData& self)
{
return ReturnOptionalValue(self.GetBaseColor());
})
->Method("GetUseMetallicMap", [](const MaterialData& self)
{
return ReturnOptionalValue(self.GetUseMetallicMap());
})
->Method("GetMetallicFactor", [](const MaterialData& self)
{
return ReturnOptionalValue(self.GetMetallicFactor());
})
->Method("GetUseRoughnessMap", [](const MaterialData& self)
{
return ReturnOptionalValue(self.GetUseRoughnessMap());
})
->Method("GetRoughnessFactor", [](const MaterialData& self)
{
return ReturnOptionalValue(self.GetRoughnessFactor());
})
->Method("GetUseEmissiveMap", [](const MaterialData& self)
{
return ReturnOptionalValue(self.GetUseEmissiveMap());
})
->Method("GetEmissiveIntensity", [](const MaterialData& self)
{
return ReturnOptionalValue(self.GetEmissiveIntensity());
})
->Method("GetUseAOMap", [](const MaterialData& self)
{
return ReturnOptionalValue(self.GetUseAOMap());
});
}
}
} // namespace GraphData
} // namespace SceneData
@@ -14,6 +14,7 @@
#include <AzCore/Serialization/Json/RegistrationContext.h>
#include <AzCore/std/smart_ptr/make_shared.h>
#include <AzCore/std/smart_ptr/shared_ptr.h>
#include <AzCore/std/optional.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AzTest/AzTest.h>
@@ -27,6 +28,7 @@
#include <SceneAPI/SceneData/GraphData/MeshVertexUVData.h>
#include <SceneAPI/SceneData/GraphData/AnimationData.h>
#include <SceneAPI/SceneData/GraphData/BlendShapeData.h>
#include <SceneAPI/SceneData/GraphData/MaterialData.h>
namespace AZ
{
@@ -145,6 +147,38 @@ namespace AZ
blendShapeData->SetVertexIndexToControlPointIndexMap(2, 0);
return true;
}
else if (data.get_type_info().m_id == azrtti_typeid<AZ::SceneData::GraphData::MaterialData>())
{
auto* materialDataData = AZStd::any_cast<AZ::SceneData::GraphData::MaterialData>(&data);
materialDataData->SetBaseColor(AZStd::make_optional(AZ::Vector3(0.1, 0.2, 0.3)));
materialDataData->SetDiffuseColor({ 0.3, 0.4, 0.5 });
materialDataData->SetEmissiveColor({ 0.4, 0.5, 0.6 });
materialDataData->SetEmissiveIntensity(AZStd::make_optional(0.789f));
materialDataData->SetMaterialName("TestMaterialName");
materialDataData->SetMetallicFactor(AZStd::make_optional(0.123f));
materialDataData->SetNoDraw(true);
materialDataData->SetOpacity(0.7);
materialDataData->SetRoughnessFactor(AZStd::make_optional(0.456f));
materialDataData->SetShininess(1.23);
materialDataData->SetSpecularColor({ 0.8, 0.9, 1.0 });
materialDataData->SetUseAOMap(AZStd::make_optional(true));
materialDataData->SetUseColorMap(AZStd::make_optional(true));
materialDataData->SetUseMetallicMap(AZStd::make_optional(true));
materialDataData->SetUseRoughnessMap(AZStd::make_optional(true));
materialDataData->SetUseEmissiveMap(AZStd::make_optional(true));
materialDataData->SetUniqueId(102938);
materialDataData->SetTexture(AZ::SceneAPI::DataTypes::IMaterialData::TextureMapType::AmbientOcclusion, "ambientocclusion");
materialDataData->SetTexture(AZ::SceneAPI::DataTypes::IMaterialData::TextureMapType::BaseColor, "basecolor");
materialDataData->SetTexture(AZ::SceneAPI::DataTypes::IMaterialData::TextureMapType::Bump, "bump");
materialDataData->SetTexture(AZ::SceneAPI::DataTypes::IMaterialData::TextureMapType::Diffuse, "diffuse");
materialDataData->SetTexture(AZ::SceneAPI::DataTypes::IMaterialData::TextureMapType::Emissive, "emissive");
materialDataData->SetTexture(AZ::SceneAPI::DataTypes::IMaterialData::TextureMapType::Metallic, "metallic");
materialDataData->SetTexture(AZ::SceneAPI::DataTypes::IMaterialData::TextureMapType::Normal, "normal");
materialDataData->SetTexture(AZ::SceneAPI::DataTypes::IMaterialData::TextureMapType::Roughness, "roughness");
materialDataData->SetTexture(AZ::SceneAPI::DataTypes::IMaterialData::TextureMapType::Specular, "specular");
return true;
}
return false;
}
@@ -337,7 +371,7 @@ namespace AZ
ExpectExecute("TestExpectFloatEquals(tangentData.z, 0.19)");
ExpectExecute("TestExpectFloatEquals(tangentData.w, 0.29)");
ExpectExecute("TestExpectIntegerEquals(meshVertexTangentData:GetTangentSetIndex(), 2)");
ExpectExecute("TestExpectTrue(meshVertexTangentData:GetGenerationMethod(), MeshVertexTangentData.EMotionFX)");
ExpectExecute("TestExpectTrue(meshVertexTangentData:GetGenerationMethod(), MeshVertexTangentData.MikkT)");
}
TEST_F(GrapDatahBehaviorScriptTest, SceneGraph_AnimationData_AccessWorks)
@@ -449,6 +483,49 @@ namespace AZ
ExpectExecute("TestExpectFloatEquals(blendShapeData:GetBitangent(2).y, 0.3)");
ExpectExecute("TestExpectFloatEquals(blendShapeData:GetBitangent(2).z, 0.4)");
}
TEST_F(GrapDatahBehaviorScriptTest, SceneGraph_MaterialData_AccessWorks)
{
ExpectExecute("materialData = MaterialData()");
ExpectExecute("TestExpectTrue(materialData ~= nil)");
ExpectExecute("TestExpectTrue(materialData:IsNoDraw() == false)");
ExpectExecute("TestExpectTrue(materialData:GetUseColorMap() == false)");
ExpectExecute("TestExpectTrue(materialData:GetUseMetallicMap() == false)");
ExpectExecute("TestExpectTrue(materialData:GetUseRoughnessMap() == false)");
ExpectExecute("TestExpectTrue(materialData:GetUseEmissiveMap() == false)");
ExpectExecute("TestExpectTrue(materialData:GetUseAOMap() == false)");
ExpectExecute("MockGraphData.FillData(materialData)");
ExpectExecute("TestExpectTrue(materialData:IsNoDraw())");
ExpectExecute("TestExpectTrue(materialData:GetUseColorMap())");
ExpectExecute("TestExpectTrue(materialData:GetUseMetallicMap())");
ExpectExecute("TestExpectTrue(materialData:GetUseRoughnessMap())");
ExpectExecute("TestExpectTrue(materialData:GetUseEmissiveMap())");
ExpectExecute("TestExpectTrue(materialData:GetUseAOMap())");
ExpectExecute("TestExpectFloatEquals(materialData:GetMetallicFactor(), 0.123)");
ExpectExecute("TestExpectFloatEquals(materialData:GetRoughnessFactor(), 0.456)");
ExpectExecute("TestExpectFloatEquals(materialData:GetEmissiveIntensity(), 0.789)");
ExpectExecute("TestExpectFloatEquals(materialData:GetOpacity(), 0.7)");
ExpectExecute("TestExpectFloatEquals(materialData:GetShininess(), 1.23)");
ExpectExecute("TestExpectTrue(materialData:GetMaterialName() == 'TestMaterialName')");
ExpectExecute("TestExpectFloatEquals(materialData:GetBaseColor().x, 0.1)");
ExpectExecute("TestExpectFloatEquals(materialData:GetBaseColor().y, 0.2)");
ExpectExecute("TestExpectFloatEquals(materialData:GetBaseColor().z, 0.3)");
ExpectExecute("TestExpectFloatEquals(materialData:GetDiffuseColor().x, 0.3)");
ExpectExecute("TestExpectFloatEquals(materialData:GetDiffuseColor().y, 0.4)");
ExpectExecute("TestExpectFloatEquals(materialData:GetDiffuseColor().z, 0.5)");
ExpectExecute("TestExpectFloatEquals(materialData:GetEmissiveColor().x, 0.4)");
ExpectExecute("TestExpectFloatEquals(materialData:GetEmissiveColor().y, 0.5)");
ExpectExecute("TestExpectFloatEquals(materialData:GetEmissiveColor().z, 0.6)");
ExpectExecute("TestExpectIntegerEquals(materialData:GetUniqueId(), 102938)");
ExpectExecute("TestExpectTrue(materialData:GetTexture(MaterialData.AmbientOcclusion) == 'ambientocclusion')");
ExpectExecute("TestExpectTrue(materialData:GetTexture(MaterialData.Bump) == 'bump')");
ExpectExecute("TestExpectTrue(materialData:GetTexture(MaterialData.Diffuse) == 'diffuse')");
ExpectExecute("TestExpectTrue(materialData:GetTexture(MaterialData.Emissive) == 'emissive')");
ExpectExecute("TestExpectTrue(materialData:GetTexture(MaterialData.Metallic) == 'metallic')");
ExpectExecute("TestExpectTrue(materialData:GetTexture(MaterialData.Normal) == 'normal')");
ExpectExecute("TestExpectTrue(materialData:GetTexture(MaterialData.Roughness) == 'roughness')");
ExpectExecute("TestExpectTrue(materialData:GetTexture(MaterialData.Specular) == 'specular')");
}
}
}
}
@@ -368,7 +368,7 @@ namespace TestImpact
const AZStd::vector<AZStd::string>& draftedTestRuns,
TestRunReport&& selectedTestRunReport,
TestRunReport&& draftedTestRunReport)
: SequenceReportBase(
: SequenceReportBase<PolicyStateType> (
type,
maxConcurrency,
testTargetTimeout,
@@ -397,57 +397,57 @@ namespace TestImpact
// SequenceReport overrides ...
AZStd::chrono::milliseconds GetDuration() const override
{
return SequenceReportBase::GetDuration() + m_draftedTestRunReport.GetDuration();
return GetDuration() + m_draftedTestRunReport.GetDuration();
}
TestSequenceResult GetResult() const override
{
return CalculateMultiTestSequenceResult({ SequenceReportBase::GetResult(), m_draftedTestRunReport.GetResult() });
return CalculateMultiTestSequenceResult({ GetResult(), m_draftedTestRunReport.GetResult() });
}
size_t GetTotalNumTestRuns() const override
{
return SequenceReportBase::GetTotalNumTestRuns() + m_draftedTestRunReport.GetTotalNumTestRuns();
return GetTotalNumTestRuns() + m_draftedTestRunReport.GetTotalNumTestRuns();
}
size_t GetTotalNumPassingTests() const override
{
return SequenceReportBase::GetTotalNumPassingTests() + m_draftedTestRunReport.GetTotalNumPassingTests();
return GetTotalNumPassingTests() + m_draftedTestRunReport.GetTotalNumPassingTests();
}
size_t GetTotalNumFailingTests() const override
{
return SequenceReportBase::GetTotalNumFailingTests() + m_draftedTestRunReport.GetTotalNumFailingTests();
return GetTotalNumFailingTests() + m_draftedTestRunReport.GetTotalNumFailingTests();
}
size_t GetTotalNumDisabledTests() const override
{
return SequenceReportBase::GetTotalNumDisabledTests() + m_draftedTestRunReport.GetTotalNumDisabledTests();
return GetTotalNumDisabledTests() + m_draftedTestRunReport.GetTotalNumDisabledTests();
}
size_t GetTotalNumPassingTestRuns() const override
{
return SequenceReportBase::GetTotalNumPassingTestRuns() + m_draftedTestRunReport.GetNumPassingTestRuns();
return GetTotalNumPassingTestRuns() + m_draftedTestRunReport.GetNumPassingTestRuns();
}
size_t GetTotalNumFailingTestRuns() const override
{
return SequenceReportBase::GetTotalNumFailingTestRuns() + m_draftedTestRunReport.GetNumFailingTestRuns();
return GetTotalNumFailingTestRuns() + m_draftedTestRunReport.GetNumFailingTestRuns();
}
size_t GetTotalNumExecutionFailureTestRuns() const override
{
return SequenceReportBase::GetTotalNumExecutionFailureTestRuns() + m_draftedTestRunReport.GetNumExecutionFailureTestRuns();
return GetTotalNumExecutionFailureTestRuns() + m_draftedTestRunReport.GetNumExecutionFailureTestRuns();
}
size_t GetTotalNumTimedOutTestRuns() const override
{
return SequenceReportBase::GetTotalNumTimedOutTestRuns() + m_draftedTestRunReport.GetNumTimedOutTestRuns();
return GetTotalNumTimedOutTestRuns() + m_draftedTestRunReport.GetNumTimedOutTestRuns();
}
size_t GetTotalNumUnexecutedTestRuns() const override
{
return SequenceReportBase::GetTotalNumUnexecutedTestRuns() + m_draftedTestRunReport.GetNumUnexecutedTestRuns();
return GetTotalNumUnexecutedTestRuns() + m_draftedTestRunReport.GetNumUnexecutedTestRuns();
}
private:
AZStd::vector<AZStd::string> m_draftedTestRuns;
@@ -26,11 +26,11 @@ namespace TestImpact
constexpr RepoPath() = default;
constexpr RepoPath(const RepoPath&) = default;
constexpr RepoPath(RepoPath&&) noexcept = default;
constexpr RepoPath::RepoPath(const string_type& path) noexcept;
constexpr RepoPath::RepoPath(const string_view_type& path) noexcept;
constexpr RepoPath::RepoPath(const value_type* path) noexcept;
constexpr RepoPath::RepoPath(const AZ::IO::PathView& path);
constexpr RepoPath::RepoPath(const AZ::IO::Path& path);
constexpr RepoPath(const string_type& path) noexcept;
constexpr RepoPath(const string_view_type& path) noexcept;
constexpr RepoPath(const value_type* path) noexcept;
constexpr RepoPath(const AZ::IO::PathView& path);
constexpr RepoPath(const AZ::IO::Path& path);
RepoPath& operator=(const RepoPath&) noexcept = default;
RepoPath& operator=(const string_type&) noexcept;
@@ -14,8 +14,8 @@ namespace TestImpact
{
AZStd::string GetTestTargetExtension(const TestTarget* testTarget)
{
static constexpr char* const standAloneExtension = ".exe";
static constexpr char* const testRunnerExtension = ".dll";
static constexpr const char* const standAloneExtension = ".exe";
static constexpr const char* const testRunnerExtension = ".dll";
switch (const auto launchMethod = testTarget->GetLaunchMethod(); launchMethod)
{
@@ -296,9 +296,8 @@ namespace ImageProcessingAtom
/* skip leading and trailing zeros */
if (trimZeros)
{
/* set i0 and i1 to the nonzero support of the filter */
i0 = i0;
i1 = i1 = lastnonzero + 1;
/* set i1 to the nonzero support of the filter */
i1 = lastnonzero + 1;
}
if (sumiWeights != WEIGHTONE)
@@ -616,8 +616,6 @@ namespace ImageProcessingAtom
a_FilterExtents[oppositeFaceIdx].Augment((a_SrcSize-1), (a_SrcSize-1), 0);
}
}
minV=minV;
}
+1 -2
View File
@@ -101,8 +101,7 @@ ly_add_target(
# The Atom_Asset_Shader is a required gem for Builders in order to process the assets that come WITHOUT
# the Atom_Feature_Common required gem
ly_enable_gems(GEMS Atom_Asset_Shader VARIANTS Builders
TARGETS AssetBuilder AssetProcessor AssetProcessorBatch)
ly_enable_gems(GEMS Atom_Asset_Shader)
################################################################################
# Tests
+1 -11
View File
@@ -45,14 +45,4 @@ ly_create_alias(NAME Atom_Bootstrap.Clients NAMESPACE Gem TARGETS Gem::Atom_Boot
ly_create_alias(NAME Atom_Bootstrap.Servers NAMESPACE Gem TARGETS Gem::Atom_Bootstrap)
# The Atom_Bootstrap gem is responsible for making the NativeWindow handle in the launcher applications
# Loop over each Project name to allow the ${ProjectName}.GameLauncher and ${ProjectName}.ServerLauncher
# target to add the gem the Clients and Servers variant
get_property(LY_PROJECTS_TARGET_NAME GLOBAL PROPERTY LY_PROJECTS_TARGET_NAME)
foreach(project_name IN LISTS LY_PROJECTS_TARGET_NAME)
# Add gem as a dependency of the Clients Launcher
ly_enable_gems(PROJECT_NAME ${project_name} GEMS Atom_Bootstrap VARIANTS Clients TARGETS ${project_name}.GameLauncher)
# Add gem as a dependency of the Servers Launcher
if(PAL_TRAIT_BUILD_SERVER_SUPPORTED)
ly_enable_gems(PROJECT_NAME ${project_name} GEMS Atom_Bootstrap VARIANTS Servers TARGETS ${project_name}.ServerLauncher)
endif()
endforeach()
ly_enable_gems(GEMS Atom_Bootstrap)
@@ -31,6 +31,11 @@ namespace AZ
{
public:
virtual ~FrameCaptureRequests() = default;
//! Return true if frame capture is available.
//! It may return false if null renderer is used.
//! If the frame capture is not available, all capture functions in this interface would return false
virtual bool CanCapture() const = 0;
//! Capture final screen output for the specified window and save it to given file path.
//! The image format is determinate by file extension
@@ -8,6 +8,8 @@
#include "FrameCaptureSystemComponent.h"
#include <Atom/RHI/RHIUtils.h>
#include <Atom/RPI.Public/Pass/PassSystemInterface.h>
#include <Atom/RPI.Public/Pass/PassFilter.h>
#include <Atom/RPI.Public/Pass/RenderPass.h>
@@ -254,8 +256,18 @@ namespace AZ
return AZStd::string(resolvedPath);
}
bool FrameCaptureSystemComponent::CanCapture() const
{
return !AZ::RHI::IsNullRenderer();
}
bool FrameCaptureSystemComponent::CaptureScreenshotForWindow(const AZStd::string& filePath, AzFramework::NativeWindowHandle windowHandle)
{
if (!CanCapture())
{
return false;
}
InitReadback();
if (m_state != State::Idle)
@@ -301,6 +313,11 @@ namespace AZ
bool FrameCaptureSystemComponent::CaptureScreenshotWithPreview(const AZStd::string& outputFilePath)
{
if (!CanCapture())
{
return false;
}
InitReadback();
if (m_state != State::Idle)
@@ -350,6 +367,11 @@ namespace AZ
bool FrameCaptureSystemComponent::CapturePassAttachment(const AZStd::vector<AZStd::string>& passHierarchy, const AZStd::string& slot,
const AZStd::string& outputFilePath, RPI::PassAttachmentReadbackOption option)
{
if (!CanCapture())
{
return false;
}
InitReadback();
if (m_state != State::Idle)
@@ -396,6 +418,11 @@ namespace AZ
bool FrameCaptureSystemComponent::CapturePassAttachmentWithCallback(const AZStd::vector<AZStd::string>& passHierarchy, const AZStd::string& slotName
, RPI::AttachmentReadback::CallbackFunction callback, RPI::PassAttachmentReadbackOption option)
{
if (!CanCapture())
{
return false;
}
bool result = CapturePassAttachment(passHierarchy, slotName, "", option);
// Append state change to user provided call back
@@ -34,6 +34,7 @@ namespace AZ
void Deactivate() override;
// FrameCaptureRequestBus overrides ...
bool CanCapture() const override;
bool CaptureScreenshot(const AZStd::string& filePath) override;
bool CaptureScreenshotForWindow(const AZStd::string& filePath, AzFramework::NativeWindowHandle windowHandle) override;
bool CaptureScreenshotWithPreview(const AZStd::string& outputFilePath) override;
@@ -76,6 +76,7 @@ DCCSI_GDEBUG = env_bool('DCCSI_GDEBUG', False)
DCCSI_DEV_MODE = env_bool('DCCSI_DEV_MODE', False)
DCCSI_GDEBUGGER = env_bool('DCCSI_GDEBUGGER', False)
DCCSI_LOGLEVEL = env_bool('DCCSI_LOGLEVEL', int(20))
DCCSI_WING_VERSION_MAJOR = env_bool('DCCSI_WING_VERSION_MAJOR', '7')
# -------------------------------------------------------------------------
@@ -162,6 +163,25 @@ _LOGGER.debug('Invoking __init__.py for {0}.'.format({_PACKAGENAME}))
# -------------------------------------------------------------------------
def get_datadir() -> pathlib.Path:
"""
persistent application data.
# linux: ~/.local/share
# macOS: ~/Library/Application Support
# windows: C:/Users/<USER>/AppData/Roaming
"""
home = pathlib.Path.home()
if sys.platform == "win32":
return home / "AppData/Roaming"
elif sys.platform == "linux":
return home / ".local/share"
elif sys.platform == "darwin":
return home / "Library/Application Support"
# -------------------------------------------------------------------------
# -------------------------------------------------------------------------
def makedirs(folder, *args, **kwargs):
"""a makedirs for py2.7 support"""
@@ -27,18 +27,17 @@ import numpy as np
# ------------------------------------------------------------------------
_MODULENAME = 'ColorGrading.exr_to_3dl_azasset'
import ColorGrading.initialize
ColorGrading.initialize.start()
_LOGGER = _logging.getLogger(_MODULENAME)
_LOGGER.debug('Initializing: {0}.'.format({_MODULENAME}))
try:
import OpenImageIO as oiio
pass
except ImportError as e:
_LOGGER.error(f"invalid import: {e}")
sys.exit(1)
import ColorGrading.initialize
if ColorGrading.initialize.start():
try:
import OpenImageIO as oiio
pass
except ImportError as e:
_LOGGER.error(f"invalid import: {e}")
sys.exit(1)
# ------------------------------------------------------------------------
@@ -18,18 +18,17 @@ import logging as _logging
# ------------------------------------------------------------------------
_MODULENAME = 'ColorGrading.from_3dl_to_azasset'
import ColorGrading.initialize
ColorGrading.initialize.start()
_LOGGER = _logging.getLogger(_MODULENAME)
_LOGGER.debug('Initializing: {0}.'.format({_MODULENAME}))
try:
import OpenImageIO as oiio
pass
except ImportError as e:
_LOGGER.error(f"invalid import: {e}")
sys.exit(1)
import ColorGrading.initialize
if ColorGrading.initialize.start():
try:
import OpenImageIO as oiio
pass
except ImportError as e:
_LOGGER.error(f"invalid import: {e}")
sys.exit(1)
# ------------------------------------------------------------------------
@@ -17,13 +17,10 @@ from pathlib import Path
import logging as _logging
# local imports
from ColorGrading import env_bool
from ColorGrading import initialize_logger
from ColorGrading import DCCSI_GDEBUG
from ColorGrading import DCCSI_DEV_MODE
from ColorGrading import DCCSI_GDEBUGGER
from ColorGrading import DCCSI_LOGLEVEL
from ColorGrading import FRMT_LOG_LONG
__all__ = ['start']
@@ -44,15 +41,21 @@ _LOGGER.debug('Initializing: {0}.'.format({_MODULENAME}))
# connect to the debugger
if DCCSI_DEV_MODE:
APP_DATA_WING = Path('C:/Users/gallowj/AppData/Roaming/Wing Pro 7')
APP_DATA_WING.resolve()
site.addsitedir(pathlib.PureWindowsPath(APP_DATA_WING).as_posix())
import wingdbstub as debugger
try:
debugger.Ensure()
_LOGGER.info("Wing debugger attached")
except Exception as e:
_LOGGER.debug('Can not attach Wing debugger (running in IDE already?)')
from ColorGrading import DCCSI_WING_VERSION_MAJOR
from ColorGrading import get_datadir
APPDATA = get_datadir() # os APPDATA
APPDATA_WING = Path(APPDATA, f"Wing Pro {DCCSI_WING_VERSION_MAJOR}").resolve()
if APPDATA_WING.exists():
site.addsitedir(pathlib.PureWindowsPath(APPDATA_WING).as_posix())
import wingdbstub as debugger
try:
debugger.Ensure()
_LOGGER.info("Wing debugger attached")
except Exception as e:
_LOGGER.debug('Can not attach Wing debugger (running in IDE already?)')
else:
_LOGGER.warning("Path envar doesn't exist: APPDATA_WING")
_LOGGER.info(f"Pattern: {APPDATA_WING}")
# ------------------------------------------------------------------------
@@ -60,28 +63,16 @@ if DCCSI_DEV_MODE:
def start():
"""set up access to OpenImageIO, within o3de or without"""
# ------------------------------------------------------------------------
running_editor = None
try:
# running in o3de
import azlmbr
_O3DE_DEV = Path(os.getenv('O3DE_DEV', Path(azlmbr.paths.engroot)))
os.environ['O3DE_DEV'] = pathlib.PureWindowsPath(_O3DE_DEV).as_posix()
_LOGGER.debug(_O3DE_DEV)
_O3DE_BIN_PATH = Path(str(_O3DE_DEV),Path(azlmbr.paths.executableFolder))
_O3DE_BIN = Path(os.getenv('O3DE_BIN', _O3DE_BIN_PATH.resolve()))
os.environ['O3DE_BIN'] = pathlib.PureWindowsPath(_O3DE_BIN).as_posix()
_LOGGER.debug(_O3DE_BIN)
site.addsitedir(_O3DE_BIN)
running_editor = True
except Exception as e:
# running external, start this module from:
# "C:\Depot\o3de-engine\Gems\Atom\Feature\Common\Tools\ColorGrading\cmdline\CMD_ColorGradinTools.bat"
pass
# "C:\Depot\o3de-engine\Gems\Atom\Feature\Common\Tools\ColorGrading\cmdline\CMD_ColorGradingTools.bat"
try:
_O3DE_DEV = Path(os.getenv('O3DE_DEV'))
_O3DE_DEV = _O3DE_DEV.resolve()
@@ -102,15 +93,32 @@ def start():
except EnvironmentError as e:
_LOGGER.error('O3DE bin folder not set or found')
raise e
# ------------------------------------------------------------------------
if running_editor:
_O3DE_DEV = Path(os.getenv('O3DE_DEV', Path(azlmbr.paths.engroot)))
os.environ['O3DE_DEV'] = pathlib.PureWindowsPath(_O3DE_DEV).as_posix()
_LOGGER.debug(_O3DE_DEV)
_O3DE_BIN_PATH = Path(str(_O3DE_DEV),Path(azlmbr.paths.executableFolder))
_O3DE_BIN = Path(os.getenv('O3DE_BIN', _O3DE_BIN_PATH.resolve()))
os.environ['O3DE_BIN'] = pathlib.PureWindowsPath(_O3DE_BIN).as_posix()
_LOGGER.debug(_O3DE_BIN)
site.addsitedir(_O3DE_BIN)
# ------------------------------------------------------------------------
try:
import OpenImageIO as OpenImageIO
except ImportError as e:
_LOGGER.error(f"invalid import: {e}")
sys.exit(1)
# test access to oiio
if os.name == 'nt':
try:
import OpenImageIO as oiio
return True
except ImportError as e:
_LOGGER.error(f"invalid import: {e}")
pass
else:
_LOGGER.info("Non-Windows platforms not yet supported...")
return False
# ------------------------------------------------------------------------
@@ -120,4 +128,5 @@ except ImportError as e:
if __name__ == '__main__':
"""Run this file as main"""
start()
oiio_exists = start()
_LOGGER.debug(f"Import OpenImageIO performed: {oiio_exists}")
@@ -11,42 +11,23 @@
import sys
import os
import site
import argparse
import math
import pathlib
from pathlib import Path
import logging as _logging
from env_bool import env_bool
# ------------------------------------------------------------------------
_MODULENAME = 'ColorGrading.lut_compositor'
# set these true if you want them set globally for debugging
_DCCSI_GDEBUG = env_bool('DCCSI_GDEBUG', False)
_DCCSI_DEV_MODE = env_bool('DCCSI_DEV_MODE', False)
_DCCSI_GDEBUGGER = env_bool('DCCSI_GDEBUGGER', False)
_DCCSI_LOGLEVEL = env_bool('DCCSI_LOGLEVEL', int(20))
if _DCCSI_GDEBUG:
_DCCSI_LOGLEVEL = int(10)
FRMT_LOG_LONG = "[%(name)s][%(levelname)s] >> %(message)s (%(asctime)s; %(filename)s:%(lineno)d)"
_logging.basicConfig(level=_DCCSI_LOGLEVEL,
format=FRMT_LOG_LONG,
datefmt='%m-%d %H:%M')
_LOGGER = _logging.getLogger(_MODULENAME)
_LOGGER.debug('Initializing: {0}.'.format({_MODULENAME}))
import ColorGrading.initialize
ColorGrading.initialize.start()
try:
import OpenImageIO as oiio
pass
except ImportError as e:
_LOGGER.error(f"invalid import: {e}")
sys.exit(1)
if ColorGrading.initialize.start():
try:
import OpenImageIO as oiio
pass
except ImportError as e:
_LOGGER.error(f"invalid import: {e}")
sys.exit(1)
# ------------------------------------------------------------------------
operations = {"composite": 0, "extract": 1}
@@ -62,49 +43,49 @@ args = parser.parse_args()
op = operations.get(args.op, invalidOp)
if op == invalidOp:
print("invalid operation")
_LOGGER.warning("invalid operation")
sys.exit(1)
elif op == 0:
if args.l is None:
print("no LUT file specified")
_LOGGER.warning("no LUT file specified")
sys.exit()
# read in the input image
inBuf = oiio.ImageBuf(args.i)
inSpec = inBuf.spec()
print("Input resolution is ", inBuf.spec().width, " x ", inBuf.spec().height)
image_buffer = oiio.ImageBuf(args.i)
image_spec = image_buffer.spec()
_LOGGER.info("Input resolution is ", image_buffer.spec().width, " x ", image_buffer.spec().height)
if op == 0:
outFileName = args.o
print("writing %s..." % (outFileName))
lutBuf = oiio.ImageBuf(args.l)
lutSpec = lutBuf.spec()
print("Resolution is ", lutBuf.spec().width, " x ", lutBuf.spec().height)
if lutSpec.width != lutSpec.height*lutSpec.height:
print("invalid input file dimensions. Expect lengthwise LUT with dimension W: s*s X H: s, where s is the size of the LUT")
out_file_name = args.o
_LOGGER.info("writing %s..." % (out_file_name))
lut_buffer = oiio.ImageBuf(args.l)
lut_spec = lut_buffer.spec()
_LOGGER.info("Resolution is ", lut_buffer.spec().width, " x ", lut_buffer.spec().height)
if lut_spec.width != lut_spec.height*lut_spec.height:
_LOGGER.warning("invalid input file dimensions. Expect lengthwise LUT with dimension W: s*s X H: s, where s is the size of the LUT")
sys.exit(1)
lutSize = lutSpec.height
outSpec = oiio.ImageSpec(inSpec.width, inSpec.height, 3, oiio.TypeFloat)
outBuf = oiio.ImageBuf(outSpec)
outBuf.write(outFileName)
for y in range(outBuf.ybegin, outBuf.yend):
for x in range(outBuf.xbegin, outBuf.xend):
srcPx = inBuf.getpixel(x, y)
dstPx = (srcPx[0], srcPx[1], srcPx[2])
if y < lutSpec.height and x < lutSpec.width:
lutPx = lutBuf.getpixel(x, y)
dstPx = (lutPx[0], lutPx[1], lutPx[2])
outBuf.setpixel(x, y, dstPx)
outBuf.write(outFileName)
lut_size = lut_spec.height
out_image_spec = oiio.ImageSpec(image_spec.width, image_spec.height, 3, oiio.TypeFloat)
out_image_buffer = oiio.ImageBuf(out_image_spec)
out_image_buffer.write(out_file_name)
for y in range(out_image_buffer.ybegin, out_image_buffer.yend):
for x in range(out_image_buffer.xbegin, out_image_buffer.xend):
src_pixel = image_buffer.getpixel(x, y)
dst_pixel = (src_pixel[0], src_pixel[1], src_pixel[2])
if y < lut_spec.height and x < lut_spec.width:
lut_pixel = lut_buffer.getpixel(x, y)
dst_pixel = (lut_pixel[0], lut_pixel[1], lut_pixel[2])
out_image_buffer.setpixel(x, y, dst_pixel)
out_image_buffer.write(out_file_name)
elif op == 1:
outFileName = args.o
print("writing %s..." % (outFileName))
lutSize = args.s
lutSpec = oiio.ImageSpec(lutSize*lutSize, lutSize, 3, oiio.TypeFloat)
lutBuf = oiio.ImageBuf(lutSpec)
for y in range(lutBuf.ybegin, lutBuf.yend):
for x in range(lutBuf.xbegin, lutBuf.xend):
srcPx = inBuf.getpixel(x, y)
dstPx = (srcPx[0], srcPx[1], srcPx[2])
lutBuf.setpixel(x, y, dstPx)
lutBuf.write(outFileName)
out_file_name = args.o
_LOGGER.info("writing %s..." % (out_file_name))
lut_size = args.s
lut_spec = oiio.ImageSpec(lut_size*lut_size, lut_size, 3, oiio.TypeFloat)
lut_buffer = oiio.ImageBuf(lut_spec)
for y in range(lut_buffer.ybegin, lut_buffer.yend):
for x in range(lut_buffer.xbegin, lut_buffer.xend):
src_pixel = image_buffer.getpixel(x, y)
dst_pixel = (src_pixel[0], src_pixel[1], src_pixel[2])
lut_buffer.setpixel(x, y, dst_pixel)
lut_buffer.write(out_file_name)
@@ -23,18 +23,17 @@ from pathlib import Path
# ------------------------------------------------------------------------
_MODULENAME = 'ColorGrading.lut_helper'
import ColorGrading.initialize
ColorGrading.initialize.start()
_LOGGER = _logging.getLogger(_MODULENAME)
_LOGGER.debug('Initializing: {0}.'.format({_MODULENAME}))
try:
import OpenImageIO as oiio
pass
except ImportError as e:
_LOGGER.error(f"invalid import: {e}")
sys.exit(1)
import ColorGrading.initialize
if ColorGrading.initialize.start():
try:
import OpenImageIO as oiio
pass
except ImportError as e:
_LOGGER.error(f"invalid import: {e}")
sys.exit(1)
# ------------------------------------------------------------------------
@@ -13,48 +13,19 @@ Example: color grading related scripts
"""
# ------------------------------------------------------------------------
# standard imports
import sys
import os
import inspect
import pathlib
import site
from pathlib import Path
import logging as _logging
# ------------------------------------------------------------------------
_MODULENAME = 'Gems.Atom.Feature.Common.bootstrap'
# print (inspect.getfile(inspect.currentframe()) # script filename (usually with path)
# script directory
_MODULE_PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
_MODULE_PATH = Path(_MODULE_PATH)
site.addsitedir(_MODULE_PATH.resolve())
from ColorGrading import env_bool
from ColorGrading import initialize_logger
from ColorGrading import DCCSI_GDEBUG
from ColorGrading import DCCSI_DEV_MODE
from ColorGrading import DCCSI_LOGLEVEL
if DCCSI_GDEBUG:
DCCSI_LOGLEVEL = int(10)
_LOGGER = initialize_logger(_MODULENAME, log_to_file=False, default_log_level=DCCSI_LOGLEVEL)
_LOGGER.info('Initializing: {0}.'.format({_MODULENAME}))
_LOGGER = initialize_logger(_MODULENAME, log_to_file=False)
_LOGGER.info(f'site.addsitedir({_MODULE_PATH.resolve()})')
# early connect to the debugger
if DCCSI_DEV_MODE:
APP_DATA_WING = Path('C:/Users/gallowj/AppData/Roaming/Wing Pro 7')
APP_DATA_WING.resolve()
site.addsitedir(pathlib.PureWindowsPath(APP_DATA_WING).as_posix())
import wingdbstub as debugger
try:
debugger.Ensure()
_LOGGER.info("Wing debugger attached")
except Exception as e:
_LOGGER.debug('Can not attach Wing debugger (running in IDE already?)')
from ColorGrading.initialize import start
start()
# ------------------------------------------------------------------------
@@ -1,232 +0,0 @@
#! C:/Program Files/Nuke13.0v3/nuke-13.0.3.dll -nx
version 13.0 v3
define_window_layout_xml {<?xml version="1.0" encoding="UTF-8"?>
<layout version="1.0">
<window x="108" y="0" w="3729" h="2127" screen="0">
<splitter orientation="1">
<split size="40"/>
<dock id="" hideTitles="1" activePageId="Toolbar.1">
<page id="Toolbar.1"/>
</dock>
<split size="3066" stretch="1"/>
<splitter orientation="2">
<split size="1224"/>
<dock id="" activePageId="Viewer.6">
<page id="Viewer.1"/>
<page id="Viewer.2"/>
<page id="Viewer.3"/>
<page id="Viewer.4"/>
<page id="Viewer.5"/>
<page id="Viewer.6"/>
<page id="Viewer.7"/>
</dock>
<split size="861"/>
<dock id="" activePageId="DAG.1" focus="true">
<page id="DAG.1"/>
<page id="Curve Editor.1"/>
<page id="DopeSheet.1"/>
</dock>
</splitter>
<split size="615"/>
<dock id="" activePageId="Properties.1">
<page id="Properties.1"/>
<page id="uk.co.thefoundry.backgroundrenderview.1"/>
</dock>
</splitter>
</window>
</layout>
}
Root {
inputs 0
name C:/Depot/o3de/Gems/Atom/Feature/Common/Tools/ColorGrading/Resources/TestData/Nuke/HDR/Test_Extreme_Grade/Nuke_Test_Extreme_Grade.nk
project_directory "\"C:/Depot/o3de-engine/Gems/AtomLyIntegration/CommonFeatures/Tools/ColorGrading/TestData/Nuke/"
format "2048 1556 0 0 2048 1556 1 2K_Super_35(full-ap)"
proxy_type scale
proxy_format "1024 778 0 0 1024 778 1 1K_Super_35(full-ap)"
colorManagement OCIO
OCIO_config aces_1.0.3
defaultViewerLUT "OCIO LUTs"
workingSpaceLUT scene_linear
monitorLut ACES/Rec.709
monitorOutLUT "sRGB (ACES)"
int8Lut matte_paint
int16Lut texture_paint
logLut compositing_log
floatLut scene_linear
}
Read {
inputs 0
file_type exr
file C:/Depot/o3de/Gems/Atom/Feature/Common/Tools/ColorGrading/Resources/LUTs/linear_32_LUT.exr
format "1024 32 0 0 1024 32 1 "
origset true
colorspace data
name Read_Linear_LUT_32
xpos -846
ypos 10
}
set Ncf69800 [stack 0]
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer1
xpos -847
ypos 135
}
push $Ncf69800
OCIOFileTransform {
file C:/Depot/o3de-engine/Tools/ColorGrading/OpenColorIO-Configs/aces_1.0.3/luts/Log2_48_nits_Shaper_to_linear.spi1d
working_space scene_linear
name Log2_48_nits_Shaper_to_linear
xpos -710
ypos 46
}
set Ncf69000 [stack 0]
Transform {
center {1024 778}
name Transform_Position_LUT
xpos -579
ypos 3
}
set Ncf68c00 [stack 0]
Read {
inputs 0
file_type exr
file C:/Depot/o3de/Gems/Atom/Feature/Common/Tools/ColorGrading/Resources/TestData/displaymapperpassthrough.exr
format "2802 1854 0 0 2802 1854 1 "
origset true
name Read_DisplayMapperPassthrough
xpos -577
ypos -119
}
ZMerge {
inputs 2
name ZMerge_Combine
xpos -413
ypos -83
}
set Ncef7c00 [stack 0]
HueShift {
ingray 0.136
outgray 0.31
saturation 2
color_saturation 0.3
hue_rotation -150
brightness 0.81
name HueShift1
xpos -256
ypos -83
}
set Ncef7800 [stack 0]
OCIOCDLTransform {
saturation 1.23
working_space scene_linear
name INV_Log2_48_nits_Shaper_to_linear
xpos -86
ypos -83
}
set Ncef7400 [stack 0]
Crop {
box {0 0 1024 32}
reformat true
crop false
name Crop1
xpos -86
ypos 32
}
set Ncef7000 [stack 0]
OCIOFileTransform {
file C:/Depot/o3de-engine/Tools/ColorGrading/OpenColorIO-Configs/aces_1.0.3/luts/Log2_48_nits_Shaper_to_linear.spi1d
direction inverse
working_space reference
name OCIOFileTransform2
xpos 84
ypos 32
}
Write {
file C:/Depot/o3de/Gems/Atom/Feature/Common/Tools/ColorGrading/Resources/TestData/Nuke/HDR/Test_Extreme_Grade/test-extreme-grade_inv-Log2-48nits_32_LUT.exr
colorspace data
raw true
file_type exr
write_ACES_compliant_EXR true
datatype "32 bit float"
first_part rgba
version 8
name Write_RAW_LUT
xpos 242
ypos 20
}
Viewer {
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer7
xpos 242
ypos 135
}
push $Ncef7400
Write {
file C:/Depot/o3de/Gems/Atom/Feature/Common/Tools/ColorGrading/Resources/TestData/Nuke/HDR/Test_Grade/Shot_post_test-extreme-grade.exr
colorspace compositing_linear
file_type exr
write_ACES_compliant_EXR true
datatype "32 bit float"
first_part rgba
version 7
name Write_Shot_Grade_Comp
xpos 353
ypos -95
}
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer8
xpos 357
ypos 135
}
push $Ncf69000
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer2
xpos -710
ypos 137
}
push $Ncf68c00
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer3
xpos -579
ypos 135
}
push $Ncef7c00
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer4
xpos -413
ypos 133
}
push $Ncef7800
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer5
xpos -254
ypos 133
}
push $Ncef7000
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer6
xpos -86
ypos 134
}
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7ea4288b55725bfa89d7add69ea45b0ac9315cfffd6acfba66082f4d21c1ac1a
size 31227624
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9ff499c054a259a3cd389b613382066f258287215f61da56115b3e958733dbe6
size 31227639
@@ -1,227 +0,0 @@
#! C:/Program Files/Nuke13.0v3/nuke-13.0.3.dll -nx
version 13.0 v3
define_window_layout_xml {<?xml version="1.0" encoding="UTF-8"?>
<layout version="1.0">
<window x="108" y="0" w="3729" h="2127" screen="0">
<splitter orientation="1">
<split size="40"/>
<dock id="" hideTitles="1" activePageId="Toolbar.1">
<page id="Toolbar.1"/>
</dock>
<split size="2883" stretch="1"/>
<splitter orientation="2">
<split size="1224"/>
<dock id="" activePageId="Viewer.1">
<page id="Viewer.1"/>
<page id="Viewer.2"/>
<page id="Viewer.3"/>
<page id="Viewer.4"/>
<page id="Viewer.5"/>
<page id="Viewer.6"/>
<page id="Viewer.7"/>
<page id="Viewer.8"/>
</dock>
<split size="861"/>
<dock id="" activePageId="DAG.1">
<page id="DAG.1"/>
<page id="Curve Editor.1"/>
<page id="DopeSheet.1"/>
</dock>
</splitter>
<split size="798"/>
<dock id="" activePageId="Properties.1" focus="true">
<page id="Properties.1"/>
<page id="uk.co.thefoundry.backgroundrenderview.1"/>
</dock>
</splitter>
</window>
</layout>
}
Root {
inputs 0
name C:/Depot/o3de/Gems/Atom/Feature/Common/Assets/ColorGrading/TestData/Nuke/HDR/Test_Grade/Test-Grade.nk
project_directory "\"C:/Depot/o3de-engine/Gems/AtomLyIntegration/CommonFeatures/Tools/ColorGrading/TestData/Nuke/"
format "2048 1556 0 0 2048 1556 1 2K_Super_35(full-ap)"
proxy_type scale
proxy_format "1024 778 0 0 1024 778 1 1K_Super_35(full-ap)"
colorManagement OCIO
OCIO_config aces_1.0.3
defaultViewerLUT "OCIO LUTs"
workingSpaceLUT scene_linear
monitorLut ACES/Rec.709
monitorOutLUT "sRGB (ACES)"
int8Lut matte_paint
int16Lut texture_paint
logLut compositing_log
floatLut scene_linear
}
Read {
inputs 0
file_type exr
file C:/Depot/o3de/Gems/Atom/Feature/Common/Tools/ColorGrading/Resources/LUTs/linear_32_LUT.exr
format "1024 32 0 0 1024 32 1 "
origset true
colorspace data
raw true
name Read_Linear_LUT_32
xpos -846
ypos 10
}
set N3bfa9800 [stack 0]
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer1
xpos -846
ypos 135
}
push $N3bfa9800
OCIOFileTransform {
file C:/Depot/o3de-engine/Tools/ColorGrading/OpenColorIO-Configs/aces_1.0.3/luts/Log2_48_nits_Shaper_to_linear.spi1d
working_space rendering
name Log2_48_nits_Shaper_to_linear
xpos -710
ypos 46
}
set N3bfa9000 [stack 0]
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer2
xpos -710
ypos 137
}
push $N3bfa9000
Transform {
center {1024 778}
name Transform_Position_LUT
xpos -579
ypos 3
}
set N3bfa8c00 [stack 0]
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer3
xpos -579
ypos 135
}
push $N3bfa8c00
Read {
inputs 0
file_type exr
file C:/Depot/o3de/Gems/Atom/Feature/Common/Tools/ColorGrading/Resources/TestData/displaymapperpassthrough.exr
format "2802 1854 0 0 2802 1854 1 "
origset true
name Read_DisplayMapperPassthrough
xpos -580
ypos -146
}
ZMerge {
inputs 2
name ZMerge_Combine
xpos -413
ypos -83
}
set N3bf5bc00 [stack 0]
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer4
xpos -413
ypos 128
}
push $N3bf5bc00
HueShift {
ingray {0.18 0.18 0.18}
outgray {0.18 0.18 0.18}
saturation 1.26
color {0.12 0.12 0.12}
color_saturation 0.78
hue_rotation -150
brightness 0.74
name HueShift1
xpos -256
ypos -83
}
set N3bf5b800 [stack 0]
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer5
xpos -256
ypos 130
}
push $N3bf5b800
Crop {
box {0 0 1024 32}
reformat true
crop false
name Crop1
xpos -86
ypos 32
}
set N3bf5ac00 [stack 0]
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer6
xpos -86
ypos 134
}
push $N3bf5b800
Write {
file C:/Depot/o3de/Gems/Atom/Feature/Common/Tools/ColorGrading/Resources/TestData/Nuke/HDR/Test_Grade/Nuke_Shot_post_grade.exr
colorspace compositing_linear
file_type exr
write_ACES_compliant_EXR true
datatype "32 bit float"
first_part rgba
version 10
name Write_Shot_Grade_Comp
selected true
xpos 353
ypos -95
}
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer8
xpos 353
ypos 135
}
push $N3bf5ac00
OCIOFileTransform {
file C:/Depot/o3de-engine/Tools/ColorGrading/OpenColorIO-Configs/aces_1.0.3/luts/Log2_48_nits_Shaper_to_linear.spi1d
direction inverse
working_space data
name invLog2_48_nits_Shaper_to_linear
xpos 74
ypos -14
}
Write {
file C:/Depot/o3de/Gems/Atom/Feature/Common/Tools/ColorGrading/Resources/TestData/Nuke/HDR/Test_Grade/test-grade_inv-Log2-48nits_32_LUT.exr
colorspace data
file_type exr
datatype "32 bit float"
first_part rgba
version 10
name Write_RAW_LUT
xpos 242
ypos 20
}
Viewer {
frame 1
frame_range 1-100
viewerProcess "sRGB (ACES)"
name Viewer7
xpos 242
ypos 135
}
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c0276e1d329cda3514f46a55fd1d3ce90fce617814198ab69d234f2c58c15882
size 98742272
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ce91088eaa54afab608bfcea6ab4009cbb3027cb83c76710a46470144e7d799d
size 98638424
@@ -24,7 +24,7 @@ PUSHD %~dp0
SETLOCAL ENABLEDELAYEDEXPANSION
:: if the user has set up a custom env call it
IF EXIST "%~dp0User_env.bat" CALL %~dp0User_env.bat
IF EXIST "%~dp0User_Env.bat" CALL %~dp0User_Env.bat
:: Initialize env
CALL %~dp0\Env_Core.bat
@@ -20,8 +20,6 @@ PUSHD %~dp0
CALL %~dp0\Env_Core.bat
::SETLOCAL ENABLEDELAYEDEXPANSION
echo.
echo _____________________________________________________________________
echo.
@@ -67,11 +65,14 @@ echo DCCSI_PY_BASE = %DCCSI_PY_BASE%
:: ide and debugger plug
set DCCSI_PY_DEFAULT=%DCCSI_PY_BASE%
set DCCSI_PY_IDE=%DCCSI_PYTHON_INSTALL%\runtime\python-3.7.10-rev1-windows\python
IF "%DCCSI_PY_REV%"=="" (set DCCSI_PY_REV=rev2)
IF "%DCCSI_PY_PLATFORM%"=="" (set DCCSI_PY_PLATFORM=windows)
set DCCSI_PY_IDE=%DCCSI_PYTHON_INSTALL%\runtime\python-%DCCSI_PY_VERSION_MAJOR%.%DCCSI_PY_VERSION_MINOR%.%DCCSI_PY_VERSION_RELEASE%-%DCCSI_PY_REV%-%DCCSI_PY_PLATFORM%\python
echo DCCSI_PY_IDE = %DCCSI_PY_IDE%
:: Wing and other IDEs probably prefer access directly to the python.exe
set DCCSI_PY_EXE=%DCCSI_PYTHON_INSTALL%\runtime\python-3.7.10-rev1-windows\python\python.exe
set DCCSI_PY_EXE=%DCCSI_PY_IDE%\python.exe
echo DCCSI_PY_EXE = %DCCSI_PY_EXE%
set DCCSI_PY_IDE_PACKAGES=%DCCSI_PY_IDE%\Lib\site-packages
@@ -90,7 +91,10 @@ SET PATH=%DCCSI_PYTHON_INSTALL%;%DCCSI_PY_IDE%;%DCCSI_PY_IDE_PACKAGES%;%DCCSI_PY
set PYTHONPATH=%DCCSIG_PATH%;%DCCSI_PYTHON_LIB_PATH%;%O3DE_BIN_PATH%;%DCCSI_COLORGRADING_SCRIPTS%;%DCCSI_FEATURECOMMON_SCRIPTS%;%PYTHONPATH%
echo PYTHONPATH = %PYTHONPATH%
::ENDLOCAL
:: used for debugging in WingIDE (but needs to be here)
IF "%TAG_USERNAME%"=="" (set TAG_USERNAME=NOT_SET)
echo TAG_USERNAME = %TAG_USERNAME%
IF "%TAG_USERNAME%"=="NOT_SET" (echo Add TAG_USERNAME to User_Env.bat)
:: Set flag so we don't initialize dccsi environment twice
SET O3DE_ENV_PY_INIT=1
@@ -38,8 +38,6 @@ set DCCSI_PY_DEFAULT=%DCCSI_PY_IDE%\python.exe
set WINGHOME=%PROGRAMFILES(X86)%\Wing Pro %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR%
IF "%WING_PROJ%"=="" (set WING_PROJ=%O3DE_PROJECT_PATH%\.solutions\.wing\o3de_color_grading_%DCCSI_WING_VERSION_MAJOR%x.wpr)
::SETLOCAL ENABLEDELAYEDEXPANSION
echo.
echo _____________________________________________________________________
echo.
@@ -55,8 +53,6 @@ echo WING_PROJ = %WING_PROJ%
:: add to the PATH
SET PATH=%WINGHOME%;%PATH%
::ENDLOCAL
:: Set flag so we don't initialize dccsi environment twice
SET DCCSI_ENV_WINGIDE_INIT=1
GOTO END_OF_FILE
@@ -73,9 +73,6 @@ echo DCCSI_PY_BASE = %DCCSI_PY_BASE%
set DCCSI_PY_DEFAULT=%DCCSI_PY_BASE%
echo DCCSI_PY_DEFAULT = %DCCSI_PY_DEFAULT%
:: if the user has set up a custom env call it
IF EXIST "%~dp0User_Dev.bat" CALL %~dp0User_Dev.bat
echo.
:: Change to root dir
@@ -19,17 +19,16 @@ IF "%O3DE_USER_ENV_INIT%"=="1" GOTO :END_OF_FILE
cd %~dp0
PUSHD %~dp0
SETLOCAL ENABLEDELAYEDEXPANSION
SET O3DE_DEV=C:\Depot\o3de-engine
::SET OCIO_APPS=C:\Depot\o3de-engine\Tools\ColorGrading\ocio\build\src\apps
SET TAG_LY_BUILD_PATH=build
SET DCCSI_GDEBUG=True
SET DCCSI_DEV_MODE=True
SET WING_PROJ=%O3DE_PROJECT_PATH%\.solutions\.wing\o3de_color_grading_%DCCSI_WING_VERSION_MAJOR%x.wpr
::ENDLOCAL
:: set the your user name here for windows path
SET TAG_USERNAME=< not set >
SET DCCSI_PY_REV=rev1
SET DCCSI_PY_PLATFORM=windows
:: Set flag so we don't initialize dccsi environment twice
SET O3DE_USER_ENV_INIT=1
@@ -11,6 +11,8 @@
#include <RHI/PipelineLayout.h>
#include <RHI/PipelineState.h>
#include <RHI/MemoryView.h>
#include <RHI/ShaderResourceGroup.h>
#include <RHI/Conversions.h>
#include <Atom/RHI.Reflect/ClearValue.h>
#include <Atom/RHI/CommandList.h>
#include <Atom/RHI/CommandListValidator.h>
@@ -0,0 +1,20 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <RHI/Fence.h>
namespace AZ
{
namespace Null
{
RHI::Ptr<Fence> Fence::Create()
{
return aznew Fence();
}
}
}
@@ -0,0 +1,40 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <Atom/RHI/Fence.h>
namespace AZ
{
namespace Null
{
class Fence
: public RHI::Fence
{
using Base = RHI::Fence;
public:
AZ_RTTI(Fence, "{34908F40-A7DE-4EE8-A871-71ACE0C24972}", Base);
AZ_CLASS_ALLOCATOR(Fence, AZ::SystemAllocator, 0);
static RHI::Ptr<Fence> Create();
private:
Fence() = default;
//////////////////////////////////////////////////////////////////////////
// RHI::Fence
RHI::ResultCode InitInternal([[maybe_unused]] RHI::Device& device, [[maybe_unused]] RHI::FenceState initialState) override { return RHI::ResultCode::Success;}
void ShutdownInternal() override {}
void SignalOnCpuInternal() override {}
void WaitOnCpuInternal() const override {}
void ResetInternal() override {}
RHI::FenceState GetFenceStateInternal() const override { return RHI::FenceState::Signaled;};
//////////////////////////////////////////////////////////////////////////
};
}
}
@@ -16,6 +16,7 @@
#include <AzCore/Serialization/SerializeContext.h>
#include <RHI/BufferPool.h>
#include <RHI/BufferView.h>
#include <RHI/Fence.h>
#include <RHI/FrameGraphExecuter.h>
#include <RHI/FrameGraphCompiler.h>
#include <RHI/Image.h>
@@ -99,7 +100,7 @@ namespace AZ
RHI::Ptr<RHI::Fence> SystemComponent::CreateFence()
{
return nullptr;
return Fence::Create();
}
RHI::Ptr<RHI::Buffer> SystemComponent::CreateBuffer()
@@ -21,6 +21,8 @@ set(FILES
Source/RHI/CommandQueue.h
Source/RHI/Device.cpp
Source/RHI/Device.h
Source/RHI/Fence.cpp
Source/RHI/Fence.h
Source/RHI/FrameGraphCompiler.cpp
Source/RHI/FrameGraphCompiler.h
Source/RHI/FrameGraphExecuter.cpp
@@ -8,7 +8,7 @@
#pragma once
#include <AzCore/base.h>
#include <Azcore/PlatformIncl.h>
#include <AzCore/PlatformIncl.h>
#include <AzCore/std/algorithm.h>
#include <vulkan/vulkan.h>
#include <limits.h>
@@ -21,6 +21,7 @@
#include <Atom/RHI/FrameGraphExecuteContext.h>
#include <Atom/RHI/FrameScheduler.h>
#include <Atom/RHI/RHISystemInterface.h>
#include <Atom/RHI/RHIUtils.h>
#include <Atom/RHI/ScopeProducerFunction.h>
#include <AzCore/Serialization/Json/JsonUtils.h>
@@ -175,6 +176,11 @@ namespace AZ
bool AttachmentReadback::ReadPassAttachment(const PassAttachment* attachment, const AZ::Name& readbackName)
{
if (AZ::RHI::IsNullRenderer())
{
return false;
}
if (!IsReady())
{
AZ_Assert(false, "AttachmentReadback is not ready to readback an attachment");
@@ -133,6 +133,9 @@ ly_add_target_dependencies(
DEPENDENCIES_FILES
tool_dependencies.cmake
Source/Platform/${PAL_PLATFORM_NAME}/tool_dependencies_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
# The Material Editor needs the LyShine "Tools" gem variant for the custom LyShine pass
DEPENDENT_TARGETS
Gem::LyShine.Tools
)
# Inject the project path into the MaterialEditor VS debugger command arguments if the build system being invoked
@@ -123,27 +123,10 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
Gem::AtomLyIntegration_CommonFeatures.Editor
Gem::GradientSignal.Tools
)
# AtomLyIntergration_CommonFeatures gem targets are required as part of the Editor and AssetProcessor
# due to the AZ::Render::EditorDirectionalLightComponent, AZ::Render::EditorMeshComponent,
# AZ::Render::EditorGridComponent, AZ::Render::EditorHDRiSkyboxComponent,
# AZ::Render::EditorImageBasedLightComponent being saved as part of the DefaultLevel.prefab
ly_enable_gems(GEMS AtomLyIntegration_CommonFeatures VARIANTS Tools
TARGETS Editor)
ly_enable_gems(GEMS AtomLyIntegration_CommonFeatures VARIANTS Builders
TARGETS AssetBuilder AssetProcessor AssetProcessorBatch)
endif()
# Added dependencies to the Client and Server Launchers
get_property(LY_PROJECTS_TARGET_NAME GLOBAL PROPERTY LY_PROJECTS_TARGET_NAME)
foreach(project_name IN LISTS LY_PROJECTS_TARGET_NAME)
# Add gem as a dependency of the Clients Launcher
ly_enable_gems(PROJECT_NAME ${project_name} GEMS AtomLyIntegration_CommonFeatures VARIANTS Clients
TARGETS ${project_name}.GameLauncher)
# Add gem as a dependency of the Servers Launcher
if(PAL_TRAIT_BUILD_SERVER_SUPPORTED)
ly_enable_gems(PROJECT_NAME ${project_name} GEMS AtomLyIntegration_CommonFeatures VARIANTS Servers
TARGETS ${project_name}.ServerLauncher)
endif()
endforeach()
# AtomLyIntegration_CommonFeatures gem targets are required as part of the Editor and AssetProcessor
# due to the AZ::Render::EditorDirectionalLightComponent, AZ::Render::EditorMeshComponent,
# AZ::Render::EditorGridComponent, AZ::Render::EditorHDRiSkyboxComponent,
# AZ::Render::EditorImageBasedLightComponent being saved as part of the DefaultLevel.prefab
ly_enable_gems(GEMS AtomLyIntegration_CommonFeatures)
@@ -578,15 +578,14 @@ namespace AZ
{
if (m_meshHandle.IsValid() && m_meshFeatureProcessor)
{
Aabb aabb = m_meshFeatureProcessor->GetLocalAabb(m_meshHandle);
if (Aabb aabb = m_meshFeatureProcessor->GetLocalAabb(m_meshHandle); aabb.IsValid())
{
aabb.MultiplyByScale(m_cachedNonUniformScale);
return aabb;
}
}
aabb.MultiplyByScale(m_cachedNonUniformScale);
return aabb;
}
else
{
return Aabb::CreateNull();
}
return Aabb::CreateNull();
}
AzFramework::RenderGeometry::RayResult MeshComponentController::RenderGeometryIntersect(
@@ -9,6 +9,7 @@
#include <Blast/BlastMaterial.h>
#include <Family/ActorTracker.h>
#include <Blast/BlastSystemBus.h>
namespace Blast
{
+2 -17
View File
@@ -66,22 +66,7 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS)
# tools and builders use the above module.
ly_create_alias(NAME Camera.Tools NAMESPACE Gem TARGETS Gem::Camera.Editor)
ly_create_alias(NAME Camera.Builders NAMESPACE Gem TARGETS Gem::Camera.Editor)
# The DefaultPrefab contains an EditorCameraComponent which makes this gem required
ly_enable_gems(GEMS Camera VARIANTS Tools TARGETS Editor)
ly_enable_gems(GEMS Camera VARIANTS Builders TARGETS AssetBuilder AssetProcessor AssetProcessorBatch)
endif()
# Added dependencies to the Client and Server Launchers
get_property(LY_PROJECTS_TARGET_NAME GLOBAL PROPERTY LY_PROJECTS_TARGET_NAME)
foreach(project_name IN LISTS LY_PROJECTS_TARGET_NAME)
# Add gem as a dependency of the Clients Launcher
ly_enable_gems(PROJECT_NAME ${project_name} GEMS Camera VARIANTS Clients
TARGETS ${project_name}.GameLauncher)
# Add gem as a dependency of the Servers Launcher
if(PAL_TRAIT_BUILD_SERVER_SUPPORTED)
ly_enable_gems(PROJECT_NAME ${project_name} GEMS Camera VARIANTS Servers
TARGETS ${project_name}.ServerLauncher)
endif()
endforeach()
# The DefaultPrefab contains an EditorCameraComponent which makes this gem required
ly_enable_gems(GEMS Camera)
@@ -250,7 +250,7 @@ namespace InAppPurchases
document.Parse(fileBuffer.data());
if (document.HasParseError())
{
const char* errorStr = rapidjson::GetParseError_En(document.GetParseError());
[[maybe_unused]] const char* errorStr = rapidjson::GetParseError_En(document.GetParseError());
AZ_TracePrintf("LumberyardInAppBilling", "Failed to parse product_ids.json: %s\n", errorStr);
return;
}
@@ -8,7 +8,7 @@
#include "EditorDefs.h"
#include "Resource.h"
#include "Editor/Resource.h"
#include "UiEditorAnimationBus.h"
#include "UiAnimViewCurveEditor.h"
@@ -15,7 +15,7 @@
// ----- End UI_ANIMATION_REVISIT
#include "EditorDefs.h"
#include "Resource.h"
#include "Editor/Resource.h"
#include "UiAnimViewDialog.h"
@@ -8,7 +8,7 @@
#include "EditorDefs.h"
#include "Resource.h"
#include "Editor/Resource.h"
#include "UiEditorAnimationBus.h"
#include "UiAnimViewDopeSheetBase.h"
@@ -8,7 +8,7 @@
#include "EditorDefs.h"
#include "Resource.h"
#include "Editor/Resource.h"
#include "UiEditorAnimationBus.h"
#include "UiAnimViewNodes.h"
#include "UiAnimViewDopeSheetBase.h"
@@ -9,7 +9,7 @@
#include "UiEditorAnimationBus.h"
#include "EditorDefs.h"
#include "Resource.h"
#include "Editor/Resource.h"
#include "UiAnimViewSequenceManager.h"
#include "UiAnimViewSplineCtrl.h"
#include "UiAnimViewSequence.h"
+2 -15
View File
@@ -75,23 +75,10 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS)
ly_create_alias(NAME Maestro.Tools NAMESPACE Gem TARGETS Gem::Maestro.Editor)
ly_create_alias(NAME Maestro.Builders NAMESPACE Gem TARGETS Gem::Maestro.Editor)
# Maestro is still used by the CrySystem Level System and SystemInit and TrackView
# It is required by the GameLauncher, ServerLauncher and Editor applications
ly_enable_gems(GEMS Maestro VARIANTS Tools TARGETS Editor)
endif()
# Loop over each Project name to allow the ${ProjectName}.GameLauncher and ${ProjectName}.ServerLauncher
# target to add the gem the Clients and Servers variant
get_property(LY_PROJECTS_TARGET_NAME GLOBAL PROPERTY LY_PROJECTS_TARGET_NAME)
foreach(project_name IN LISTS LY_PROJECTS_TARGET_NAME)
# Add gem as a dependency of the Clients Launcher
ly_enable_gems(PROJECT_NAME ${project_name} GEMS Maestro VARIANTS Clients TARGETS ${project_name}.GameLauncher)
# Add gem as a dependency of the Servers Launcher
if(PAL_TRAIT_BUILD_SERVER_SUPPORTED)
ly_enable_gems(PROJECT_NAME ${project_name} GEMS Maestro VARIANTS Servers TARGETS ${project_name}.ServerLauncher)
endif()
endforeach()
# Maestro is still used by the CrySystem Level System, CSystem::SystemInit and TrackView
ly_enable_gems(GEMS Maestro)
################################################################################
@@ -89,7 +89,7 @@ namespace Audio
AZ::IO::FileIOStream fileStream(filePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeBinary);
if (fileStream.IsOpen())
{
auto bytesWritten = fileStream.Write(m_bufferSize, m_buffer);
[[maybe_unused]] auto bytesWritten = fileStream.Write(m_bufferSize, m_buffer);
AZ_TracePrintf("WAVUtil", "Wrote WAV file: %s, %d bytes\n", filePath.c_str(), bytesWritten);
return true;
}
@@ -796,7 +796,7 @@ namespace PhysX
entityRigidbody->GetRigidBody()->IsKinematic() == false)
{
AZStd::string assetPath = m_shapeConfiguration.m_physicsAsset.m_configuration.m_asset.GetHint().c_str();
const uint lastSlash = static_cast<uint>(assetPath.rfind('/'));
const size_t lastSlash = assetPath.rfind('/');
if (lastSlash != AZStd::string::npos)
{
assetPath = assetPath.substr(lastSlash + 1);
+4 -4
View File
@@ -329,23 +329,23 @@ namespace PhysX
if (auto* sceneInterface = AZ::Interface<AzPhysics::SceneInterface>::Get())
{
jointHandle = sceneInterface->AddJoint(m_testSceneHandle, &jointConfiguration, m_parentBodyHandle, m_childBodyHandle);
jointHandle = sceneInterface->AddJoint(this->m_testSceneHandle, &jointConfiguration, this->m_parentBodyHandle, this->m_childBodyHandle);
}
EXPECT_NE(jointHandle, AzPhysics::InvalidJointHandle);
// run physics to trigger the the move of parent body
TestUtils::UpdateScene(m_testSceneHandle, AzPhysics::SystemConfiguration::DefaultFixedTimestep, 1);
TestUtils::UpdateScene(this->m_testSceneHandle, AzPhysics::SystemConfiguration::DefaultFixedTimestep, 1);
AZ::Vector3 childCurrentPos;
if (auto* sceneInterface = AZ::Interface<AzPhysics::SceneInterface>::Get())
{
auto* childBody = sceneInterface->GetSimulatedBodyFromHandle(m_testSceneHandle, m_childBodyHandle);
auto* childBody = sceneInterface->GetSimulatedBodyFromHandle(this->m_testSceneHandle, this->m_childBodyHandle);
childCurrentPos = childBody->GetPosition();
}
EXPECT_GT(childCurrentPos.GetX(), m_childInitialPos.GetX());
EXPECT_GT(childCurrentPos.GetX(), this->m_childInitialPos.GetX());
}
#endif // ENABLE_JOINTS_TYPED_TEST_CASE
}
+1 -1
View File
@@ -171,7 +171,7 @@ namespace PhysX
//invalid simulated body handle returns null
nullBody = sceneInterface->GetSimulatedBodyFromHandle(AzPhysics::InvalidSceneHandle, AzPhysics::InvalidSimulatedBodyHandle);
EXPECT_TRUE(nullBody == nullptr);
nullBody = sceneInterface->GetSimulatedBodyFromHandle(m_testSceneHandle, AzPhysics::SimulatedBodyHandle(2347892348, 9));
nullBody = sceneInterface->GetSimulatedBodyFromHandle(m_testSceneHandle, AzPhysics::SimulatedBodyHandle(1347892348, 9));
EXPECT_TRUE(nullBody == nullptr);
//get 1 simulated body, should not be null.
+2 -8
View File
@@ -23,7 +23,7 @@ ly_add_target(
)
ly_add_target(
NAME PrefabBuilder GEM_MODULE
NAME PrefabBuilder.Builders GEM_MODULE
NAMESPACE Gem
INCLUDE_DIRECTORIES
PRIVATE
@@ -36,15 +36,9 @@ ly_add_target(
)
# the prefab builder only needs to be active in builders
# use the PrefabBuilder module in Clients and Servers:
ly_create_alias(NAME PrefabBuilder.Builders NAMESPACE Gem TARGETS Gem::PrefabBuilder)
# we automatically add this gem, if it is present, to all our known set of builder applications:
ly_enable_gems(GEMS PrefabBuilder VARIANTS Builders TARGETS AssetProcessor AssetProcessorBatch AssetBuilder)
# if you have a custom builder application in your project, then use ly_enable_gems() to
# add it to that application for your project, like this to make YOUR_TARGET_NAME load it automatically
# ly_enable_gems(PROJECT_NAME (YOUR_PROJECT_NAME) GEMS PrefabBuilder VARIANTS Builders TARGETS (YOUR_TARGET_NAME) )
ly_enable_gems(GEMS PrefabBuilder)
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
ly_add_target(
+2 -6
View File
@@ -68,14 +68,10 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS)
ly_create_alias(NAME SceneProcessing.Builders NAMESPACE Gem TARGETS Gem::SceneProcessing.Editor)
ly_create_alias(NAME SceneProcessing.Tools NAMESPACE Gem TARGETS Gem::SceneProcessing.Editor)
# SceneProcessing Gem is only used in Tools and builders and is a requirement for the Editor
ly_enable_gems(GEMS SceneProcessing VARIANTS Tools
TARGETS Editor)
ly_enable_gems(GEMS SceneProcessing VARIANTS Builders
TARGETS AssetBuilder AssetProcessor AssetProcessorBatch)
# SceneProcessing Gem is only used in Tools and builders and is a requirement for the Editor and AssetProcessor
ly_enable_gems(GEMS SceneProcessing)
endif()
################################################################################
# Tests
################################################################################
+1 -2
View File
@@ -47,8 +47,7 @@ ly_add_target(
)
# the script canvas debugger is an optional gem module
# To Enable it: ly_enable_gems( ... TARGETS xxxyyzzz GEMS ScriptCanvasDebugger ...)
# in any particular target.
# To Enable it, associate it with a project
ly_create_alias(NAME ScriptCanvasDebugger.Builders NAMESPACE Gem TARGETS Gem::ScriptCanvasDebugger)
ly_create_alias(NAME ScriptCanvasDebugger.Tools NAMESPACE Gem TARGETS Gem::ScriptCanvasDebugger)
ly_create_alias(NAME ScriptCanvasDebugger.Clients NAMESPACE Gem TARGETS Gem::ScriptCanvasDebugger)

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