merge from main
This commit is contained in:
+1
-1
@@ -59,7 +59,7 @@ namespace ScriptCanvas
|
||||
|
||||
const char* SubgraphInterfaceAssetHandler::GetBrowserIcon() const
|
||||
{
|
||||
return "Editor/Icons/ScriptCanvas/Viewport/ScriptCanvas_Function.png";
|
||||
return "Icons/ScriptCanvas/Viewport/ScriptCanvas_Function.png";
|
||||
}
|
||||
|
||||
AZ::Uuid SubgraphInterfaceAssetHandler::GetComponentTypeId() const
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ namespace ScriptCanvasEditor
|
||||
"Script Canvas Function Files (*.scriptcanvas_fn)",
|
||||
"Script Canvas Function",
|
||||
"Script Canvas Function",
|
||||
"Editor/Icons/ScriptCanvas/Viewport/ScriptCanvas_Function.png",
|
||||
"Icons/ScriptCanvas/Viewport/ScriptCanvas_Function.png",
|
||||
AZ::Color(0.192f, 0.149f, 0.392f, 1.0f),
|
||||
true
|
||||
)
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace ScriptCanvas
|
||||
"Script Canvas Files (*.scriptcanvas_compiled)",
|
||||
"Script Canvas Runtime",
|
||||
"Script Canvas Runtime",
|
||||
"Editor/Icons/ScriptCanvas/Viewport/ScriptCanvas.png",
|
||||
"Icons/ScriptCanvas/Viewport/ScriptCanvas.png",
|
||||
AZ::Color(1.0f,0.0f,0.0f,1.0f),
|
||||
false
|
||||
)
|
||||
@@ -169,7 +169,7 @@ namespace ScriptCanvas
|
||||
"Script Canvas Compiled Function Interfaces (*.scriptcanvas_fn_compiled)",
|
||||
"Script Canvas Function Interface",
|
||||
"Script Canvas Function Interface",
|
||||
"Editor/Icons/ScriptCanvas/Viewport/ScriptCanvas_Function.png",
|
||||
"Icons/ScriptCanvas/Viewport/ScriptCanvas_Function.png",
|
||||
AZ::Color(1.0f,0.0f,0.0f,1.0f),
|
||||
false
|
||||
)
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace ScriptCanvas
|
||||
|
||||
const char* RuntimeAssetHandler::GetBrowserIcon() const
|
||||
{
|
||||
return "Editor/Icons/ScriptCanvas/Viewport/ScriptCanvas.png";
|
||||
return "Icons/ScriptCanvas/Viewport/ScriptCanvas.png";
|
||||
}
|
||||
|
||||
AZ::Uuid RuntimeAssetHandler::GetComponentTypeId() const
|
||||
|
||||
@@ -15,4 +15,4 @@
|
||||
namespace ScriptCanvas
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -168,4 +168,4 @@ struct {{ className | replace(' ','') }}Property
|
||||
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
+1
-1
@@ -102,4 +102,4 @@ public: \
|
||||
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
+9
-15
@@ -186,21 +186,16 @@ void {{attribute_QualifiedName}}::Reflect(AZ::ReflectContext* context)
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
|
||||
|
||||
{% if attribute_Category is defined %}
|
||||
->Attribute(AZ::Edit::Attributes::Category, "{{ attribute_Category }}")
|
||||
->Attribute(AZ::Edit::Attributes::Category, "{{ attribute_Category }}")
|
||||
{%- endif %}
|
||||
|
||||
{% if attribute_Icon is defined %}
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "{{ attribute_Icon }}")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "{{ attribute_Icon }}")
|
||||
{%- endif %}
|
||||
|
||||
{% if attribute_Deprecated is defined %}
|
||||
->Attribute(AZ::Edit::Attributes::Deprecated, "{{ attribute_Deprecated }}")
|
||||
->Attribute(AZ::Edit::Attributes::Deprecated, "{{ attribute_Deprecated }}")
|
||||
{%- endif %}
|
||||
|
||||
{% set uihandler = 'AZ::Edit::UIHandlers::Default' %}
|
||||
|
||||
{% for Property in Class.iter('Property') %}
|
||||
{% for item in Property.iter('PropertyData') %}
|
||||
{% for item in Class.iter('Property') %}
|
||||
{% if item.attrib['UIHandler'] is defined %}
|
||||
{% set uihandler = item.attrib['UIHandler'] %}
|
||||
{% endif %}
|
||||
@@ -208,12 +203,11 @@ void {{attribute_QualifiedName}}::Reflect(AZ::ReflectContext* context)
|
||||
{% if item.attrib['Description'] is defined %}
|
||||
{% set description = item.attrib['Description'] %}
|
||||
{% endif %}
|
||||
// {{ item.attrib['Name'] }}
|
||||
->DataElement({{ uihandler }}, &{{ attribute_Name }}::{{ Property.attrib['Name'] }}, "{{ item.attrib['Name'] }}", "{{ description }}")
|
||||
{% for EditAttribute in Property.iter('EditAttribute') %}
|
||||
->Attribute({{ EditAttribute.attrib['Key'] }}, {{ EditAttribute.attrib['Value'] }})
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
// {{ item.attrib['Name'] }}
|
||||
->DataElement({{ uihandler }}, &{{ attribute_Name }}::{{ item.attrib['Name'] }}, "{{ item.attrib['Name'] }}", "{{ description }}")
|
||||
{% for EditAttribute in item.iter('EditAttribute') %}
|
||||
->Attribute({{ EditAttribute.attrib['Key'] }}, {{ EditAttribute.attrib['Value'] }})
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
;
|
||||
}
|
||||
|
||||
@@ -307,4 +307,4 @@ AZStd::tuple<{{returnTypes|join(", ")}}>
|
||||
}
|
||||
#}
|
||||
}
|
||||
{% endmacro -%}
|
||||
{% endmacro -%}
|
||||
|
||||
+1
-1
@@ -352,4 +352,4 @@ void {{qualifiedName}}::Call{{CleanName(outName)}}({{ExecutionOutReturnDefinitio
|
||||
|
||||
size_t {{qualifiedName}}::GetRequiredOutCount() const { return {{Class.findall('Output')|length + branches|length}}; }
|
||||
|
||||
{% endmacro %}
|
||||
{% endmacro %}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
* Example:
|
||||
* NodeDefinition(HelloWorld, "Hello World", "My HelloWorld Node.")
|
||||
* NodeDefinition(HelloWorld, "Hello World", "My HelloWorld Node.",
|
||||
* NodeTags::Icon("Editor/Icons/ScriptCanvas/HelloWorld.png")
|
||||
* NodeTags::Icon("Icons/ScriptCanvas/HelloWorld.png")
|
||||
* NodeTags::Version(3, VersionConverter))
|
||||
*
|
||||
* ----------------------------------------------------------------------------------------------------------- */
|
||||
|
||||
@@ -176,4 +176,4 @@ namespace ScriptCanvas
|
||||
GraphRequestBus::Event(*GraphNotificationBus::GetCurrentBusId(), &GraphRequests::DisconnectById, GetEntityId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,4 +75,4 @@ namespace ScriptCanvas
|
||||
Endpoint m_targetEndpoint;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,4 +37,4 @@ namespace ScriptCanvas
|
||||
|
||||
using ConnectionRequestBus = AZ::EBus<ConnectionRequests>;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,4 +49,4 @@ namespace ScriptCanvas
|
||||
AZ::Outcome<void, AZStd::string> OnEvaluate(const Slot& sourceSlot, const Slot& targetSlot) const override;
|
||||
AZ::Outcome<void, AZStd::string> OnEvaluateForType(const Data::Type& dataType) const override;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +88,13 @@ namespace ScriptCanvas
|
||||
Current,
|
||||
};
|
||||
|
||||
enum class PropertyStatus : AZ::u8
|
||||
{
|
||||
Getter,
|
||||
None,
|
||||
Setter,
|
||||
};
|
||||
|
||||
struct VersionData
|
||||
{
|
||||
AZ_TYPE_INFO(VersionData, "{14C629F6-467B-46FE-8B63-48FDFCA42175}");
|
||||
|
||||
@@ -28,4 +28,4 @@ namespace ScriptCanvas
|
||||
};
|
||||
|
||||
using EBusHandlerNodeRequestBus = AZ::EBus<EBusHandlerNodeRequests>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,4 +81,4 @@ namespace AZStd
|
||||
return seed;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace ScriptCanvas
|
||||
Event,
|
||||
Free,
|
||||
Member,
|
||||
Getter,
|
||||
Setter,
|
||||
Count,
|
||||
};
|
||||
|
||||
|
||||
@@ -135,4 +135,4 @@ namespace ScriptCanvas
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,6 +394,7 @@ namespace ScriptCanvas
|
||||
AZ::Uuid m_type = AZ::Uuid::CreateNull();
|
||||
AZStd::string m_className;
|
||||
AZStd::string m_methodName;
|
||||
PropertyStatus m_propertyStatus = PropertyStatus::None;
|
||||
|
||||
bool IsValid()
|
||||
{
|
||||
|
||||
@@ -104,8 +104,7 @@ namespace ScriptCanvas
|
||||
|
||||
const FunctorOut& Nodeable::GetExecutionOutChecked(size_t index) const
|
||||
{
|
||||
|
||||
if (index >= m_outs.size() && m_outs[index])
|
||||
if (index >= m_outs.size() || !m_outs[index])
|
||||
{
|
||||
return m_noOpFunctor;
|
||||
}
|
||||
|
||||
@@ -32,4 +32,4 @@ namespace ScriptCanvas
|
||||
using StackAllocatorType = AZStd::static_buffer_allocator<MaxNodeableOutStackSize, 32>;
|
||||
} // namespace Execution
|
||||
|
||||
} // namespace ScriptCanvas
|
||||
} // namespace ScriptCanvas
|
||||
|
||||
@@ -109,4 +109,4 @@ namespace ScriptCanvas
|
||||
|
||||
template<>
|
||||
void PureData::AddDefaultInputAndOutputTypeSlot<Data::Type>(Data::Type&&) = delete;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,4 +40,4 @@ namespace ScriptCanvas
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,4 +26,4 @@ namespace ScriptCanvas
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,4 @@ namespace ScriptCanvas
|
||||
SlotId m_slotId;
|
||||
Data::Type m_dataType;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,4 +20,4 @@ namespace ScriptCanvas
|
||||
AZ_INLINE AZStd::string_view GetOutputSlotName() { return "Out"; }
|
||||
|
||||
AZ_INLINE AZStd::string_view GetSourceSlotName() { return "Source"; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace ScriptCanvas
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(datum == rhs.datum))
|
||||
if (!(datum.GetType() == rhs.datum.GetType()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -40,4 +40,4 @@ namespace ScriptCanvas
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,4 +28,4 @@ namespace ScriptCanvas
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,4 +52,4 @@ namespace ScriptCanvas
|
||||
return {};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,4 +42,4 @@ namespace ScriptCanvas
|
||||
return TypeErasedTraits(AZStd::integral_constant<eType, scTypeValue>{});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,4 +38,4 @@ namespace ScriptCanvas
|
||||
return AZ::Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,4 +52,4 @@ namespace ScriptCanvas
|
||||
void ReflectNotifications(AZ::ReflectContext* context);
|
||||
void ReflectRequests(AZ::ReflectContext* context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,4 +145,4 @@ namespace ScriptCanvas
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,4 +240,4 @@ namespace ScriptCanvas
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -95,4 +95,4 @@ namespace ScriptCanvas
|
||||
return "Unknown Source Endpoint";
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,4 +11,4 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <ScriptCanvas/Debugger/ValidationEvents/ExecutionValidation/UnusedNodeEvent.h>
|
||||
#include <ScriptCanvas/Debugger/ValidationEvents/ExecutionValidation/UnusedNodeEvent.h>
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@ namespace ScriptCanvas
|
||||
constexpr const char* UnusedNodeId = "EV-0001";
|
||||
static const AZ::Crc32 UnusedNodeCrc = AZ_CRC(UnusedNodeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,4 +19,4 @@ namespace ScriptCanvas
|
||||
constexpr const char* InvalidFunctionCallNameId = "GT-0001";
|
||||
static const AZ::Crc32 InvalidFunctionCallNameCrc = AZ_CRC(InvalidFunctionCallNameId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -85,4 +85,4 @@ namespace ScriptCanvas
|
||||
};
|
||||
using ValidationPtr = AZStd::intrusive_ptr<ValidationEvent>;
|
||||
using ValidationConstPtr = AZStd::intrusive_ptr<const ValidationEvent>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,4 +47,4 @@ namespace ScriptCanvas
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,4 +37,4 @@ namespace ScriptCanvas
|
||||
Data::Type m_dataType;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,4 +54,4 @@ namespace ScriptCanvas
|
||||
#define SCRIPTCANVAS_RETURN_IF_ERROR_STATE(node)\
|
||||
bool inErrorState = false;\
|
||||
ScriptCanvas::ErrorReporterBus::EventResult(inErrorState, node.GetOwningScriptCanvasId(), &ScriptCanvas::ErrorReporter::IsInErrorState);\
|
||||
if (inErrorState) { return; }
|
||||
if (inErrorState) { return; }
|
||||
|
||||
+4
-4
@@ -510,7 +510,7 @@ namespace ScriptCanvas
|
||||
AZ_Assert(lua_isuserdata(lua, 1), "CallExecutionOut: Error in compiled lua file, 1st argument to SetExecutionOut is not userdata (Nodeable)");
|
||||
AZ_Assert(lua_isnumber(lua, 2), "CallExecutionOut: Error in compiled lua file, 2nd argument to SetExecutionOut is not a number");
|
||||
Nodeable* nodeable = AZ::ScriptValue<Nodeable*>::StackRead(lua, 1);
|
||||
size_t index = aznumeric_caster(lua_tointeger(lua, -2));
|
||||
size_t index = aznumeric_caster(lua_tointeger(lua, 2));
|
||||
nodeable->CallOut(index, nullptr, nullptr, argsCount - 2);
|
||||
// Lua: results...
|
||||
return lua_gettop(lua);
|
||||
@@ -582,7 +582,7 @@ namespace ScriptCanvas
|
||||
int SetExecutionOut(lua_State* lua)
|
||||
{
|
||||
// \note Return values could become necessary.
|
||||
// \see https://jira.agscollab.com/browse/LY-99750
|
||||
// \see LY-99750
|
||||
|
||||
AZ_Assert(lua_isuserdata(lua, -3), "Error in compiled lua file, 1st argument to SetExecutionOut is not userdata (Nodeable)");
|
||||
AZ_Assert(lua_isnumber(lua, -2), "Error in compiled lua file, 2nd argument to SetExecutionOut is not a number");
|
||||
@@ -605,7 +605,7 @@ namespace ScriptCanvas
|
||||
int SetExecutionOutResult(lua_State* lua)
|
||||
{
|
||||
// \note Return values could become necessary.
|
||||
// \see https://jira.agscollab.com/browse/LY-99750
|
||||
// \see LY-99750
|
||||
|
||||
AZ_Assert(lua_isuserdata(lua, -3), "Error in compiled lua file, 1st argument to SetExecutionOutResult is not userdata (Nodeable)");
|
||||
AZ_Assert(lua_isnumber(lua, -2), "Error in compiled lua file, 2nd argument to SetExecutionOutResult is not a number");
|
||||
@@ -697,7 +697,7 @@ namespace ScriptCanvas
|
||||
AZ_Assert(lua_islightuserdata(lua, 2), "Error in compiled lua file, 2nd argument to UnpackDependencyArgs is not userdata (AZStd::vector<AZ::Data::Asset<RuntimeAsset>>*), but a :%s", lua_typename(lua, 2));
|
||||
auto dependentAssets = reinterpret_cast<AZStd::vector<AZ::Data::Asset<RuntimeAsset>>*>(lua_touserdata(lua, 2));
|
||||
AZ_Assert(lua_isinteger(lua, 3), "Error in compiled Lua file, 3rd argument to UnpackDependencyArgs is not a number");
|
||||
const size_t dependentAssetsIndex = lua_tointeger(lua, 3);
|
||||
const size_t dependentAssetsIndex = aznumeric_caster(lua_tointeger(lua, 3));
|
||||
|
||||
return DependencyConstructionPack{ executionState, dependentAssets, dependentAssetsIndex, (*dependentAssets)[dependentAssetsIndex].Get()->m_runtimeData };
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,4 +25,4 @@ namespace ScriptCanvas
|
||||
|
||||
static void Reflect(AZ::ReflectContext* reflectContext);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,4 @@ namespace ScriptCanvas
|
||||
RuntimeContext::RuntimeContext(AZ::EntityId graphId)
|
||||
: m_graphId(graphId)
|
||||
{}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,4 +26,4 @@ namespace ScriptCanvas
|
||||
protected:
|
||||
AZ::EntityId m_graphId;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,4 +66,4 @@ namespace ScriptCanvas
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,4 +25,4 @@ namespace ScriptCanvas
|
||||
// this may never have to be necessary
|
||||
bool UnregisterNativeGraphStart(AZStd::string_view name);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,11 +19,9 @@
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Serialization/Utils.h>
|
||||
#include <AzFramework/Entity/EntityContextBus.h>
|
||||
#include <AzFramework/Network/NetBindingHandlerBus.h>
|
||||
#include <ScriptCanvas/Execution/ExecutionBus.h>
|
||||
#include <ScriptCanvas/Execution/ExecutionContext.h>
|
||||
#include <ScriptCanvas/Execution/ExecutionState.h>
|
||||
#include <ScriptCanvas/Variable/GraphVariableNetBindings.h>
|
||||
|
||||
#if !defined(_RELEASE) && !defined(PERFORMANCE_BUILD)
|
||||
#define SCRIPT_CANVAS_RUNTIME_ASSET_CHECK
|
||||
@@ -163,8 +161,6 @@ namespace ScriptCanvas
|
||||
->Field("m_variableOverrides", &RuntimeComponent::m_variableOverrides)
|
||||
;
|
||||
}
|
||||
|
||||
GraphVariableNetBindingTable::Reflect(context);
|
||||
}
|
||||
|
||||
void RuntimeComponent::SetVariableOverrides(const VariableData& overrideData)
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <AzCore/Component/EntityBus.h>
|
||||
|
||||
#include <AzFramework/Network/NetBindable.h>
|
||||
|
||||
#include <ScriptCanvas/Asset/RuntimeAsset.h>
|
||||
#include <ScriptCanvas/Core/Core.h>
|
||||
#include <ScriptCanvas/Core/ExecutionNotificationsBus.h>
|
||||
@@ -41,11 +39,10 @@ namespace ScriptCanvas
|
||||
//! This component should only be used at runtime
|
||||
class RuntimeComponent
|
||||
: public AZ::Component
|
||||
, public AzFramework::NetBindable
|
||||
, public AZ::EntityBus::Handler
|
||||
{
|
||||
public:
|
||||
AZ_COMPONENT(RuntimeComponent, "{95BFD916-E832-4956-837D-525DE8384282}", NetBindable);
|
||||
AZ_COMPONENT(RuntimeComponent, "{95BFD916-E832-4956-837D-525DE8384282}", AZ::Component);
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
@@ -67,8 +64,6 @@ namespace ScriptCanvas
|
||||
|
||||
const VariableData& GetVariableOverrides() const;
|
||||
|
||||
void SetNetworkBinding(GridMate::ReplicaChunkPtr) {}
|
||||
|
||||
void SetVariableOverrides(const VariableData& overrideData);
|
||||
|
||||
protected:
|
||||
@@ -103,8 +98,6 @@ namespace ScriptCanvas
|
||||
|
||||
void StopExecution();
|
||||
|
||||
void UnbindFromNetwork(void) {}
|
||||
|
||||
private:
|
||||
AZ::Data::Asset<RuntimeAsset> m_runtimeAsset;
|
||||
ExecutionStatePtr m_executionState;
|
||||
|
||||
@@ -234,7 +234,7 @@ namespace ScriptCanvas
|
||||
AZStd::set<const GraphVariable*, GraphVariable::Comparator> sortedVariables;
|
||||
for (const auto& variablePair : sourceVariables)
|
||||
{
|
||||
if (variablePair.second.GetScope() == VariableFlags::Scope::Graph)
|
||||
if (variablePair.second.GetScope() != VariableFlags::Scope::FunctionReadOnly)
|
||||
{
|
||||
sortedVariables.insert(&variablePair.second);
|
||||
}
|
||||
@@ -244,14 +244,19 @@ namespace ScriptCanvas
|
||||
// #functions2 slot<->variable consider getting all variables from the UX variable manager, or from the ACM and looking them up in the variable manager for ordering
|
||||
m_sourceVariableByDatum.insert(AZStd::make_pair(datum, &variablePair.second));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (auto& sourceVariable : sortedVariables)
|
||||
{
|
||||
auto datum = sourceVariable->GetDatum();
|
||||
AZ_Assert(datum != nullptr, "the datum must be valid");
|
||||
|
||||
// #functions2 slot<->variable check to verify if it is a member variable
|
||||
auto variable = AddMemberVariable(*datum, sourceVariable->GetVariableName(), sourceVariable->GetVariableId());
|
||||
auto variable = sourceVariable->GetScope() == VariableFlags::Scope::Graph
|
||||
? AddMemberVariable(*datum, sourceVariable->GetVariableName(), sourceVariable->GetVariableId())
|
||||
: AddVariable(*datum, sourceVariable->GetVariableName(), sourceVariable->GetVariableId());
|
||||
|
||||
variable->m_isExposedToConstruction = sourceVariable->IsComponentProperty();
|
||||
// also, all nodeables with !empty editor data have to be exposed
|
||||
// \todo future optimizations will involve checking equality against a default constructed object
|
||||
@@ -1205,7 +1210,13 @@ namespace ScriptCanvas
|
||||
}
|
||||
|
||||
auto& variableNamesInStart = ModStaticVariablesNames(startNode);
|
||||
variableNamesInStart.insert(variableNamesInStart.end(), m_staticVariableNames.begin(), m_staticVariableNames.end());
|
||||
for (auto& staticVariable : m_staticVariableNames)
|
||||
{
|
||||
if (AZStd::find(variableNamesInStart.begin(), variableNamesInStart.end(), staticVariable) == variableNamesInStart.end())
|
||||
{
|
||||
variableNamesInStart.push_back(staticVariable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractCodeModel::CreateUserFunctionDefinition(const Node& node, const Slot& entrySlot)
|
||||
@@ -1598,7 +1609,7 @@ namespace ScriptCanvas
|
||||
const AZStd::pair<VariableConstPtr, AZStd::string>* AbstractCodeModel::FindStaticVariable(VariableConstPtr variable) const
|
||||
{
|
||||
auto iter = AZStd::find_if
|
||||
(m_staticVariableNames.begin()
|
||||
( m_staticVariableNames.begin()
|
||||
, m_staticVariableNames.end()
|
||||
, [&](const auto& candidate) { return candidate.first == variable; });
|
||||
|
||||
@@ -2701,15 +2712,20 @@ namespace ScriptCanvas
|
||||
AZStd::string name = AddTranslationVariableName(AZStd::string::format("s_%sCloneSource", staticVariable->m_name.c_str()));
|
||||
staticVariableNames.push_back({ staticVariable, name });
|
||||
|
||||
if (!staticVariable->m_isMember)
|
||||
if (!staticVariable->m_isMember && !staticVariable->m_isFromFunctionDefinitionSlot)
|
||||
{
|
||||
if (staticVariable->m_source)
|
||||
{
|
||||
ModStaticVariablesNames(staticVariable->m_source).push_back({ staticVariable, name });
|
||||
}
|
||||
else
|
||||
{
|
||||
AddError(nullptr, aznew Internal::ParseError(AZ::EntityId(), "Missing source for local variable that requires static initializer"));
|
||||
auto& localStatics = ModStaticVariablesNames(staticVariable->m_source);
|
||||
auto iter = AZStd::find_if
|
||||
( localStatics.begin()
|
||||
, localStatics.end()
|
||||
, [&](const auto& candidate) { return candidate.first == staticVariable; });
|
||||
|
||||
if (iter == localStatics.end())
|
||||
{
|
||||
localStatics.push_back({ staticVariable, name });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3098,7 +3114,7 @@ namespace ScriptCanvas
|
||||
/// NOTE: after basic iteration works correctly
|
||||
/// \todo when subsequent input (from nodes connected to the break slot) looks up the slot from the node with key or the value,
|
||||
/// it is going to have to find the output of the get/key value functions in BOTH the child outs of break and loop
|
||||
/// https://jira.agscollab.com/browse/LY-109862 may be required for this
|
||||
/// LY-109862 may be required for this
|
||||
|
||||
ExecutionTreePtr lastExecution = forEachLoopBody;
|
||||
|
||||
@@ -3257,13 +3273,12 @@ namespace ScriptCanvas
|
||||
return;
|
||||
}
|
||||
|
||||
execution->SetNodeable(iter->second->m_nodeable);
|
||||
child->SetNodeable(iter->second->m_nodeable);
|
||||
|
||||
for (auto& childOutSlot : childOutSlots)
|
||||
{
|
||||
AZ_Assert(childOutSlot, "null slot in child out slot list");
|
||||
ExecutionTreePtr internalOut = OpenScope(child, node, childOutSlot);
|
||||
internalOut->SetNodeable(execution->GetNodeable());
|
||||
|
||||
const size_t outIndex = node->GetOutIndex(*childOutSlot);
|
||||
if (outIndex == std::numeric_limits<size_t>::max())
|
||||
@@ -4393,6 +4408,7 @@ namespace ScriptCanvas
|
||||
|
||||
// Scope and name are initialized later
|
||||
variable->m_sourceSlotId = slot->GetId();
|
||||
variable->m_isFromFunctionDefinitionSlot = true;
|
||||
variablesBySlots.insert({ slot, variable });
|
||||
m_variables.push_back(variable);
|
||||
}
|
||||
@@ -4998,6 +5014,24 @@ namespace ScriptCanvas
|
||||
|
||||
m_variableUse.localVariables.insert(usage.localVariables.begin(), usage.localVariables.end());
|
||||
m_variableUse.memberVariables.insert(usage.memberVariables.begin(), usage.memberVariables.end());
|
||||
|
||||
for (auto variable : m_variableUse.localVariables)
|
||||
{
|
||||
if (const AZStd::pair<VariableConstPtr, AZStd::string>* pair = FindStaticVariable(variable))
|
||||
{
|
||||
auto& localStatics = ModStaticVariablesNames(execution);
|
||||
auto iter = AZStd::find_if
|
||||
(localStatics.begin()
|
||||
, localStatics.end()
|
||||
, [&](const auto& candidate) { return candidate.first == variable; });
|
||||
|
||||
if (iter == localStatics.end())
|
||||
{
|
||||
localStatics.push_back(*pair);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_variableUseByExecution.emplace(execution, listener.MoveUsedVariables());
|
||||
return (!usage.usesExternallyInitializedVariables) && usesOnlyLocalVariables && listener.IsPure();
|
||||
}
|
||||
|
||||
@@ -87,4 +87,4 @@ namespace ScriptCanvas
|
||||
|
||||
} // namespace Parser
|
||||
|
||||
} // namepsace ScriptCanvas
|
||||
} // namepsace ScriptCanvas
|
||||
|
||||
@@ -37,4 +37,4 @@ namespace ScriptCanvas
|
||||
using EventBus = AZ::EBus<EventTraits>;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,4 +105,4 @@ namespace ScriptCanvas
|
||||
};
|
||||
} // namespace Grammar
|
||||
|
||||
} // namespace ScriptCanvas}
|
||||
} // namespace ScriptCanvas}
|
||||
|
||||
@@ -537,6 +537,20 @@ namespace ScriptCanvas
|
||||
return azrtti_istypeof<const ScriptCanvas::Nodes::Logic::Break*>(execution->GetId().m_node);
|
||||
}
|
||||
|
||||
bool IsClassPropertyRead(ExecutionTreeConstPtr execution)
|
||||
{
|
||||
return execution->GetSymbol() == Symbol::FunctionCall
|
||||
&& azrtti_istypeof<const ScriptCanvas::Nodes::Core::Method*>(execution->GetId().m_node)
|
||||
&& azrtti_cast<const ScriptCanvas::Nodes::Core::Method*>(execution->GetId().m_node)->GetPropertyStatus() == PropertyStatus::Getter;
|
||||
}
|
||||
|
||||
bool IsClassPropertyWrite(ExecutionTreeConstPtr execution)
|
||||
{
|
||||
return execution->GetSymbol() == Symbol::FunctionCall
|
||||
&& azrtti_istypeof<const ScriptCanvas::Nodes::Core::Method*>(execution->GetId().m_node)
|
||||
&& azrtti_cast<const ScriptCanvas::Nodes::Core::Method*>(execution->GetId().m_node)->GetPropertyStatus() == PropertyStatus::Setter;
|
||||
}
|
||||
|
||||
bool IsCodeConstructable(Grammar::VariableConstPtr value)
|
||||
{
|
||||
return Data::IsValueType(value->m_datum.GetType())
|
||||
@@ -1280,7 +1294,6 @@ namespace ScriptCanvas
|
||||
return identifier;
|
||||
}
|
||||
|
||||
|
||||
ExecutionTraversalResult TraverseExecutionConnectionsRecurse(const EndpointsResolved& nextEndpoints, AZStd::unordered_set<const Slot*>& previousIns, GraphExecutionPathTraversalListener& listener);
|
||||
|
||||
ExecutionTraversalResult TraverseExecutionConnectionsRecurse(const EndpointResolved& in, AZStd::unordered_set<const Slot*>& previousIns, GraphExecutionPathTraversalListener& listener);
|
||||
|
||||
@@ -79,6 +79,10 @@ namespace ScriptCanvas
|
||||
|
||||
bool IsBreak(const ExecutionTreeConstPtr& execution);
|
||||
|
||||
bool IsClassPropertyRead(ExecutionTreeConstPtr execution);
|
||||
|
||||
bool IsClassPropertyWrite(ExecutionTreeConstPtr execution);
|
||||
|
||||
bool IsCodeConstructable(VariableConstPtr value);
|
||||
|
||||
bool IsCycle(const Node& node);
|
||||
|
||||
@@ -269,6 +269,7 @@ namespace ScriptCanvas
|
||||
bool m_isUnused = false; // used for multiple return situations, and to prevent compile errors
|
||||
bool m_isExposedToConstruction = false;
|
||||
bool m_isDebugOnly = false;
|
||||
bool m_isFromFunctionDefinitionSlot = false;
|
||||
|
||||
Variable() = default;
|
||||
Variable(Datum&& datum);
|
||||
|
||||
@@ -262,9 +262,6 @@ namespace ScriptCanvas
|
||||
|
||||
void SetSymbol(Symbol val);
|
||||
|
||||
protected:
|
||||
VariableConstPtr m_nodeable;
|
||||
|
||||
private:
|
||||
// the (possible) slot(s) through which execution exited, along with associated output
|
||||
AZStd::vector<ExecutionChild> m_children;
|
||||
@@ -316,6 +313,8 @@ namespace ScriptCanvas
|
||||
|
||||
Symbol m_symbol = Symbol::FunctionCall;
|
||||
|
||||
VariableConstPtr m_nodeable;
|
||||
|
||||
size_t FindIndexOfChild(ExecutionTreeConstPtr child) const;
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="BaseTimer"
|
||||
Uuid="{64814C82-DAE5-9B04-B375-5E47D51ECD26}"
|
||||
Base="ScriptCanvas::Nodeable"
|
||||
Icon="Editor/Icons/ScriptCanvas/Placeholder.png"
|
||||
Icon="Icons/ScriptCanvas/Placeholder.png"
|
||||
Category="Utilities"
|
||||
Version="0"
|
||||
EntryPoint="true"
|
||||
@@ -30,4 +30,4 @@
|
||||
</Property>
|
||||
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="BaseTimerNode"
|
||||
Uuid="{BAD6C904-6078-49E8-B461-CA4410B785A4}"
|
||||
Base="ScriptCanvas::Node"
|
||||
Icon="Editor/Icons/ScriptCanvas/Placeholder.png"
|
||||
Icon="Icons/ScriptCanvas/Placeholder.png"
|
||||
Category="Utilities"
|
||||
Version="0"
|
||||
GeneratePropertyFriend="True"
|
||||
@@ -20,4 +20,4 @@
|
||||
<EditProperty UiHandler="AZ::Edit::UIHandlers::Default" FieldName="m_tickOrder" Name="m_tickOrder" >
|
||||
</EditProperty>
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+1
-1
@@ -19,4 +19,4 @@
|
||||
<EditAttribute Key="AZ::Edit::Attributes::StringLineEditingCompleteNotify" Value="&ExpressionNodeBase::SignalFormatChanged"/>
|
||||
</EditProperty>
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+1
-1
@@ -26,4 +26,4 @@
|
||||
<EditAttribute Key="AZ::Edit::Attributes::Max" Value="24"/>
|
||||
</EditProperty>
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace ScriptCanvas
|
||||
editContext->Class<Comparison>("Comparisons", "Provides mathematical equality operations")->
|
||||
ClassElement(AZ::Edit::ClassElements::EditorData, "")->
|
||||
Attribute(AZ::Edit::Attributes::Category, "Math/Comparisons")->
|
||||
Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Libraries/Logic.png")->
|
||||
Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Libraries/Logic.png")->
|
||||
Attribute(AZ::Edit::Attributes::CategoryStyle, ".comparison")->
|
||||
Attribute(ScriptCanvas::Attributes::Node::TitlePaletteOverride, "ComparisonNodeTitlePalette")
|
||||
;
|
||||
|
||||
@@ -39,4 +39,4 @@ namespace ScriptCanvas
|
||||
static AZStd::vector<AZ::ComponentDescriptor*> GetComponentDescriptors();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -388,4 +388,4 @@ namespace ScriptCanvas
|
||||
}
|
||||
}
|
||||
|
||||
#endif // EXPRESSION_TEMPLATES_ENABLED
|
||||
#endif // EXPRESSION_TEMPLATES_ENABLED
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
editContext->Class<EqualTo>("Equal To (==)", "Checks if Value A and Value B are equal to each other")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
editContext->Class<Greater>("Greater Than (>)", "Checks if Value A is greater than Value B")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
editContext->Class<GreaterEqual>("Greater Than or Equal To (>=)", "Checks if Value A is greater than or equal to Value B")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
editContext->Class<Less>("Less Than (<)", "Checks if Value A is less than Value B")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
editContext->Class<LessEqual>("Less Than or Equal To (<=)", "Checks if Value A is less than or equal to Value B")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
editContext->Class<NotEqualTo>("Not Equal To (!=)", "Checks if Value A is not equal to Value B")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Placeholder.png")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
|
||||
;
|
||||
}
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
PreferredClassName="AZ Event Handler"
|
||||
Uuid="{38B808C5-152C-4643-A08C-463EBED55E19}"
|
||||
Base="ScriptCanvas::Node"
|
||||
Icon="Editor/Icons/ScriptCanvas/AzEvent.png"
|
||||
Icon="Icons/ScriptCanvas/AzEvent.png"
|
||||
Version="0"
|
||||
EditAttributes="AZ::Script::Attributes::ExcludeFrom@AZ::Script::Attributes::ExcludeFlags::All"
|
||||
GraphEntryPoint="True"
|
||||
@@ -18,4 +18,4 @@
|
||||
<Out Name="On Disconnected" Description="Signaled when this event handler is disconnected."/>
|
||||
<SerializedProperty Name="m_azEventEntry" />
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+1
-1
@@ -75,4 +75,4 @@ namespace ScriptCanvas
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
editContext->Class<Core>("Core", "")->
|
||||
ClassElement(AZ::Edit::ClassElements::EditorData, "")->
|
||||
Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Libraries/Core.png")->
|
||||
Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Libraries/Core.png")->
|
||||
Attribute(AZ::Edit::Attributes::CategoryStyle, ".time")->
|
||||
Attribute(ScriptCanvas::Attributes::Node::TitlePaletteOverride, "TimeNodeTitlePalette")
|
||||
;
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="Event Handler"
|
||||
Uuid="{33E12915-EFCA-4AA7-A188-D694DAD58980}"
|
||||
Base="ScriptCanvas::Node"
|
||||
Icon="Editor/Icons/ScriptCanvas/Bus.png"
|
||||
Icon="Icons/ScriptCanvas/Bus.png"
|
||||
Version="5"
|
||||
VersionConverter="ScriptCanvas::VersionConverters::EBusEventHandlerVersionConverter"
|
||||
EventHandler="SerializeContextOnWriteEndHandler<EBusEventHandler>"
|
||||
@@ -24,4 +24,4 @@
|
||||
<SerializedProperty Name="m_busId" />
|
||||
<SerializedProperty Name="m_autoConnectToGraphOwner" />
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace ScriptCanvas
|
||||
editContext->Class<Error>("Error", "")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Category, "Utilities/Debug")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Error.png")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Error.png")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace ScriptCanvas
|
||||
editContext->Class<ErrorHandler>("Error Handler", "")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Category, "Utilities/Debug")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/ErrorHandler.png")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/ErrorHandler.png")
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="Extract Properties"
|
||||
Uuid="{D4C9DA8E-838B-41C6-B870-C75294C323DC}"
|
||||
Base="ScriptCanvas::Node"
|
||||
Icon="Editor/Icons/ScriptCanvas/Placeholder.png"
|
||||
Icon="Icons/ScriptCanvas/Placeholder.png"
|
||||
Category="Utilities"
|
||||
Version="1"
|
||||
VersionConverter="VersionConverter"
|
||||
@@ -21,4 +21,4 @@
|
||||
<SerializedProperty Name="m_dataType" />
|
||||
<SerializedProperty Name="m_propertyAccounts" />
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="For Each"
|
||||
Uuid="{31823035-A3FF-4B8D-A3A6-819519478B7C}"
|
||||
Base="ScriptCanvas::Node"
|
||||
Icon="Editor/Icons/ScriptCanvas/Placeholder.png"
|
||||
Icon="Icons/ScriptCanvas/Placeholder.png"
|
||||
Category="Containers"
|
||||
Version="2"
|
||||
VersionConverter="ScriptCanvas::VersionConverters::ForEachVersionConverter"
|
||||
@@ -20,4 +20,4 @@
|
||||
<SerializedProperty Name="m_previousTypeId" />
|
||||
<SerializedProperty Name="m_propertySlots" />
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
@@ -52,4 +52,4 @@ namespace ScriptCanvas
|
||||
};
|
||||
|
||||
using FunctionNodeRequestBus = AZ::EBus<FunctionNodeRequests>;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="Function Call Node"
|
||||
Uuid="{ECFDD30E-A16D-4435-97B7-B2A4DF3C543A}"
|
||||
Base="ScriptCanvas::Node"
|
||||
Icon="Editor/Icons/ScriptCanvas/Bus.png"
|
||||
Icon="Icons/ScriptCanvas/Bus.png"
|
||||
Version="Version::Current"
|
||||
VersionConverter="ScriptCanvas::VersionConverters::FunctionNodeVersionConverter"
|
||||
DynamicSlotOrdering="True"
|
||||
@@ -18,4 +18,4 @@
|
||||
<SerializedProperty Name="m_slotExecutionMap" />
|
||||
<SerializedProperty Name="m_slotExecutionMapSourceInterface" />
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="Function Definition"
|
||||
Uuid="{4EE28D9F-67FB-4E61-B777-5DC5B059710F}"
|
||||
Base="ScriptCanvas::Nodes::Core::Internal::Nodeling"
|
||||
Icon="Editor/Icons/ScriptCanvas/Start.png"
|
||||
Icon="Icons/ScriptCanvas/Start.png"
|
||||
Category="Core"
|
||||
Version="1"
|
||||
EditAttributes="AZ::Script::Attributes::ExcludeFrom@AZ::Script::Attributes::ExcludeFlags::All"
|
||||
@@ -15,4 +15,4 @@
|
||||
Description="Represents either an execution entry or exit node.">
|
||||
<SerializedProperty Name="m_isExecutionEntry" />
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="Get Variable"
|
||||
Uuid="{8225BE35-4C45-4A32-94D9-3DE114F6F5AF}"
|
||||
Base="ScriptCanvas::Node"
|
||||
Icon="Editor/Icons/ScriptCanvas/Placeholder.png"
|
||||
Icon="Icons/ScriptCanvas/Placeholder.png"
|
||||
Version="0"
|
||||
GeneratePropertyFriend="True"
|
||||
Description="Node for referencing a property within the graph">
|
||||
@@ -20,4 +20,4 @@
|
||||
<EditAttribute Key="AZ::Edit::Attributes::PostChangeNotify" Value="&GetVariableNode::OnIdChanged"/>
|
||||
</EditProperty>
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
@@ -193,6 +193,22 @@ namespace ScriptCanvas
|
||||
return DynamicDataType::Any;
|
||||
}
|
||||
|
||||
PropertyStatus Method::GetPropertyStatus() const
|
||||
{
|
||||
switch (m_methodType)
|
||||
{
|
||||
case MethodType::Getter:
|
||||
return PropertyStatus::Getter;
|
||||
|
||||
case MethodType::Setter:
|
||||
return PropertyStatus::Setter;
|
||||
|
||||
default:
|
||||
return PropertyStatus::None;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Method::InitializeMethod(const MethodConfiguration& config)
|
||||
{
|
||||
m_namespaces = config.m_namespaces ? *config.m_namespaces : m_namespaces;
|
||||
@@ -239,7 +255,7 @@ namespace ScriptCanvas
|
||||
OnInitializeOutputPost(outputConfig);
|
||||
}
|
||||
|
||||
void Method::InitializeBehaviorMethod(const NamespacePath& namespaces, AZStd::string_view className, AZStd::string_view methodName)
|
||||
void Method::InitializeBehaviorMethod(const NamespacePath& namespaces, AZStd::string_view className, AZStd::string_view methodName, PropertyStatus propertyStatus)
|
||||
{
|
||||
AZ::BehaviorContext* behaviorContext = nullptr;
|
||||
AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationRequests::GetBehaviorContext);
|
||||
@@ -255,13 +271,13 @@ namespace ScriptCanvas
|
||||
{
|
||||
InitializeFree(namespaces, methodName);
|
||||
}
|
||||
else if (auto ebusIterator = behaviorContext->m_ebuses.find(className); ebusIterator == behaviorContext->m_ebuses.end())
|
||||
else if (auto ebusIterator = behaviorContext->m_ebuses.find(className); ebusIterator != behaviorContext->m_ebuses.end())
|
||||
{
|
||||
InitializeClass(namespaces, className, methodName);
|
||||
InitializeEvent(namespaces, className, methodName);
|
||||
}
|
||||
else
|
||||
{
|
||||
InitializeEvent(namespaces, className, methodName);
|
||||
InitializeClass(namespaces, className, methodName, propertyStatus);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +292,7 @@ namespace ScriptCanvas
|
||||
|
||||
if (IsMethodOverloaded() && BehaviorContextUtils::FindExplicitOverload(method, bcClass, className, methodName, &prettyClassName))
|
||||
{
|
||||
MethodConfiguration config(*method, method->IsMember() ? MethodType::Member : MethodType::Free);
|
||||
MethodConfiguration config(*method, MethodType::Member);
|
||||
config.m_class = bcClass;
|
||||
config.m_namespaces = &m_namespaces;
|
||||
config.m_className = &className;
|
||||
@@ -291,7 +307,7 @@ namespace ScriptCanvas
|
||||
}
|
||||
}
|
||||
|
||||
void Method::InitializeClass(const NamespacePath&, AZStd::string_view className, AZStd::string_view methodName)
|
||||
void Method::InitializeClass(const NamespacePath&, AZStd::string_view className, AZStd::string_view methodName, PropertyStatus propertyStatus)
|
||||
{
|
||||
AZStd::lock_guard<AZStd::recursive_mutex> lock(m_mutex);
|
||||
|
||||
@@ -299,9 +315,11 @@ namespace ScriptCanvas
|
||||
const AZ::BehaviorClass* bcClass{};
|
||||
AZStd::string prettyClassName;
|
||||
|
||||
if (BehaviorContextUtils::FindClass(method, bcClass, className, methodName, &prettyClassName))
|
||||
if (BehaviorContextUtils::FindClass(method, bcClass, className, methodName, propertyStatus, &prettyClassName))
|
||||
{
|
||||
MethodConfiguration config(*method, MethodType::Member);
|
||||
const auto methodType = propertyStatus == PropertyStatus::None ? MethodType::Member : propertyStatus == PropertyStatus::Getter ? MethodType::Getter : MethodType::Setter;
|
||||
|
||||
MethodConfiguration config(*method, methodType);
|
||||
config.m_class = bcClass;
|
||||
config.m_namespaces = &m_namespaces;
|
||||
config.m_className = &className;
|
||||
@@ -647,8 +665,12 @@ namespace ScriptCanvas
|
||||
break;
|
||||
|
||||
case MethodType::Member:
|
||||
case MethodType::Getter:
|
||||
case MethodType::Setter:
|
||||
{
|
||||
if (BehaviorContextUtils::FindClass(method, bcClass, m_className, methodName, nullptr, m_warnOnMissingFunction))
|
||||
PropertyStatus status = m_methodType == MethodType::Getter ? PropertyStatus::Getter : m_methodType == MethodType::Setter ? PropertyStatus::Setter : PropertyStatus::None;
|
||||
|
||||
if (BehaviorContextUtils::FindClass(method, bcClass, m_className, methodName, status, nullptr, m_warnOnMissingFunction))
|
||||
{
|
||||
outClass = bcClass;
|
||||
outMethod = method;
|
||||
|
||||
@@ -87,14 +87,13 @@ namespace ScriptCanvas
|
||||
bool IsObjectClass(AZStd::string_view objectClass) const { return objectClass.compare(m_className) == 0; }
|
||||
|
||||
//! Attempts to initialize node with a BehaviorContext BehaviorMethod
|
||||
//! If the className is empty, then the methodName is searched on the BehaviorContext
|
||||
//! If className is not empty the className is used to look for a registered BehaviorEBus in the BehaviorContext
|
||||
//! and if found, the methodName is searched among the BehaviorEBus events
|
||||
//! Otherwise the className is used to look for a registered BehaviorClass in the BehaviorContext
|
||||
//! and if found, the methodName is searched among the BehaviorClass methods
|
||||
void InitializeBehaviorMethod(const NamespacePath& namespaces, AZStd::string_view className, AZStd::string_view methodName);
|
||||
//! 1) If the names match an overloaded method, including one using ExplicitOverloadInfo, then that method is used. Else:
|
||||
//! 2) If the class name is empty, then search for a free method is searched for in the BehaviorContext and there is a warning if not found.
|
||||
//! 3) If the class name matches an ebus, methodName is searched among the BehaviorEBus events, and there is a warning if not found.
|
||||
//! 4) if the class name does NOT match an ebus, className and methodName are used to look for a registered BehaviorClass in the BehaviorContext, and there is a warning if not found.
|
||||
void InitializeBehaviorMethod(const NamespacePath& namespaces, AZStd::string_view className, AZStd::string_view methodName, PropertyStatus propertyStatus);
|
||||
|
||||
void InitializeClass(const NamespacePath& namespaces, AZStd::string_view className, AZStd::string_view methodName);
|
||||
void InitializeClass(const NamespacePath& namespaces, AZStd::string_view className, AZStd::string_view methodName, PropertyStatus propertyStatus);
|
||||
|
||||
void InitializeEvent(const NamespacePath& namespaces, AZStd::string_view busName, AZStd::string_view eventName);
|
||||
|
||||
@@ -126,6 +125,8 @@ namespace ScriptCanvas
|
||||
|
||||
virtual DynamicDataType GetOverloadedOutputType(size_t resultIndex) const;
|
||||
|
||||
PropertyStatus GetPropertyStatus() const;
|
||||
|
||||
protected:
|
||||
void ConfigureMethod(const AZ::BehaviorMethod& method, const AZ::BehaviorClass* bcClass);
|
||||
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="Nodeling"
|
||||
Uuid="{4413EEA0-8D81-4D61-A1E1-3C1A437F3643}"
|
||||
Base="ScriptCanvas::Node"
|
||||
Icon="Editor/Icons/ScriptCanvas/Start.png"
|
||||
Icon="Icons/ScriptCanvas/Start.png"
|
||||
Category="Core"
|
||||
Version="1"
|
||||
GeneratePropertyFriend="True"
|
||||
@@ -14,4 +14,4 @@
|
||||
<SerializedProperty Name="m_displayName" />
|
||||
<SerializedProperty Name="m_identifier" />
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="Receive Script Event"
|
||||
Uuid="{76CF9938-4A7E-4CDA-8DF3-77C10239D99C}"
|
||||
Base="ScriptCanvas::Nodes::Core::Internal::ScriptEventBase"
|
||||
Icon="Editor/Icons/ScriptCanvas/Bus.png"
|
||||
Icon="Icons/ScriptCanvas/Bus.png"
|
||||
Version="4"
|
||||
VersionConverter="ScriptCanvas::VersionConverters::ReceiveScriptEventVersionConverter"
|
||||
EditAttributes="AZ::Script::Attributes::ExcludeFrom@AZ::Script::Attributes::ExcludeFlags::All"
|
||||
@@ -21,4 +21,4 @@
|
||||
<Out Name="OnFailure" Description="Signaled when it is not possible to connect this handler."/>
|
||||
<SerializedProperty Name="m_autoConnectToGraphOwner" />
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="Repeater"
|
||||
Uuid="{0A38EDCA-0571-48F0-9199-F6168C1EAAF0}"
|
||||
Base="ScriptCanvas::Nodes::Internal::BaseTimerNode"
|
||||
Icon="Editor/Icons/ScriptCanvas/Placeholder.png"
|
||||
Icon="Icons/ScriptCanvas/Placeholder.png"
|
||||
Deprecated="This node is deprecated"
|
||||
DeprecationUUID="{AB587027-2270-4CA6-242F-6069C6D9BBB6}"
|
||||
Category="Utilities"
|
||||
@@ -24,4 +24,4 @@
|
||||
<OutLatent Name="Complete" Description="Signaled upon node exit"/>
|
||||
<OutLatent Name="Action" Description="The signal that will be repeated"/>
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="Repeater"
|
||||
Uuid="{4FBB5021-F3C8-E743-BF2E-BC6E5D57D48E}"
|
||||
Base="Nodeables::Time::BaseTimer"
|
||||
Icon="Editor/Icons/ScriptCanvas/Placeholder.png"
|
||||
Icon="Icons/ScriptCanvas/Placeholder.png"
|
||||
Category="Nodeables"
|
||||
GeneratePropertyFriend="True"
|
||||
Namespace="ScriptCanvas"
|
||||
@@ -25,4 +25,4 @@
|
||||
<PropertyInterface Property="m_timeUnitsInterface" Name="Units" Type="Input" Description="Units to represent the time in."/>
|
||||
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
<SerializedProperty Name="m_scriptEventAssetId" />
|
||||
<SerializedProperty Name="m_asset" />
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
<SerializedProperty Name="m_scriptEventAssetId" />
|
||||
<SerializedProperty Name="m_asset" />
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="Send Script Event"
|
||||
Uuid="{64A97CC3-2BEA-4B47-809B-6C7DA34FD00F}"
|
||||
Base="ScriptCanvas::Nodes::Core::Internal::ScriptEventBase"
|
||||
Icon="Editor/Icons/ScriptCanvas/Bus.png"
|
||||
Icon="Icons/ScriptCanvas/Bus.png"
|
||||
Version="4"
|
||||
DynamicSlotOrdering="True"
|
||||
EditAttributes="AZ::Script::Attributes::ExcludeFrom@AZ::Script::Attributes::ExcludeFlags::All"
|
||||
@@ -18,4 +18,4 @@
|
||||
<In Name="In" Description="Fires the specified ScriptEvent when signaled"/>
|
||||
<Out Name="Out" Description="Trigged after the ScriptEvent has been signaled and returns"/>
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="Set Variable"
|
||||
Uuid="{5EFD2942-AFF9-4137-939C-023AEAA72EB0}"
|
||||
Base="ScriptCanvas::Node"
|
||||
Icon="Editor/Icons/ScriptCanvas/Placeholder.png"
|
||||
Icon="Icons/ScriptCanvas/Placeholder.png"
|
||||
Version="1"
|
||||
GeneratePropertyFriend="True"
|
||||
Description="Node for setting a property within the graph">
|
||||
@@ -21,4 +21,4 @@
|
||||
<EditAttribute Key="AZ::Edit::Attributes::PostChangeNotify" Value="&SetVariableNode::OnIdChanged"/>
|
||||
</EditProperty>
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
PreferredClassName="On Graph Start"
|
||||
Uuid="{F200B22A-5903-483A-BF63-5241BC03632B}"
|
||||
Base="ScriptCanvas::Node"
|
||||
Icon="Editor/Icons/ScriptCanvas/Start.png"
|
||||
Icon="Icons/ScriptCanvas/Start.png"
|
||||
Category="Timing"
|
||||
Version="2"
|
||||
GraphEntryPoint="True"
|
||||
@@ -14,4 +14,4 @@
|
||||
Description="Starts executing the graph when the entity that owns the graph is fully activated.">
|
||||
<Out Name="Out" Description="Signaled when the entity that owns this graph is fully activated."/>
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
</ScriptCanvas>
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
editContext->Class<String>("String", "Holds a string value")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/String.png")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/String.png")
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
editContext->Class<Entity>("Entity", "")->
|
||||
ClassElement(AZ::Edit::ClassElements::EditorData, "")->
|
||||
Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Libraries/Entity.png")
|
||||
Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Libraries/Entity.png")
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
editContext->Class<EntityID>("EntityID", "Stores a reference to an entity")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/EntityID.png")
|
||||
->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/EntityID.png")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
|
||||
;
|
||||
}
|
||||
@@ -49,4 +49,4 @@ namespace ScriptCanvas
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user