Merge branch 'development' into carlitosan_fix_for

monroegm-disable-blank-issue-2
carlitosan 4 years ago committed by GitHub
commit 9475d1612b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -163,6 +163,8 @@ ly_add_target(
editor_files.cmake
PLATFORM_INCLUDE_FILES
Platform/${PAL_PLATFORM_NAME}/editor_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
TARGET_PROPERTIES
LY_INSTALL_GENERATE_RUN_TARGET TRUE
BUILD_DEPENDENCIES
PRIVATE
3rdParty::Qt::Core

@ -84,7 +84,7 @@ namespace AZ
else
{
AZ::Debug::Trace::Instance().Assert(__FILE__, __LINE__, AZ_FUNCTION_SIGNATURE,
"Bus has multiple threads in its callstack records. Configure MutexType on the bus, or don't send to it from multiple threads");
"Bus %s has multiple threads in its callstack records. Configure MutexType on the bus, or don't send to it from multiple threads", BusType::GetName());
}
}

@ -98,7 +98,7 @@ namespace LmbrCentral
if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
{
behaviorContext->EBus<PolygonPrismShapeComponentRequestBus>("PolygonPrismShapeComponentRequestBus")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation)
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
->Attribute(AZ::Edit::Attributes::Category, "Shape")
->Attribute(AZ::Script::Attributes::Module, "shape")
->Event("GetPolygonPrism", &PolygonPrismShapeComponentRequestBus::Events::GetPolygonPrism)

@ -82,23 +82,35 @@ namespace ScriptCanvasBuilder
m_processEditorAssetDependencies.clear();
auto assetFilter = [this, &response](const AZ::Data::AssetFilterInfo& filterInfo)
AZStd::unordered_multimap<AZStd::string, AssetBuilderSDK::SourceFileDependency> jobDependenciesByKey;
auto assetFilter = [this, &jobDependenciesByKey](const AZ::Data::AssetFilterInfo& filterInfo)
{
// force load these before processing
if (filterInfo.m_assetType == azrtti_typeid<ScriptCanvas::SubgraphInterfaceAsset>()
|| filterInfo.m_assetType == azrtti_typeid<ScriptEvents::ScriptEventsAsset>())
|| filterInfo.m_assetType == azrtti_typeid<ScriptEvents::ScriptEventsAsset>())
{
this->m_processEditorAssetDependencies.push_back(filterInfo);
}
// these trigger re-processing
if (filterInfo.m_assetType == azrtti_typeid<ScriptCanvasEditor::ScriptCanvasAsset>()
|| filterInfo.m_assetType == azrtti_typeid<ScriptEvents::ScriptEventsAsset>()
|| filterInfo.m_assetType == azrtti_typeid<ScriptCanvas::SubgraphInterfaceAsset>())
if (filterInfo.m_assetType == azrtti_typeid<ScriptCanvasEditor::ScriptCanvasAsset>())
{
AZ_Error("ScriptCanvas", false, "ScriptAsset Reference in a graph detected");
}
if (filterInfo.m_assetType == azrtti_typeid<ScriptEvents::ScriptEventsAsset>())
{
AssetBuilderSDK::SourceFileDependency dependency;
dependency.m_sourceFileDependencyUUID = filterInfo.m_assetId.m_guid;
jobDependenciesByKey.insert({ ScriptEvents::k_builderJobKey, dependency });
}
if (filterInfo.m_assetType == azrtti_typeid<ScriptCanvas::SubgraphInterfaceAsset>())
{
AssetBuilderSDK::SourceFileDependency dependency;
dependency.m_sourceFileDependencyUUID = filterInfo.m_assetId.m_guid;
response.m_sourceFileDependencyList.push_back(dependency);
jobDependenciesByKey.insert({ s_scriptCanvasProcessJobKey, dependency });
}
// Asset filter always returns false to prevent parsing dependencies, but makes note of the script canvas dependencies
@ -163,9 +175,10 @@ namespace ScriptCanvasBuilder
jobDescriptor.m_additionalFingerprintInfo = AZStd::string(GetFingerprintString()).append("|").append(AZStd::to_string(static_cast<AZ::u64>(fingerprint)));
// Graph process job needs to wait until its dependency asset job finished
for (const auto& processingDependency : response.m_sourceFileDependencyList)
for (const auto& processingDependency : jobDependenciesByKey)
{
jobDescriptor.m_jobDependencyList.emplace_back(s_scriptCanvasProcessJobKey, info.m_identifier.c_str(), AssetBuilderSDK::JobDependencyType::Order, processingDependency);
response.m_sourceFileDependencyList.push_back(processingDependency.second);
jobDescriptor.m_jobDependencyList.emplace_back(processingDependency.first, info.m_identifier.c_str(), AssetBuilderSDK::JobDependencyType::Order, processingDependency.second);
}
response.m_createJobOutputs.push_back(jobDescriptor);

