Add file information to Version; improve Method deserialization warnings; add SC unit test content to builders
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
@@ -674,6 +674,9 @@ namespace ScriptCanvasEditor
|
||||
|
||||
void VersionExplorer::InspectAsset(AZ::Data::Asset<AZ::Data::AssetData>& asset, AZ::Data::AssetInfo& assetInfo)
|
||||
{
|
||||
++m_inspectedAssets;
|
||||
++m_currentAssetIndex;
|
||||
|
||||
Log("InspectAsset: %s", asset.GetHint().c_str());
|
||||
AZ::Entity* scriptCanvasEntity = nullptr;
|
||||
if (asset.GetType() == azrtti_typeid<ScriptCanvasAsset>())
|
||||
@@ -694,10 +697,9 @@ namespace ScriptCanvasEditor
|
||||
|
||||
bool onlyShowOutdatedGraphs = m_ui->onlyShowOutdated->isChecked();
|
||||
bool forceUpgrade = m_ui->forceUpgrade->isChecked();
|
||||
|
||||
|
||||
if (!forceUpgrade && onlyShowOutdatedGraphs && graphComponent->GetVersion().IsLatest())
|
||||
{
|
||||
++m_currentAssetIndex;
|
||||
ScanComplete(asset);
|
||||
Log("InspectAsset: %s, is at latest", asset.GetHint().c_str());
|
||||
return;
|
||||
@@ -754,15 +756,11 @@ namespace ScriptCanvasEditor
|
||||
}
|
||||
|
||||
QString absolutePath = QDir(watchFolder.c_str()).absoluteFilePath(info.m_relativePath.c_str());
|
||||
|
||||
connect(browseButton, &QPushButton::clicked, [absolutePath] {
|
||||
AzQtComponents::ShowFileOnDesktop(absolutePath);
|
||||
});
|
||||
|
||||
m_ui->tableWidget->setCellWidget(static_cast<int>(m_inspectedAssets), static_cast<int>(ColumnBrowse), browseButton);
|
||||
|
||||
++m_inspectedAssets;
|
||||
++m_currentAssetIndex;
|
||||
|
||||
ScanComplete(asset);
|
||||
}
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@ namespace ScriptCanvas
|
||||
serializeContext->Class<VersionData>()
|
||||
->Field("_grammarVersion", &VersionData::grammarVersion)
|
||||
->Field("_runtimeVersion", &VersionData::runtimeVersion)
|
||||
->Field("_fileVersion", &VersionData::fileVersion)
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -154,5 +155,6 @@ namespace ScriptCanvas
|
||||
{
|
||||
grammarVersion = GrammarVersion::Current;
|
||||
runtimeVersion = RuntimeVersion::Current;
|
||||
fileVersion = FileVersion::Current;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,13 @@ namespace ScriptCanvas
|
||||
using NodePtrList = AZStd::vector<Node*>;
|
||||
using NodePtrConstList = AZStd::vector<const Node*>;
|
||||
|
||||
enum class PropertyStatus : AZ::u8
|
||||
{
|
||||
Getter,
|
||||
None,
|
||||
Setter,
|
||||
};
|
||||
|
||||
enum class GrammarVersion : int
|
||||
{
|
||||
Initial = -1,
|
||||
@@ -89,11 +96,13 @@ namespace ScriptCanvas
|
||||
Current,
|
||||
};
|
||||
|
||||
enum class PropertyStatus : AZ::u8
|
||||
enum class FileVersion : int
|
||||
{
|
||||
Getter,
|
||||
None,
|
||||
Setter,
|
||||
Initial = -1,
|
||||
JSON = 0,
|
||||
|
||||
// add new entries above
|
||||
Current,
|
||||
};
|
||||
|
||||
struct VersionData
|
||||
@@ -106,10 +115,13 @@ namespace ScriptCanvas
|
||||
|
||||
GrammarVersion grammarVersion = GrammarVersion::Initial;
|
||||
RuntimeVersion runtimeVersion = RuntimeVersion::Initial;
|
||||
FileVersion fileVersion = FileVersion::Initial;
|
||||
|
||||
bool operator == (const VersionData& rhs) const
|
||||
{
|
||||
return grammarVersion == rhs.grammarVersion && runtimeVersion == rhs.runtimeVersion;
|
||||
return grammarVersion == rhs.grammarVersion
|
||||
&& runtimeVersion == rhs.runtimeVersion
|
||||
&& fileVersion == rhs.fileVersion;
|
||||
}
|
||||
|
||||
bool IsLatest() const
|
||||
|
||||
@@ -681,6 +681,13 @@ namespace ScriptCanvas
|
||||
outType = eventType;
|
||||
return true;
|
||||
}
|
||||
|
||||
AZ_Warning("Script Canvas"
|
||||
, !m_warnOnMissingFunction
|
||||
, "Could not find event: %s, in bus: %s, anywhere in BehaviorContext"
|
||||
, methodName.c_str()
|
||||
, m_className.c_str());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -693,6 +700,12 @@ namespace ScriptCanvas
|
||||
outType = EventType::Count;
|
||||
return true;
|
||||
}
|
||||
|
||||
AZ_Warning("Script Canvas"
|
||||
, !m_warnOnMissingFunction
|
||||
, "Could not find free method: %s anywhere in BehaviorContext"
|
||||
, methodName.c_str());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -709,15 +722,27 @@ namespace ScriptCanvas
|
||||
outType = EventType::Count;
|
||||
return true;
|
||||
}
|
||||
|
||||
AZ_Warning("Script Canvas"
|
||||
, !m_warnOnMissingFunction
|
||||
, "Could not find method or property: %s in class %s: , anywhere in BehaviorContext"
|
||||
, methodName.c_str()
|
||||
, m_className.c_str());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
AZ_Warning("Script Canvas", !m_warnOnMissingFunction, "unsupported method type in method");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AZ_Warning("Script Canvas"
|
||||
, !m_warnOnMissingFunction
|
||||
, "Could not find overloaded method: %s, class or event name: %s, anywhere in BehaviorContext"
|
||||
, methodName.c_str()
|
||||
, m_className.c_str());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ ly_add_target(
|
||||
|
||||
# By default, the above module is used only in tools:
|
||||
ly_create_alias(NAME ScriptCanvasTesting.Tools NAMESPACE Gem TARGETS Gem::ScriptCanvasTesting.Editor)
|
||||
ly_create_alias(NAME ScriptCanvasTesting.Builders NAMESPACE Gem TARGETS Gem::ScriptCanvasTesting.Editor)
|
||||
|
||||
################################################################################
|
||||
# Tests
|
||||
|
||||
Reference in New Issue
Block a user