Merge pull request #510 from aws-lumberyard-dev/carlitosan-beta-fixes
Carlitosan beta fixes - autogen Property fixes for nodeables
This commit is contained in:
+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 %}
|
||||
;
|
||||
}
|
||||
|
||||
@@ -122,6 +122,8 @@ namespace ScriptCanvasTests
|
||||
::Nodes::InputTypeExampleNode::Reflect(m_behaviorContext);
|
||||
::Nodes::BranchInputTypeExampleNode::Reflect(m_serializeContext);
|
||||
::Nodes::BranchInputTypeExampleNode::Reflect(m_behaviorContext);
|
||||
::Nodes::PropertyExampleNode::Reflect(m_serializeContext);
|
||||
::Nodes::PropertyExampleNode::Reflect(m_behaviorContext);
|
||||
|
||||
TestNodeableObject::Reflect(m_serializeContext);
|
||||
TestNodeableObject::Reflect(m_behaviorContext);
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace ScriptCanvasTesting
|
||||
ScriptCanvas::Library::AddNodeToRegistry<NodeableTestingLibrary, ::Nodes::ReturnTypeExampleNode>(nodeRegistry);
|
||||
ScriptCanvas::Library::AddNodeToRegistry<NodeableTestingLibrary, ::Nodes::InputTypeExampleNode>(nodeRegistry);
|
||||
ScriptCanvas::Library::AddNodeToRegistry<NodeableTestingLibrary, ::Nodes::BranchInputTypeExampleNode>(nodeRegistry);
|
||||
ScriptCanvas::Library::AddNodeToRegistry<NodeableTestingLibrary, ::Nodes::PropertyExampleNode>(nodeRegistry);
|
||||
}
|
||||
|
||||
AZStd::vector<AZ::ComponentDescriptor*> NodeableTestingLibrary::GetComponentDescriptors()
|
||||
@@ -53,7 +54,8 @@ namespace ScriptCanvasTesting
|
||||
::Nodes::BranchMethodSharedDataSlotExampleNode::CreateDescriptor(),
|
||||
::Nodes::ReturnTypeExampleNode::CreateDescriptor(),
|
||||
::Nodes::InputTypeExampleNode::CreateDescriptor(),
|
||||
::Nodes::BranchInputTypeExampleNode::CreateDescriptor()
|
||||
::Nodes::BranchInputTypeExampleNode::CreateDescriptor(),
|
||||
::Nodes::PropertyExampleNode::CreateDescriptor()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+18
-4
@@ -32,7 +32,7 @@
|
||||
<Return Name="Result" Type="AZStd::vector<ScriptCanvas::Data::NumberType>" />
|
||||
</Input>
|
||||
<Input Name="Branches On Input Type" Description="" DisplayGroup="Branches On Input Type">
|
||||
<Parameter Name="Input Type" Type="AZStd::string" Input="True"/>
|
||||
<Parameter Name="Input Type" Type="AZStd::string"/>
|
||||
<Branch Name="By Value" Description="" DisplayGroup="Branches On Input Type">
|
||||
<Return Name="Value Input" Type="AZStd::vector<ScriptCanvas::Data::NumberType>&" DisplayGroup="Branches On Input Type"/>
|
||||
</Branch>
|
||||
@@ -51,13 +51,27 @@
|
||||
Namespace="None"
|
||||
Description="Example of passing as input by value, pointer and reference.">
|
||||
<Input Name="Clear By Value" Description="">
|
||||
<Parameter Name="Value Input" Type="AZStd::vector<ScriptCanvas::Data::NumberType>" Input="True"/>
|
||||
<Parameter Name="Value Input" Type="AZStd::vector<ScriptCanvas::Data::NumberType>"/>
|
||||
</Input>
|
||||
<Input Name="Clear By Pointer" Description="">
|
||||
<Parameter Name="Pointer Input" Type="AZStd::vector<ScriptCanvas::Data::NumberType>*" Input="True"/>
|
||||
<Parameter Name="Pointer Input" Type="AZStd::vector<ScriptCanvas::Data::NumberType>*"/>
|
||||
</Input>
|
||||
<Input Name="Clear By Reference" Description="">
|
||||
<Parameter Name="Reference Input" Type="AZStd::vector<ScriptCanvas::Data::NumberType>&" Input="True"/>
|
||||
<Parameter Name="Reference Input" Type="AZStd::vector<ScriptCanvas::Data::NumberType>&"/>
|
||||
</Input>
|
||||
</Class>
|
||||
<Class Name="PropertyExample"
|
||||
QualifiedName="ScriptCanvasTesting::Nodeables::PropertyExample"
|
||||
PreferredClassName="Property Example"
|
||||
Base="ScriptCanvas::Nodeable"
|
||||
Icon="Icons/ScriptCanvas/Placeholder.png"
|
||||
Category="Tests"
|
||||
GeneratePropertyFriend="True"
|
||||
Namespace="None"
|
||||
Description="Example of using properties.">
|
||||
<Input Name="In" Description=""/>
|
||||
<Property Name="Numbers" Type="AZStd::vector<ScriptCanvas::Data::NumberType>"/>
|
||||
<Property Name="Slang" Type="ScriptCanvas::Data::StringType"/>
|
||||
<Property Name="Position" Type="ScriptCanvas::Data::Vector3Type"/>
|
||||
</Class>
|
||||
</ScriptCanvas>
|
||||
|
||||
@@ -66,5 +66,15 @@ namespace ScriptCanvasTesting
|
||||
{
|
||||
input.clear();
|
||||
}
|
||||
|
||||
void PropertyExample::In()
|
||||
{
|
||||
for (auto& num : Numbers)
|
||||
{
|
||||
AZ_TracePrintf("ScriptCanvas", "%f", num);
|
||||
}
|
||||
|
||||
AZ_TracePrintf("ScriptCanvas", "Slang: %s", Slang.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,5 +48,11 @@ namespace ScriptCanvasTesting
|
||||
{
|
||||
SCRIPTCANVAS_NODE(InputTypeExample);
|
||||
};
|
||||
|
||||
class PropertyExample
|
||||
: public ScriptCanvas::Nodeable
|
||||
{
|
||||
SCRIPTCANVAS_NODE(PropertyExample);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user