From 772a75b5bcd5e5af5949325f86942b36ba28cf14 Mon Sep 17 00:00:00 2001 From: greerdv Date: Mon, 21 Jun 2021 11:12:50 +0100 Subject: [PATCH] exposing non-uniform scale component id as a behavior constant for hydra --- .../ToolsComponents/EditorNonUniformScaleComponent.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.cpp index f72de82f36..4cd18cbc91 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -57,6 +58,13 @@ namespace AzToolsFramework ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly); } } + + if (auto behaviorContext = azrtti_cast(context)) + { + behaviorContext->ConstantProperty("EditorNonUniformScaleComponentTypeId", BehaviorConstant(EditorNonUniformScaleComponent::RTTI_Type())) + ->Attribute(AZ::Script::Attributes::Module, "editor") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation); + } } void EditorNonUniformScaleComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent)