/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ #include #include #include #include #include #include namespace AZ { namespace SceneAPI { namespace SceneData { void SkeletonProxy::Reflect(ReflectContext* context) { SerializeContext* serializeContext = azrtti_cast(context); if (!serializeContext) { return; } serializeContext->Class()->Version(1) ->Field("jointName", &SkeletonProxy::m_jointName) ->Field("proxyName", &SkeletonProxy::m_proxyName); EditContext* editContext = serializeContext->GetEditContext(); if (editContext) { editContext->Class("Skeleton proxy", "Select the physics mesh for ragdoll or for hit detection.") ->ClassElement(Edit::ClassElements::EditorData, "") ->Attribute("AutoExpand", true) ->Attribute(AZ::Edit::Attributes::NameLabelOverride, "") ->DataElement(Edit::UIHandlers::Default, &SkeletonProxy::m_jointName, "Joint name", "Select the skeleton joint for this proxy.") ->DataElement(Edit::UIHandlers::Default, &SkeletonProxy::m_proxyName, "Proxy name", "Pick the physics mesh."); } } AZ_CLASS_ALLOCATOR_IMPL(SkeletonProxyGroup, SystemAllocator, 0) void SkeletonProxyGroup::Reflect(ReflectContext* context) { SerializeContext* serializeContext = azrtti_cast(context); if (!serializeContext) { return; } serializeContext->Class()->Version(1) ->Field("proxyMaterial", &SkeletonProxyGroup::m_proxyMaterialName) ->Field("skeletonProxies", &SkeletonProxyGroup::m_skeletonProxies); EditContext* editContext = serializeContext->GetEditContext(); if (editContext) { editContext->Class("Skeleton proxy group", "Related group of skeleton physics proxies.") ->ClassElement(Edit::ClassElements::EditorData, "") ->Attribute("AutoExpand", true) ->Attribute(AZ::Edit::Attributes::NameLabelOverride, "") ->DataElement(Edit::UIHandlers::Default, &SkeletonProxyGroup::m_proxyMaterialName, "Proxy material name", "Name the material for the physics mesh.") ->DataElement(Edit::UIHandlers::Default, &SkeletonProxyGroup::m_skeletonProxies, "Skeleton proxies", "Select the physics mesh for ragdoll or for hit detection."); } } AZ_CLASS_ALLOCATOR_IMPL(SkeletonProxyRule, SystemAllocator, 0) size_t SkeletonProxyRule::GetProxyGroupCount() const { return m_proxyGroups.size(); } void SkeletonProxyRule::Reflect(ReflectContext* context) { SkeletonProxyGroup::Reflect(context); SkeletonProxy::Reflect(context); SerializeContext* serializeContext = azrtti_cast(context); if (!serializeContext) { return; } serializeContext->Class()->Version(1) ->Field("skeletonProxyGroups", &SkeletonProxyRule::m_proxyGroups); EditContext* editContext = serializeContext->GetEditContext(); if (editContext) { editContext->Class("Skeleton proxies", "Select the physics mesh for ragdoll or for hit detection.") ->ClassElement(Edit::ClassElements::EditorData, "") ->Attribute("AutoExpand", true) ->Attribute(AZ::Edit::Attributes::NameLabelOverride, "") ->DataElement(Edit::UIHandlers::Default, &SkeletonProxyRule::m_proxyGroups, "Proxy groups", "Proxy groups"); } } } // SceneData } // SceneAPI } // AZ