@ -97,7 +97,7 @@ namespace ScriptCanvasBuilder
bool pathFound = false;
AZStd::string relativePath;
AzToolsFramework::AssetSystemRequestBus::BroadcastResult
(pathFound
( pathFound
, &AzToolsFramework::AssetSystem::AssetSystemRequest::GetRelativeProductPathFromFullSourceOrProductPath
, fullPath.c_str(), relativePath);

@ -21,6 +21,7 @@
#include <ScriptCanvas/Execution/ExecutionState.h>
#include <ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.h>
#include <ScriptCanvas/Execution/RuntimeComponent.h>
#include <ScriptCanvas/Libraries/UnitTesting/UnitTestBusSender.h>
namespace ScriptCanvasEditor
{
@ -217,11 +218,27 @@ namespace ScriptCanvasEditor
if (!reporter.IsProcessOnly())
{
dependencies = LoadInterpretedDepencies(luaAssetResult.m_dependencies.source.userSubgraphs);
RuntimeDataOverrides runtimeDataOverrides;
runtimeDataOverrides.m_runtimeAsset = loadResult.m_runtimeAsset;
#if defined(LINUX) //////////////////////////////////////////////////////////////////////////
// Temporarily disable testing on the Linux build until the file name casing discrepancy
// is sorted out through the SC build and testing pipeline.
if (!luaAssetResult.m_dependencies.source.userSubgraphs.empty())
{
auto graphEntityId = AZ::Entity::MakeId();
reporter.SetGraph(graphEntityId);
loadResult.m_entity->Activate();
ScriptCanvas::UnitTesting::EventSender::MarkComplete(graphEntityId, "");
loadResult.m_entity->Deactivate();
reporter.FinishReport();
ScriptCanvas::SystemRequestBus::Broadcast(&ScriptCanvas::SystemRequests::MarkScriptUnitTestEnd);
return;
}
#else ///////////////////////////////////////////////////////////////////////////////////////
dependencies = LoadInterpretedDepencies(luaAssetResult.m_dependencies.source.userSubgraphs);
if (!dependencies.empty())
{
// #functions2_recursive_unit_tests eventually, this will need to be recursive, or the full asset handling system will need to be integrated into the testing framework
@ -258,6 +275,7 @@ namespace ScriptCanvasEditor
Execution::InitializeInterpretedStatics(dependencyData);
}
}
#endif //////////////////////////////////////////////////////////////////////////////////////
loadResult.m_scriptAsset = luaAssetResult.m_scriptAsset;
loadResult.m_runtimeAsset.Get()->GetData().m_script = loadResult.m_scriptAsset;

@ -803,12 +803,6 @@ namespace ScriptCanvas
m_namespacePath = namespacePath;
}
void SubgraphInterface::TakeNamespacePath(NamespacePath&& namespacePath)
{
m_namespacePath = AZStd::move(namespacePath);
}
AZStd::string SubgraphInterface::ToExecutionString() const
{
AZStd::string result;

@ -236,8 +236,6 @@ namespace ScriptCanvas
void SetNamespacePath(const NamespacePath& namespacePath);
void TakeNamespacePath(NamespacePath&& namespacePath);
AZStd::string ToExecutionString() const;
private:

@ -37,8 +37,7 @@ namespace ScriptCanvas
static void Reflect(AZ::ReflectContext* reflection);
static BehaviorContextObjectPtr Create(const AZ::BehaviorClass& behaviorClass, const void* value = nullptr);
static BehaviorContextObjectPtr CreateDeepCopy(const AZ::BehaviorClass& behaviorClass, const BehaviorContextObject* value = nullptr);
template<typename t_Value>
AZ_INLINE static BehaviorContextObjectPtr Create(const t_Value& value, const AZ::BehaviorClass& behaviorClass);
@ -116,6 +115,7 @@ namespace ScriptCanvas
AZ_FORCE_INLINE BehaviorContextObject() = default;
BehaviorContextObject& operator=(const BehaviorContextObject&) = delete;
BehaviorContextObject(const BehaviorContextObject&) = delete;
// copy ctor

@ -235,7 +235,7 @@ namespace ScriptCanvas
const VariableData Source::k_emptyVardata{};
Source::Source
(const Graph& graph
( const Graph& graph
, const AZ::Data::AssetId& id
, const GraphData& graphData
, const VariableData& variableData
@ -277,7 +277,7 @@ namespace ScriptCanvas
AzFramework::StringFunc::Path::StripExtension(namespacePath);
return AZ::Success(Source
(*request.graph
(*request.graph
, request.scriptAssetId
, *graphData
, *sourceVariableData

@ -290,7 +290,7 @@ namespace ScriptCanvas
Source() = default;
Source
(const Graph& graph
( const Graph& graph
, const AZ::Data::AssetId& id
, const GraphData& graphData
, const VariableData& variableData

@ -113,7 +113,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
)
ly_add_googletest(
NAME Gem::ScriptCanvasTesting.Editor.Tests
TEST_SUITE smoke
)
endif()

@ -136,11 +136,6 @@ namespace ScriptCanvasTests
// don't hang on to dangling assets
AZ::Data::AssetManager::Instance().DispatchEvents();
if (AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance())
{
fileIO->DestroyPath(k_tempCoreAssetDir);
}
if (s_application)
{
s_application->Stop();

@ -34,14 +34,6 @@ namespace ScriptCanvasTests
{
using namespace ScriptCanvas;
#define SC_CORE_UNIT_TEST_DIR "@engroot@/LY_SC_UnitTest_ScriptCanvas_CoreCPP_Temporary"
#define SC_CORE_UNIT_TEST_NAME "serializationTest.scriptcanvas_compiled"
const char* k_tempCoreAssetDir = SC_CORE_UNIT_TEST_DIR;
const char* k_tempCoreAssetName = SC_CORE_UNIT_TEST_NAME;
const char* k_tempCoreAssetPath = SC_CORE_UNIT_TEST_DIR "/" SC_CORE_UNIT_TEST_NAME;
#undef SC_CORE_UNIT_TEST_DIR
#undef SC_CORE_UNIT_TEST_NAME
void ExpectParse(AZStd::string_view graphPath)
{
AZ_TEST_START_TRACE_SUPPRESSION;

@ -84,11 +84,6 @@ public:
}
};
TEST_F(ScriptCanvasTestFixture, ForEachMultipleOutSyntaxOnEach)
{
RunUnitTestGraph("LY_SC_UnitTest_ForEachMultipleOutSyntaxOnEach");
}
TEST_F(ScriptCanvasTestFixture, EntityIdInputForOnGraphStart)
{
RunUnitTestGraph("LY_SC_UnitTest_EntityIdInputForOnGraphStart");

@ -119,7 +119,7 @@ namespace ScriptEventsBuilder
AssetBuilderSDK::JobDescriptor jobDescriptor;
jobDescriptor.m_priority = 2;
jobDescriptor.m_critical = true;
jobDescriptor.m_jobKey = "Script Events";
jobDescriptor.m_jobKey = ScriptEvents::k_builderJobKey;
jobDescriptor.SetPlatformIdentifier(info.m_identifier.data());
jobDescriptor.m_additionalFingerprintInfo = GetFingerprintString();

@ -22,6 +22,8 @@
namespace ScriptEvents
{
constexpr const char* k_builderJobKey = "Script Events";
class ScriptEventsAsset
: public AZ::Data::AssetData
{

@ -10,6 +10,15 @@ include(cmake/FileUtil.cmake)
set(CMAKE_INSTALL_MESSAGE NEVER) # Simplify messages to reduce output noise
define_property(TARGET PROPERTY LY_INSTALL_GENERATE_RUN_TARGET
BRIEF_DOCS "Defines if a \"RUN\" targets should be created when installing this target Gem"
FULL_DOCS [[
Property which is set on targets that should generate a "RUN"
target when installed. This \"RUN\" target helps to run the
binary from the installed location directly from the IDE.
]]
)
ly_set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME Core)
cmake_path(RELATIVE_PATH CMAKE_RUNTIME_OUTPUT_DIRECTORY BASE_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_VARIABLE runtime_output_directory)
@ -117,15 +126,19 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar
set(NAMESPACE_PLACEHOLDER "")
set(NAME_PLACEHOLDER ${TARGET_NAME})
endif()
get_target_property(should_create_helper ${TARGET_NAME} LY_INSTALL_GENERATE_RUN_TARGET)
if(should_create_helper)
set(NAME_PLACEHOLDER ${NAME_PLACEHOLDER}.Imported)
endif()
set(TARGET_TYPE_PLACEHOLDER "")
get_target_property(target_type ${NAME_PLACEHOLDER} TYPE)
get_target_property(target_type ${TARGET_NAME} TYPE)
# Remove the _LIBRARY since we dont need to pass that to ly_add_targets
string(REPLACE "_LIBRARY" "" TARGET_TYPE_PLACEHOLDER ${target_type})
# For HEADER_ONLY libs we end up generating "INTERFACE" libraries, need to specify HEADERONLY instead
string(REPLACE "INTERFACE" "HEADERONLY" TARGET_TYPE_PLACEHOLDER ${TARGET_TYPE_PLACEHOLDER})
if(TARGET_TYPE_PLACEHOLDER STREQUAL "MODULE")
get_target_property(gem_module ${NAME_PLACEHOLDER} GEM_MODULE)
get_target_property(gem_module ${TARGET_NAME} GEM_MODULE)
if(gem_module)
set(TARGET_TYPE_PLACEHOLDER "GEM_MODULE")
endif()
@ -158,7 +171,6 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar
unset(RUNTIME_DEPENDENCIES_PLACEHOLDER)
endif()
get_target_property(inteface_build_dependencies_props ${TARGET_NAME} INTERFACE_LINK_LIBRARIES)
unset(INTERFACE_BUILD_DEPENDENCIES_PLACEHOLDER)
if(inteface_build_dependencies_props)
@ -182,6 +194,23 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar
list(REMOVE_DUPLICATES INTERFACE_BUILD_DEPENDENCIES_PLACEHOLDER)
string(REPLACE ";" "\n" INTERFACE_BUILD_DEPENDENCIES_PLACEHOLDER "${INTERFACE_BUILD_DEPENDENCIES_PLACEHOLDER}")
# If the target is an executable/application, add a custom target so we can debug the target in project-centric workflow
if(should_create_helper)
string(REPLACE ".Imported" "" RUN_TARGET_NAME ${NAME_PLACEHOLDER})
set(target_types_with_debugging_helper EXECUTABLE APPLICATION)
if(NOT target_type IN_LIST target_types_with_debugging_helper)
message(FATAL_ERROR "Cannot generate a RUN target for ${TARGET_NAME}, type is ${target_type}")
endif()
set(TARGET_RUN_HELPER
"add_custom_target(${RUN_TARGET_NAME})
set_target_properties(${RUN_TARGET_NAME} PROPERTIES
FOLDER \"CMakePredefinedTargets/SDK\"
VS_DEBUGGER_COMMAND \$<GENEX_EVAL:\$<TARGET_PROPERTY:${NAME_PLACEHOLDER},IMPORTED_LOCATION>>
VS_DEBUGGER_COMMAND_ARGUMENTS \"--project-path=\${LY_DEFAULT_PROJECT_PATH}\"
)"
)
endif()
# Config file
set(target_file_contents "# Generated by O3DE install\n\n")
if(NOT target_type STREQUAL INTERFACE_LIBRARY)
@ -194,13 +223,13 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar
set(target_location "\${LY_ROOT_FOLDER}/${library_output_directory}/${PAL_PLATFORM_NAME}/$<CONFIG>/${target_library_output_subdirectory}/$<TARGET_FILE_NAME:${TARGET_NAME}>")
elseif(target_type STREQUAL SHARED_LIBRARY)
string(APPEND target_file_contents
"set_property(TARGET ${TARGET_NAME}
"set_property(TARGET ${NAME_PLACEHOLDER}
APPEND_STRING PROPERTY IMPORTED_IMPLIB
$<$<CONFIG:$<CONFIG>$<ANGLE-R>:\"\${LY_ROOT_FOLDER}/${archive_output_directory}/${PAL_PLATFORM_NAME}/$<CONFIG>/$<TARGET_LINKER_FILE_NAME:${TARGET_NAME}>\"$<ANGLE-R>
)
")
string(APPEND target_file_contents
"set_property(TARGET ${TARGET_NAME}
"set_property(TARGET ${NAME_PLACEHOLDER}
PROPERTY IMPORTED_IMPLIB_$<UPPER_CASE:$<CONFIG>>
\"\${LY_ROOT_FOLDER}/${archive_output_directory}/${PAL_PLATFORM_NAME}/$<CONFIG>/$<TARGET_LINKER_FILE_NAME:${TARGET_NAME}>\"
)
@ -212,11 +241,11 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar
if(target_location)
string(APPEND target_file_contents
"set_property(TARGET ${TARGET_NAME}
"set_property(TARGET ${NAME_PLACEHOLDER}
APPEND_STRING PROPERTY IMPORTED_LOCATION
$<$<CONFIG:$<CONFIG>$<ANGLE-R>:${target_location}$<ANGLE-R>
)
set_property(TARGET ${TARGET_NAME}
set_property(TARGET ${NAME_PLACEHOLDER}
PROPERTY IMPORTED_LOCATION_$<UPPER_CASE:$<CONFIG>>
${target_location}
)

@ -159,10 +159,6 @@ function(ly_delayed_generate_settings_registry)
message(FATAL_ERROR "Dependency ${gem_target} from ${target} does not exist")
endif()
get_property(has_manually_added_dependencies TARGET ${gem_target} PROPERTY MANUALLY_ADDED_DEPENDENCIES SET)
get_target_property(target_type ${gem_target} TYPE)
ly_get_gem_module_root(gem_module_root ${gem_target})
file(RELATIVE_PATH gem_module_root_relative_to_engine_root ${LY_ROOT_FOLDER} ${gem_module_root})
@ -180,7 +176,8 @@ function(ly_delayed_generate_settings_registry)
list(JOIN target_gem_dependencies_names ",\n" target_gem_dependencies_names)
string(CONFIGURE ${gems_json_template} gem_json @ONLY)
get_target_property(is_imported ${target} IMPORTED)
if(is_imported)
get_target_property(target_type ${target} TYPE)
if(is_imported OR target_type STREQUAL UTILITY)
unset(target_dir)
foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
string(TOUPPER ${conf} UCONF)

@ -17,6 +17,8 @@ ly_add_target(
@RUNTIME_DEPENDENCIES_PLACEHOLDER@
)
@TARGET_RUN_HELPER@
set(configs @CMAKE_CONFIGURATION_TYPES@)
foreach(config ${configs})
include("@NAME_PLACEHOLDER@_${config}.cmake" OPTIONAL)

Loading…
Cancel
Save