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