From 7da5b032e77536e6a03353b5e9c750ae986aecc0 Mon Sep 17 00:00:00 2001 From: Guthrie Adams Date: Mon, 16 Aug 2021 17:41:51 -0500 Subject: [PATCH] updated test scripts Signed-off-by: Guthrie Adams --- .../Common/Assets/Scripts/material_find_overrides_demo.lua | 6 +++--- .../Assets/Scripts/material_property_overrides_demo.lua | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gems/Atom/Feature/Common/Assets/Scripts/material_find_overrides_demo.lua b/Gems/Atom/Feature/Common/Assets/Scripts/material_find_overrides_demo.lua index dda3974043..41df35e355 100644 --- a/Gems/Atom/Feature/Common/Assets/Scripts/material_find_overrides_demo.lua +++ b/Gems/Atom/Feature/Common/Assets/Scripts/material_find_overrides_demo.lua @@ -66,20 +66,20 @@ function FindMaterialAssignmentTest:OnActivate() end function FindMaterialAssignmentTest:UpdateFactor(assignmentId) - local propertyName = Name("baseColor.factor") + local propertyName = "baseColor.factor" local propertyValue = math.random() MaterialComponentRequestBus.Event.SetPropertyOverride(self.entityId, assignmentId, propertyName, propertyValue); end function FindMaterialAssignmentTest:UpdateColor(assignmentId, color) - local propertyName = Name("baseColor.color") + local propertyName = "baseColor.color" local propertyValue = color MaterialComponentRequestBus.Event.SetPropertyOverride(self.entityId, assignmentId, propertyName, propertyValue); end function FindMaterialAssignmentTest:UpdateTexture(assignmentId) if (#self.Properties.Textures > 0) then - local propertyName = Name("baseColor.textureMap") + local propertyName = "baseColor.textureMap" local textureName = self.Properties.Textures[ math.random( #self.Properties.Textures ) ] Debug.Log(textureName) local textureAssetId = AssetCatalogRequestBus.Broadcast.GetAssetIdByPath(textureName, Uuid(), false) diff --git a/Gems/Atom/Feature/Common/Assets/Scripts/material_property_overrides_demo.lua b/Gems/Atom/Feature/Common/Assets/Scripts/material_property_overrides_demo.lua index 685fd8310b..0495dccbc0 100644 --- a/Gems/Atom/Feature/Common/Assets/Scripts/material_property_overrides_demo.lua +++ b/Gems/Atom/Feature/Common/Assets/Scripts/material_property_overrides_demo.lua @@ -64,20 +64,20 @@ function PropertyOverrideTest:OnActivate() end function PropertyOverrideTest:UpdateFactor(assignmentId) - local propertyName = Name("baseColor.factor") + local propertyName = "baseColor.factor" local propertyValue = math.random() MaterialComponentRequestBus.Event.SetPropertyOverride(self.entityId, assignmentId, propertyName, propertyValue); end function PropertyOverrideTest:UpdateColor(assignmentId, color) - local propertyName = Name("baseColor.color") + local propertyName = "baseColor.color" local propertyValue = color MaterialComponentRequestBus.Event.SetPropertyOverride(self.entityId, assignmentId, propertyName, propertyValue); end function PropertyOverrideTest:UpdateTexture(assignmentId) if (#self.Properties.Textures > 0) then - local propertyName = Name("baseColor.textureMap") + local propertyName = "baseColor.textureMap" local textureName = self.Properties.Textures[ math.random( #self.Properties.Textures ) ] Debug.Log(textureName) local textureAssetId = AssetCatalogRequestBus.Broadcast.GetAssetIdByPath(textureName, Uuid(), false)