From 9d09656023899e3faa0dcd1e6a6633f8a4dfb1d7 Mon Sep 17 00:00:00 2001 From: santorac <55155825+santorac@users.noreply.github.com> Date: Thu, 30 Sep 2021 01:33:05 -0700 Subject: [PATCH] Removed commented out code. Signed-off-by: santorac <55155825+santorac@users.noreply.github.com> --- .../Material/MaterialTypeSourceData.h | 8 --- .../Material/MaterialTypeSourceData.cpp | 71 ------------------- 2 files changed, 79 deletions(-) diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h index 56f7c4612c..1d918702ff 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h @@ -180,9 +180,7 @@ namespace AZ }; PropertySet* AddPropertySet(AZStd::string_view propertySetId); - //PropertySet* AddPropertySet(AZStd::string_view parentPropertySetId, AZStd::string_view name); PropertyDefinition* AddProperty(AZStd::string_view propertyId); - //PropertyDefinition* AddProperty(AZStd::string_view parentPropertySetId, AZStd::string_view name); const PropertyLayout& GetPropertyLayout() const { return m_propertyLayout; } @@ -241,15 +239,9 @@ namespace AZ private: - //PropertySet* FindPropertySet(AZStd::array_view parsedPropertySetId, AZStd::array_view> inPropertySetList); const PropertySet* FindPropertySet(AZStd::array_view parsedPropertySetId, AZStd::array_view> inPropertySetList) const; - - //PropertyDefinition* FindProperty(AZStd::array_view parsedPropertyId, AZStd::array_view> inPropertySetList); const PropertyDefinition* FindProperty(AZStd::array_view parsedPropertyId, AZStd::array_view> inPropertySetList) const; - //PropertyDefinition* FindProperty(AZStd::array_view parsedPropertyId, PropertySet& inPropertySet); - //const PropertyDefinition* FindProperty(AZStd::array_view parsedPropertyId, const PropertySet& inPropertySet) const; - // Function overloads for recursion, returns false to indicate that recursion should end. bool EnumeratePropertySets(const EnumeratePropertySetsCallback& callback, AZStd::string propertyIdContext, const AZStd::vector>& inPropertySetList) const; bool EnumerateProperties(const EnumeratePropertiesCallback& callback, AZStd::string propertyIdContext, const AZStd::vector>& inPropertySetList) const; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp index de55cbecb5..816e9f4f8d 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp @@ -196,9 +196,6 @@ namespace AZ return PropertySet::AddPropertySet(propertySetId, m_propertyLayout.m_propertySets); } - // TODO: Delete - //return AddPropertySet(splitPropertySetId[0], splitPropertySetId[1]); - PropertySet* parentPropertySet = const_cast(const_cast(this)->FindPropertySet(splitPropertySetId[0])); if (!parentPropertySet) @@ -210,27 +207,9 @@ namespace AZ return parentPropertySet->AddPropertySet(splitPropertySetId[1]); } - // TODO: Delete - //MaterialTypeSourceData::PropertySet* MaterialTypeSourceData::AddPropertySet(AZStd::string_view parentPropertySetId, AZStd::string_view name) - //{ - // PropertySet* parentPropertySet = const_cast(const_cast(this)->FindPropertySet(parentPropertySetId)); - // - // if (!parentPropertySet) - // { - // AZ_Error("Material source data", false, "PropertySet '%.*s' does not exists", AZ_STRING_ARG(parentPropertySetId)); - // return nullptr; - // } - - // return parentPropertySet->AddPropertySet(name); - //} - MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::AddProperty(AZStd::string_view propertyId) { AZStd::vector splitPropertyId = SplitId(propertyId); - //if (splitPropertyId.empty()) - //{ - // return nullptr; - //} if (splitPropertyId.size() == 1) { @@ -238,9 +217,6 @@ namespace AZ return nullptr; } - // TODO: Delete - //return AddProperty(splitPropertyId[0], splitPropertyId[1]); - PropertySet* parentPropertySet = const_cast(const_cast(this)->FindPropertySet(splitPropertyId[0])); if (!parentPropertySet) @@ -252,20 +228,6 @@ namespace AZ return parentPropertySet->AddProperty(splitPropertyId[1]); } - // TODO: Delete - //MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::AddProperty(AZStd::string_view parentPropertySetId, AZStd::string_view name) - //{ - // PropertySet* parentPropertySet = const_cast(const_cast(this)->FindPropertySet(parentPropertySetId)); - // - // if (!parentPropertySet) - // { - // AZ_Error("Material source data", false, "PropertySet '%.*s' does not exists", AZ_STRING_ARG(parentPropertySetId)); - // return nullptr; - // } - - // return parentPropertySet->AddProperty(name); - //} - const MaterialTypeSourceData::PropertySet* MaterialTypeSourceData::FindPropertySet(AZStd::array_view parsedPropertySetId, AZStd::array_view> inPropertySetList) const { for (const auto& propertySet : inPropertySetList) @@ -296,40 +258,12 @@ namespace AZ return nullptr; } - //MaterialTypeSourceData::PropertySet* MaterialTypeSourceData::FindPropertySet(AZStd::array_view parsedPropertySetId, AZStd::array_view> inPropertySetList) - //{ - // return const_cast(const_cast(this)->FindPropertySet(parsedPropertySetId, inPropertySetList)); - //} - const MaterialTypeSourceData::PropertySet* MaterialTypeSourceData::FindPropertySet(AZStd::string_view propertySetId) const { AZStd::vector tokens = TokenizeId(propertySetId); return FindPropertySet(tokens, m_propertyLayout.m_propertySets); } - //MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::FindProperty(AZStd::array_view parsedPropertyId, PropertySet& inPropertySet) - //{ - // if (parsedPropertyId.size() == 1) - // { - // for (AZStd::unique_ptr& property : inPropertySet.m_properties) - // { - // if (property->m_name == parsedPropertyId[0]) - // { - // return property.get(); - // } - // } - // } - - // return FindProperty(parsedPropertyId, inPropertySet.m_propertySets); - //} - - //const MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::FindProperty(AZStd::array_view parsedPropertyId, const PropertySet& inPropertySet) const - //{ - // MaterialTypeSourceData* nonConstThis = const_cast(this); - // PropertySet& nonConstPropertySet = *const_cast(&inPropertySet); - // return const_cast(nonConstThis->FindProperty(parsedPropertyId, nonConstPropertySet)); - //} - const MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::FindProperty( AZStd::array_view parsedPropertyId, AZStd::array_view> inPropertySetList) const @@ -364,11 +298,6 @@ namespace AZ return nullptr; } - //MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::FindProperty(AZStd::array_view parsedPropertyId, AZStd::array_view> inPropertySetList) - //{ - // return const_cast(const_cast(this)->FindProperty(parsedPropertyId, inPropertySetList)); - //} - const MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::FindProperty(AZStd::string_view propertyId) const { AZStd::vector tokens = TokenizeId(propertyId);