diff --git a/Gems/Atom/Feature/Common/Assets/Materials/ReflectionProbe/ReflectionProbeVisualization.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/ReflectionProbe/ReflectionProbeVisualization.materialtype index 9a2edc9fca..17209771e5 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/ReflectionProbe/ReflectionProbeVisualization.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/ReflectionProbe/ReflectionProbeVisualization.materialtype @@ -5,7 +5,7 @@ "properties": { "general": [ { - "id": "texcoord", + "name": "texcoord", "displayName": "Texture Coordinate Stream", "description": "Which UV channel to use when sampling textures.", "type": "Int", @@ -14,75 +14,75 @@ "max": 8 }, { - "id": "enableShadows", + "name": "enableShadows", "displayName": "Enable Shadows", "description": "Whether to use the shadow maps.", "type": "Bool", "defaultValue": false, "connection": { "type": "ShaderOption", - "id": "o_enableShadows" + "name": "o_enableShadows" } }, { - "id": "enableDirectionalLights", + "name": "enableDirectionalLights", "displayName": "Enable Directional Lights", "description": "Whether to use directional lights.", "type": "Bool", "defaultValue": false, "connection": { "type": "ShaderOption", - "id": "o_enableDirectionalLights" + "name": "o_enableDirectionalLights" } }, { - "id": "enablePunctualLights", + "name": "enablePunctualLights", "displayName": "Enable Punctual Lights", "description": "Whether to use punctual lights.", "type": "Bool", "defaultValue": false, "connection": { "type": "ShaderOption", - "id": "o_enablePunctualLights" + "name": "o_enablePunctualLights" } }, { - "id": "enableAreaLights", + "name": "enableAreaLights", "displayName": "Enable Area Lights", "description": "Whether to use area lights.", "type": "Bool", "defaultValue": false, "connection": { "type": "ShaderOption", - "id": "o_enableAreaLights" + "name": "o_enableAreaLights" } }, { - "id": "enableIBL", + "name": "enableIBL", "displayName": "Enable IBL", "description": "Whether to use Image Based Lighting (IBL).", "type": "Bool", "defaultValue": true, "connection": { "type": "ShaderOption", - "id": "o_enableIBL" + "name": "o_enableIBL" } } ], "baseColor": [ { - "id": "color", + "name": "color", "displayName": "Color", "description": "Color is displayed as sRGB but the values are stored as linear color.", "type": "Color", "defaultValue": [ 1.0, 1.0, 1.0 ], "connection": { "type": "ShaderInput", - "id": "m_baseColor" + "name": "m_baseColor" } }, { - "id": "factor", + "name": "factor", "displayName": "Factor", "description": "Strength factor for scaling the base color values. Zero (0.0) is black, white (1.0) is full color.", "type": "Float", @@ -91,31 +91,31 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_baseColorFactor" + "name": "m_baseColorFactor" } }, { - "id": "useTexture", + "name": "useTexture", "displayName": "Use Texture", "description": "Whether to use the texture map.", "type": "Bool", "defaultValue": true }, { - "id": "textureMap", + "name": "textureMap", "displayName": "Texture Map", "description": "Base color texture map", "type": "Image", "defaultValue": "Textures/Default/default_basecolor.tif", "connection": { "type": "ShaderInput", - "id": "m_baseColorMap" + "name": "m_baseColorMap" } } ], "metallic": [ { - "id": "factor", + "name": "factor", "displayName": "Factor", "description": "This value is linear, black is non-metal and white means raw metal.", "type": "Float", @@ -124,30 +124,30 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_metallicFactor" + "name": "m_metallicFactor" } }, { - "id": "useTexture", + "name": "useTexture", "displayName": "Use Texture", "description": "Whether to use the texture map, or just default to the Factor value.", "type": "Bool", "defaultValue": true }, { - "id": "textureMap", + "name": "textureMap", "displayName": "Texture Map", "description": "", "type": "Image", "connection": { "type": "ShaderInput", - "id": "m_metallicMap" + "name": "m_metallicMap" } } ], "roughness": [ { - "id": "factor", + "name": "factor", "displayName": "Factor", "description": "Strength factor for scaling the values", "type": "Float", @@ -156,31 +156,31 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_roughnessFactor" + "name": "m_roughnessFactor" } }, { - "id": "useTexture", + "name": "useTexture", "displayName": "Use Texture", "description": "Whether to use the texture map, or just default to the Factor value.", "type": "Bool", "defaultValue": true }, { - "id": "textureMap", + "name": "textureMap", "displayName": "Texture Map", "description": "Texture map for defining surface roughness.", "type": "Image", "defaultValue": "Textures/Default/default_roughness.tif", "connection": { "type": "ShaderInput", - "id": "m_roughnessMap" + "name": "m_roughnessMap" } } ], "specularF0": [ { - "id": "factor", + "name": "factor", "displayName": "Factor", "description": "The default IOR is 1.5, which gives you 0.04 (4% of light reflected at 0 degree angle for dielectric materials). F0 values lie in the range 0-0.08, so that is why the default F0 slider is set on 0.5.", "type": "Float", @@ -189,51 +189,51 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_specularF0Factor" + "name": "m_specularF0Factor" } }, { - "id": "useTexture", + "name": "useTexture", "displayName": "Use Texture", "description": "Whether to use the texture map, or just default to the Factor value.", "type": "Bool", "defaultValue": true }, { - "id": "textureMap", + "name": "textureMap", "displayName": "Texture Map", "description": "Texture map for defining surface reflectance.", "type": "Image", "connection": { "type": "ShaderInput", - "id": "m_specularF0Map" + "name": "m_specularF0Map" } }, { - "id": "applySpecularAA", + "name": "applySpecularAA", "displayName": "Apply Specular AA", "description": "Whether to apply specular anti-aliasing in the shader.", "type": "Bool", "defaultValue": true, "connection": { "type": "ShaderOption", - "id": "o_applySpecularAA" + "name": "o_applySpecularAA" } }, { - "id": "enableMultiScatterCompensation", + "name": "enableMultiScatterCompensation", "displayName": "Multiscattering Compensation", "description": "Whether to enable multiple scattering compensation.", "type": "Bool", "connection": { "type": "ShaderOption", - "id": "o_specularF0_enableMultiScatterCompensation" + "name": "o_specularF0_enableMultiScatterCompensation" } } ], "normal": [ { - "id": "factor", + "name": "factor", "displayName": "Factor", "description": "Strength factor for scaling the values", "type": "Float", @@ -243,85 +243,85 @@ "max": 2.0, "connection": { "type": "ShaderInput", - "id": "m_normalFactor" + "name": "m_normalFactor" } }, { - "id": "useTexture", + "name": "useTexture", "displayName": "Use Texture", "description": "Whether to use the texture map, or just rely on vertex normals.", "type": "Bool", "defaultValue": true }, { - "id": "textureMap", + "name": "textureMap", "displayName": "Texture Map", "description": "Texture map for defining surface normal direction.", "type": "Image", "defaultValue": "Textures/Default/default_normal.tif", "connection": { "type": "ShaderInput", - "id": "m_normalMap" + "name": "m_normalMap" } }, { - "id": "flipX", + "name": "flipX", "displayName": "Flip X Channel", "description": "Flip tangent direction for this normal map.", "type": "Bool", "defaultValue": false, "connection": { "type": "ShaderInput", - "id": "m_flipNormalX" + "name": "m_flipNormalX" } }, { - "id": "flipY", + "name": "flipY", "displayName": "Flip Y Channel", "description": "Flip bitangent direction for this normal map.", "type": "Bool", "defaultValue": false, "connection": { "type": "ShaderInput", - "id": "m_flipNormalY" + "name": "m_flipNormalY" } } ], "opacity": [ { - "id": "mode", + "name": "mode", "displayName": "Opacity Mode", "description": "Opacity mode for this texture. 0: Opaque, 1: Cutout, 2:Blended", "type": "Uint", "defaultValue": 0, "connection": { "type": "ShaderOption", - "id": "o_opacity_mode" + "name": "o_opacity_mode" } }, { - "id": "alphaSource", + "name": "alphaSource", "displayName": "Alpha Source", "description": "Source texture of alpha value. 0:Packed, 1:Split, 2:None", "type": "Uint", "defaultValue": 0, "connection": { "type": "ShaderOption", - "id": "o_opacity_source" + "name": "o_opacity_source" } }, { - "id": "textureMap", + "name": "textureMap", "displayName": "Texture Map", "description": "Texture map for defining surface opacity.", "type": "Image", "connection": { "type": "ShaderInput", - "id": "m_opacityMap" + "name": "m_opacityMap" } }, { - "id": "factor", + "name": "factor", "displayName": "Factor", "description": "Factor for cutout threshold and blending", "type": "Float", @@ -330,11 +330,11 @@ "defaultValue": 0.5, "connection": { "type": "ShaderInput", - "id": "m_opacityFactor" + "name": "m_opacityFactor" } }, { - "id": "doubleSided", + "name": "doubleSided", "displayName": "Double-sided", "description": "Whether to render back-faces or just front-faces.", "type": "Bool" @@ -342,14 +342,14 @@ ], "uv": [ { - "id": "center", + "name": "center", "displayName": "Center", "description": "Center point for scaling and rotation transformations.", "type": "vector2", "defaultValue": [0.0, 0.0] }, { - "id": "tileU", + "name": "tileU", "displayName": "Tile U", "description": "Scales texture coordinates in V.", "type": "float", @@ -357,7 +357,7 @@ "step": 0.1 }, { - "id": "tileV", + "name": "tileV", "displayName": "Tile V", "description": "Scales texture coordinates in V.", "type": "float", @@ -365,7 +365,7 @@ "step": 0.1 }, { - "id": "offsetU", + "name": "offsetU", "displayName": "Offset U", "description": "Offsets texture coordinates in the U direction.", "type": "float", @@ -374,7 +374,7 @@ "max": 1.0 }, { - "id": "offsetV", + "name": "offsetV", "displayName": "Offset V", "description": "Offsets texture coordinates in the V direction.", "type": "float", @@ -383,7 +383,7 @@ "max": 1.0 }, { - "id": "rotateDegrees", + "name": "rotateDegrees", "displayName": "Rotate", "description": "Rotates the texture coordinates (degrees).", "type": "float", @@ -393,7 +393,7 @@ "step": 1.0 }, { - "id": "scale", + "name": "scale", "displayName": "Scale", "description": "Scales texture coordinates in both U and V.", "type": "float", @@ -403,29 +403,29 @@ ], "emissive": [ { - "id": "enable", + "name": "enable", "displayName": "Enable", "description": "Enable the emissive group", "type":"Bool", "defaultValue": false, "connection": { "type": "ShaderOption", - "id": "o_emissiveEnabled" + "name": "o_emissiveEnabled" } }, { - "id": "color", + "name": "color", "displayName": "Color", "description": "Color is displayed as sRGB but the values are stored as linear color.", "type": "Color", "defaultValue": [ 1.0, 1.0, 1.0 ], "connection": { "type": "ShaderInput", - "id": "m_emissiveColor" + "name": "m_emissiveColor" } }, { - "id": "intensity", + "name": "intensity", "displayName": "Intensity", "description": "The amount of energy emitted, in EV100 unit", "type": "Float", @@ -434,33 +434,33 @@ "max": 5 }, { - "id": "useTexture", + "name": "useTexture", "displayName": "Use Texture", "description": "Whether to use the texture map.", "type": "Bool", "defaultValue": false }, { - "id": "textureMap", + "name": "textureMap", "displayName": "Texture Map", "description": "Texture map for defining emissive area.", "type": "Image", "connection": { "type": "ShaderInput", - "id": "m_emissiveMap" + "name": "m_emissiveMap" } } ], "parallax": [ { - "id": "enable", + "name": "enable", "displayName": "Enable", "description": "Whether to enable the parallax feature.", "type": "Bool", "defaultValue": false }, { - "id": "factor", + "name": "factor", "displayName": "Factor", "description": "Strength factor for scaling the depth values", "type": "Float", @@ -469,39 +469,39 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_heightmapScale" + "name": "m_heightmapScale" } }, { - "id": "textureMap", + "name": "textureMap", "displayName": "Texture Map", "description": "Depthmap to create parallax effect.", "type": "Image", "connection": { "type": "ShaderInput", - "id": "m_heightmap" + "name": "m_heightmap" } }, { - "id": "algorithm", + "name": "algorithm", "displayName": "Algorithm", "description": "Select the algorithm to use for parallax mapping. 0: Basic, 1:Steep, 2:POM, 3:Relief, 4:Contact refinement", "type": "Uint", "defaultValue": 0, "connection":{ "type": "ShaderOption", - "id": "o_parallax_algorithm" + "name": "o_parallax_algorithm" } }, { - "id": "quality", + "name": "quality", "displayName": "Quality", "description": "Quality of parallax mapping. 0:Low, 1:Medium, 2:High, 3:Ultra", "type": "Uint", "defaultValue": 0, "connection":{ "type": "ShaderOption", - "id": "o_parallax_quality" + "name": "o_parallax_quality" } } ] diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Special/ShadowCatcher.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Special/ShadowCatcher.materialtype index 59b7af8439..74246f85db 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Special/ShadowCatcher.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Special/ShadowCatcher.materialtype @@ -5,7 +5,7 @@ "properties": { "settings": [ { - "id": "opacity", + "name": "opacity", "displayName": "Opacity", "description": "Opacity of the shadow effect.", "type": "Float", @@ -14,17 +14,17 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_opacity" + "name": "m_opacity" } }, { - "id": "shadeAll", + "name": "shadeAll", "displayName": "Shade All", "description": "Shades the entire geometry with the shadow color, not just what's in shadow. For debugging.", "type": "Bool", "connection": { "type": "ShaderOption", - "id": "o_shadeAll" + "name": "o_shadeAll" } } ] diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp index 5ddeb08ef8..1c13a5f133 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp @@ -46,7 +46,7 @@ namespace AZ { AssetBuilderSDK::AssetBuilderDesc materialBuilderDescriptor; materialBuilderDescriptor.m_name = JobKey; - materialBuilderDescriptor.m_version = 107; // ATOM-14918 + materialBuilderDescriptor.m_version = 108; // ATOM-5041 materialBuilderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern("*.material", AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); materialBuilderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern("*.materialtype", AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); materialBuilderDescriptor.m_busId = azrtti_typeid(); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertySerializer.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertySerializer.cpp index 578e69e5ca..b8b55a9fd5 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertySerializer.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertySerializer.cpp @@ -27,7 +27,6 @@ namespace AZ { namespace Field { - static constexpr const char id[] = "id"; // legacy field, replaced by "name" static constexpr const char name[] = "name"; static constexpr const char displayName[] = "displayName"; static constexpr const char description[] = "description"; @@ -47,7 +46,6 @@ namespace AZ static const AZStd::string_view AcceptedFields[] = { - Field::id, Field::name, Field::displayName, Field::description, @@ -220,10 +218,7 @@ namespace AZ } } - // Field::id is the legacy field, replaced by Field::name. If both are present, Field::name will take priority. - result.Combine(ContinueLoadingFromJsonObjectField(&property->m_name, azrtti_typeid(), inputValue, Field::id, context)); result.Combine(ContinueLoadingFromJsonObjectField(&property->m_name, azrtti_typeid(), inputValue, Field::name, context)); - result.Combine(ContinueLoadingFromJsonObjectField(&property->m_displayName, azrtti_typeid(), inputValue, Field::displayName, context)); result.Combine(ContinueLoadingFromJsonObjectField(&property->m_description, azrtti_typeid(), inputValue, Field::description, context)); result.Combine(ContinueLoadingFromJsonObjectField(&property->m_dataType, azrtti_typeid(), inputValue, Field::type, context)); 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 1a6c7868a3..a13a8df16e 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp @@ -50,9 +50,8 @@ namespace AZ else if (auto* serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(1) + ->Version(2) ->Field("type", &PropertyConnection::m_type) - ->Field("id", &PropertyConnection::m_fieldName) // The old reflection, replaced by "name" ->Field("name", &PropertyConnection::m_fieldName) ->Field("shaderIndex", &PropertyConnection::m_shaderIndex) ; @@ -60,8 +59,7 @@ namespace AZ serializeContext->RegisterGenericType(); serializeContext->Class() - ->Version(1) - ->Field("id", &GroupDefinition::m_name) // The old reflection, replaced by "name" + ->Version(2) ->Field("name", &GroupDefinition::m_name) ->Field("displayName", &GroupDefinition::m_displayName) ->Field("description", &GroupDefinition::m_description) diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertySerializerTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertySerializerTests.cpp index ce842d385d..5705c3416a 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertySerializerTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialPropertySerializerTests.cpp @@ -46,7 +46,7 @@ namespace JsonSerializationTests AZStd::shared_ptr CreatePartialDefaultInstance() override { auto result = AZStd::make_shared(); - result->m_nameId = "testProperty"; + result->m_name = "testProperty"; result->m_dataType = AZ::RPI::MaterialPropertyDataType::Float; result->m_step = 1.0f; result->m_value = 0.0f; @@ -57,7 +57,7 @@ namespace JsonSerializationTests { return R"( { - "id": "testProperty", + "name": "testProperty", "type": "Float", "step": 1.0 })"; @@ -66,7 +66,7 @@ namespace JsonSerializationTests AZStd::shared_ptr CreateFullySetInstance() override { auto result = AZStd::make_shared(); - result->m_nameId = "testProperty"; + result->m_name = "testProperty"; result->m_description = "description"; result->m_displayName = "display_name"; result->m_dataType = AZ::RPI::MaterialPropertyDataType::Float; @@ -87,7 +87,7 @@ namespace JsonSerializationTests { return R"( { - "id": "testProperty", + "name": "testProperty", "displayName": "display_name", "description": "description", "type": "Float", @@ -101,7 +101,7 @@ namespace JsonSerializationTests "connection": { "type": "ShaderOption", - "id": "o_foo", + "name": "o_foo", "shaderIndex": 2 }, "enumIsUv": true @@ -135,7 +135,7 @@ namespace JsonSerializationTests const AZ::RPI::MaterialTypeSourceData::PropertyDefinition& lhs, const AZ::RPI::MaterialTypeSourceData::PropertyDefinition& rhs) override { - if (lhs.m_nameId != rhs.m_nameId) { return false; } + if (lhs.m_name != rhs.m_name) { return false; } if (lhs.m_description != rhs.m_description) { return false; } if (lhs.m_displayName != rhs.m_displayName) { return false; } if (lhs.m_dataType != rhs.m_dataType) { return false; } @@ -153,7 +153,7 @@ namespace JsonSerializationTests auto& leftConnection = lhs.m_outputConnections[i]; auto& rightConnection = rhs.m_outputConnections[i]; if (leftConnection.m_type != rightConnection.m_type) { return false; } - if (leftConnection.m_nameId != rightConnection.m_nameId) { return false; } + if (leftConnection.m_fieldName != rightConnection.m_fieldName) { return false; } if (leftConnection.m_shaderIndex != rightConnection.m_shaderIndex) { return false; } } return true; @@ -202,7 +202,7 @@ namespace UnitTest { const AZStd::string inputJson = R"( { - "id": "testProperty", + "name": "testProperty", "displayName": "Test Property", "description": "This is a property description", "type": "Float" @@ -216,12 +216,12 @@ namespace UnitTest EXPECT_EQ(AZ::JsonSerializationResult::Processing::Completed, loadResult.m_jsonResultCode.GetProcessing()); EXPECT_EQ(AZ::JsonSerializationResult::Outcomes::PartialDefaults, loadResult.m_jsonResultCode.GetOutcome()); - EXPECT_EQ("testProperty", propertyData.m_nameId); + EXPECT_EQ("testProperty", propertyData.m_name); EXPECT_EQ("Test Property", propertyData.m_displayName); EXPECT_EQ("This is a property description", propertyData.m_description); EXPECT_EQ(MaterialPropertyDataType::Float, propertyData.m_dataType); - EXPECT_TRUE(loadResult.ContainsMessage("/id", "Success")); + EXPECT_TRUE(loadResult.ContainsMessage("/name", "Success")); EXPECT_TRUE(loadResult.ContainsMessage("/displayName", "Success")); EXPECT_TRUE(loadResult.ContainsMessage("/description", "Success")); EXPECT_TRUE(loadResult.ContainsMessage("/type", "Success")); @@ -237,7 +237,7 @@ namespace UnitTest // Note we are keeping id and type because they are required fields const AZStd::string inputJson = R"( { - "id": "testProperty", + "name": "testProperty", "type": "Float" } )"; @@ -252,7 +252,7 @@ namespace UnitTest EXPECT_TRUE(propertyData.m_displayName.empty()); EXPECT_TRUE(propertyData.m_description.empty()); - EXPECT_TRUE(loadResult.ContainsMessage("/id", "Success")); + EXPECT_TRUE(loadResult.ContainsMessage("/name", "Success")); EXPECT_TRUE(loadResult.ContainsMessage("/type", "Success")); EXPECT_FALSE(loadResult.ContainsOutcome(JsonSerializationResult::Outcomes::Skipped)); @@ -280,7 +280,7 @@ namespace UnitTest { const AZStd::string inputJson = R"( { - "id": "testProperty", + "name": "testProperty", "type": "foo" } )"; @@ -294,7 +294,7 @@ namespace UnitTest EXPECT_EQ(AZ::RPI::MaterialPropertyDataType::Invalid, propertyData.m_dataType); - EXPECT_TRUE(loadResult.ContainsMessage("/id", "Success")); + EXPECT_TRUE(loadResult.ContainsMessage("/name", "Success")); EXPECT_TRUE(loadResult.ContainsMessage("/type", "Enum value could not read")); } @@ -303,7 +303,7 @@ namespace UnitTest const AZStd::string inputJson = R"( [ { - "id": "testProperty1", + "name": "testProperty1", "type": "Float", "defaultValue": 0.5, "min": 0.1, @@ -313,7 +313,7 @@ namespace UnitTest "step": 0.05 }, { - "id": "testProperty2", + "name": "testProperty2", "type": "Int", "defaultValue": -1, "min": -5, @@ -323,7 +323,7 @@ namespace UnitTest "step": 1 }, { - "id": "testProperty3", + "name": "testProperty3", "type": "UInt", "defaultValue": 4294901761, "min": 4294901760, @@ -368,7 +368,7 @@ namespace UnitTest for (int i = 0; i < propertyData.size(); ++i) { AZStd::string prefix = AZStd::string::format("/%d", i); - EXPECT_TRUE(loadResult.ContainsMessage(prefix + "/id", "Success")); + EXPECT_TRUE(loadResult.ContainsMessage(prefix + "/name", "Success")); EXPECT_TRUE(loadResult.ContainsMessage(prefix + "/type", "Success")); EXPECT_TRUE(loadResult.ContainsMessage(prefix + "/defaultValue", "Success")); EXPECT_TRUE(loadResult.ContainsMessage(prefix + "/min", "Success")); @@ -388,19 +388,19 @@ namespace UnitTest const AZStd::string inputJson = R"( [ { - "id": "testProperty1", + "name": "testProperty1", "displayName": "Test Property 1", "description": "Test", "type": "Float" }, { - "id": "testProperty2", + "name": "testProperty2", "displayName": "Test Property 2", "description": "Test", "type": "Int" }, { - "id": "testProperty3", + "name": "testProperty3", "displayName": "Test Property 3", "description": "Test", "type": "UInt" @@ -443,13 +443,13 @@ namespace UnitTest const AZStd::string inputJson = R"( [ { - "id": "testProperty1", + "name": "testProperty1", "type": "Vector2", "vectorLabels": ["U", "V"], "defaultValue": [0.6, 0.5] }, { - "id": "testProperty2", + "name": "testProperty2", "type": "Vector4", "vectorLabels": ["A", "B", "C", "D"], "defaultValue": [0.3, 0.4, 0.5, 0.6] @@ -485,21 +485,21 @@ namespace UnitTest const AZStd::string inputJson = R"( [ { - "id": "visibilityIsDefault", + "name": "visibilityIsDefault", "type": "Float" }, { - "id": "visibilityIsEditable", + "name": "visibilityIsEditable", "type": "Float", "visibility": "Enabled" }, { - "id": "visibilityIsDisabled", + "name": "visibilityIsDisabled", "type": "Float", "visibility": "Disabled" }, { - "id": "visibilityIsHidden", + "name": "visibilityIsHidden", "type": "Float", "visibility": "Hidden" } @@ -509,20 +509,20 @@ namespace UnitTest const AZStd::string expectedOutputJson = R"( [ { - "id": "visibilityIsDefault", + "name": "visibilityIsDefault", "type": "Float" }, { - "id": "visibilityIsEditable", + "name": "visibilityIsEditable", "type": "Float" }, { - "id": "visibilityIsDisabled", + "name": "visibilityIsDisabled", "type": "Float", "visibility": "Disabled" }, { - "id": "visibilityIsHidden", + "name": "visibilityIsHidden", "type": "Float", "visibility": "Hidden" } @@ -552,7 +552,7 @@ namespace UnitTest const AZStd::string inputJson = R"( [ { - "id": "testProperty1", + "name": "testProperty1", "type": "Float", "defaultValue": true, "min": -1, @@ -560,7 +560,7 @@ namespace UnitTest "step": "1" }, { - "id": "testProperty2", + "name": "testProperty2", "type": "Int", "defaultValue": true, "min": -1.5, @@ -568,7 +568,7 @@ namespace UnitTest "step": "1" }, { - "id": "testProperty3", + "name": "testProperty3", "type": "UInt", "defaultValue": "4294963200", "min": true, @@ -610,32 +610,32 @@ namespace UnitTest const AZStd::string inputJson = R"( [ { - "id": "testProperty1", + "name": "testProperty1", "type": "Bool", "defaultValue": true }, { - "id": "testProperty2", + "name": "testProperty2", "type": "Vector2", "defaultValue": [0.1, 0.2] }, { - "id": "testProperty3", + "name": "testProperty3", "type": "Vector3", "defaultValue": [0.3, 0.4, 0.5] }, { - "id": "testProperty4", + "name": "testProperty4", "type": "Vector4", "defaultValue": [0.6, 0.5, 0.8, 0.4] }, { - "id": "testProperty5", + "name": "testProperty5", "type": "Color", "defaultValue": [0.1, 0.2, 0.3] }, { - "id": "testProperty6", + "name": "testProperty6", "type": "Image", "defaultValue": "Default.png" } @@ -669,7 +669,7 @@ namespace UnitTest for (int i = 0; i < propertyData.size(); ++i) { AZStd::string prefix = AZStd::string::format("/%d", i); - EXPECT_TRUE(loadResult.ContainsMessage(prefix + "/id", "Success")); + EXPECT_TRUE(loadResult.ContainsMessage(prefix + "/name", "Success")); EXPECT_TRUE(loadResult.ContainsMessage(prefix + "/type", "Success")); EXPECT_TRUE(loadResult.ContainsMessage(prefix + "/defaultValue", "Success")); } @@ -684,27 +684,27 @@ namespace UnitTest const AZStd::string inputJson = R"( [ { - "id": "testProperty1", + "name": "testProperty1", "type": "Bool" }, { - "id": "testProperty2", + "name": "testProperty2", "type": "Vector2" }, { - "id": "testProperty3", + "name": "testProperty3", "type": "Vector3" }, { - "id": "testProperty4", + "name": "testProperty4", "type": "Vector4" }, { - "id": "testProperty5", + "name": "testProperty5", "type": "Color" }, { - "id": "testProperty6", + "name": "testProperty6", "type": "Image" } ] @@ -745,27 +745,27 @@ namespace UnitTest const AZStd::string inputJson = R"( [ { - "id": "testProperty1", + "name": "testProperty1", "type": "Bool", "defaultValue": 1 }, { - "id": "testProperty2", + "name": "testProperty2", "type": "Vector2", "defaultValue": { "x": 0.4, "y": 0.1 } }, { - "id": "testProperty3", + "name": "testProperty3", "type": "Vector3", "defaultValue": { "x": 0.4, "y": 0.1, "z": 0.5 } }, { - "id": "testProperty4", + "name": "testProperty4", "type": "Vector4", "defaultValue": { "x": 0.4, "y": 0.1, "z": 0.5, "w": 0.6 } }, { - "id": "testProperty5", + "name": "testProperty5", "type": "Color", "defaultValue": { "hex": "FF00FF" } } @@ -800,11 +800,11 @@ namespace UnitTest { const AZStd::string inputJson = R"( { - "id": "testProperty", + "name": "testProperty", "type": "Float", "connection": { "type": "ShaderOption", - "id": "o_foo", + "name": "o_foo", "shaderIndex": 2 } } @@ -818,11 +818,11 @@ namespace UnitTest EXPECT_EQ(1, propertyData.m_outputConnections.size()); EXPECT_EQ(MaterialPropertyOutputType::ShaderOption, propertyData.m_outputConnections[0].m_type); - EXPECT_EQ("o_foo", propertyData.m_outputConnections[0].m_nameId); + EXPECT_EQ("o_foo", propertyData.m_outputConnections[0].m_fieldName); EXPECT_EQ(2, propertyData.m_outputConnections[0].m_shaderIndex); EXPECT_TRUE(loadResult.ContainsMessage("/connection/type", "Success")); - EXPECT_TRUE(loadResult.ContainsMessage("/connection/id", "Success")); + EXPECT_TRUE(loadResult.ContainsMessage("/connection/name", "Success")); EXPECT_TRUE(loadResult.ContainsMessage("/connection/shaderIndex", "Success")); EXPECT_FALSE(loadResult.ContainsOutcome(JsonSerializationResult::Outcomes::Skipped)); @@ -833,17 +833,17 @@ namespace UnitTest { const AZStd::string inputJson = R"( { - "id": "testProperty", + "name": "testProperty", "type": "Float", "connection": [ { "type": "ShaderInput", - "id": "o_foo", + "name": "o_foo", "shaderIndex": 2 }, { "type": "ShaderOption", - "id": "o_bar", + "name": "o_bar", "shaderIndex": 1 } ] @@ -858,18 +858,18 @@ namespace UnitTest EXPECT_EQ(2, propertyData.m_outputConnections.size()); EXPECT_EQ(MaterialPropertyOutputType::ShaderInput, propertyData.m_outputConnections[0].m_type); - EXPECT_EQ("o_foo", propertyData.m_outputConnections[0].m_nameId); + EXPECT_EQ("o_foo", propertyData.m_outputConnections[0].m_fieldName); EXPECT_EQ(2, propertyData.m_outputConnections[0].m_shaderIndex); EXPECT_EQ(MaterialPropertyOutputType::ShaderOption, propertyData.m_outputConnections[1].m_type); - EXPECT_EQ("o_bar", propertyData.m_outputConnections[1].m_nameId); + EXPECT_EQ("o_bar", propertyData.m_outputConnections[1].m_fieldName); EXPECT_EQ(1, propertyData.m_outputConnections[1].m_shaderIndex); EXPECT_TRUE(loadResult.ContainsMessage("/connection/0/type", "Success")); - EXPECT_TRUE(loadResult.ContainsMessage("/connection/0/id", "Success")); + EXPECT_TRUE(loadResult.ContainsMessage("/connection/0/name", "Success")); EXPECT_TRUE(loadResult.ContainsMessage("/connection/0/shaderIndex", "Success")); EXPECT_TRUE(loadResult.ContainsMessage("/connection/1/type", "Success")); - EXPECT_TRUE(loadResult.ContainsMessage("/connection/1/id", "Success")); + EXPECT_TRUE(loadResult.ContainsMessage("/connection/1/name", "Success")); EXPECT_TRUE(loadResult.ContainsMessage("/connection/1/shaderIndex", "Success")); EXPECT_FALSE(loadResult.ContainsOutcome(JsonSerializationResult::Outcomes::Skipped)); @@ -881,12 +881,12 @@ namespace UnitTest // "conection" is misspelled const AZStd::string inputJson = R"( { - "id": "testProperty", + "name": "testProperty", "type": "Float", "conection": [ { "type": "ShaderInput", - "id": "o_foo", + "name": "o_foo", "shaderIndex": 2 } ] @@ -899,7 +899,7 @@ namespace UnitTest EXPECT_EQ(AZ::JsonSerializationResult::Tasks::ReadField, loadResult.m_jsonResultCode.GetTask()); EXPECT_EQ(AZ::JsonSerializationResult::Processing::Completed, loadResult.m_jsonResultCode.GetProcessing()); - EXPECT_EQ(propertyData.m_nameId, "testProperty"); + EXPECT_EQ(propertyData.m_name, "testProperty"); EXPECT_EQ(propertyData.m_dataType, MaterialPropertyDataType::Float); EXPECT_EQ(propertyData.m_outputConnections.size(), 0); @@ -911,13 +911,13 @@ namespace UnitTest // "shadrIndex" is misspelled const AZStd::string inputJson = R"( { - "id": "testProperty", + "name": "testProperty", "type": "Float", "connection": [ { "type": "ShaderInput", "shadrIndex": 2, - "id": "o_foo" + "name": "o_foo" } ] } @@ -929,10 +929,10 @@ namespace UnitTest EXPECT_EQ(AZ::JsonSerializationResult::Tasks::ReadField, loadResult.m_jsonResultCode.GetTask()); EXPECT_EQ(AZ::JsonSerializationResult::Processing::Completed, loadResult.m_jsonResultCode.GetProcessing()); - EXPECT_EQ(propertyData.m_nameId, "testProperty"); + EXPECT_EQ(propertyData.m_name, "testProperty"); EXPECT_EQ(propertyData.m_dataType, MaterialPropertyDataType::Float); EXPECT_EQ(propertyData.m_outputConnections.size(), 1); - EXPECT_EQ(propertyData.m_outputConnections[0].m_nameId, "o_foo"); + EXPECT_EQ(propertyData.m_outputConnections[0].m_fieldName, "o_foo"); EXPECT_EQ(propertyData.m_outputConnections[0].m_type, MaterialPropertyOutputType::ShaderInput); EXPECT_EQ(propertyData.m_outputConnections[0].m_shaderIndex, -1); diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp index 13effd4eaf..dd3b3b2711 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp @@ -205,25 +205,25 @@ namespace UnitTest " \"propertyLayout\": { \n" " \"version\": 1, \n" " \"groups\": [ \n" - " { \"id\": \"groupA\" }, \n" - " { \"id\": \"groupB\" }, \n" - " { \"id\": \"groupC\" } \n" + " { \"name\": \"groupA\" }, \n" + " { \"name\": \"groupB\" }, \n" + " { \"name\": \"groupC\" } \n" " ], \n" " \"properties\": { \n" " \"groupA\": [ \n" - " {\"id\": \"MyBool\", \"type\": \"bool\"}, \n" - " {\"id\": \"MyInt\", \"type\": \"int\"}, \n" - " {\"id\": \"MyUInt\", \"type\": \"uint\"} \n" + " {\"name\": \"MyBool\", \"type\": \"bool\"}, \n" + " {\"name\": \"MyInt\", \"type\": \"int\"}, \n" + " {\"name\": \"MyUInt\", \"type\": \"uint\"} \n" " ], \n" " \"groupB\": [ \n" - " {\"id\": \"MyFloat\", \"type\": \"float\"}, \n" - " {\"id\": \"MyFloat2\", \"type\": \"vector2\"}, \n" - " {\"id\": \"MyFloat3\", \"type\": \"vector3\"} \n" + " {\"name\": \"MyFloat\", \"type\": \"float\"}, \n" + " {\"name\": \"MyFloat2\", \"type\": \"vector2\"}, \n" + " {\"name\": \"MyFloat3\", \"type\": \"vector3\"} \n" " ], \n" " \"groupC\": [ \n" - " {\"id\": \"MyFloat4\", \"type\": \"vector4\"}, \n" - " {\"id\": \"MyColor\", \"type\": \"color\"}, \n" - " {\"id\": \"MyImage\", \"type\": \"image\"} \n" + " {\"name\": \"MyFloat4\", \"type\": \"vector4\"}, \n" + " {\"name\": \"MyColor\", \"type\": \"color\"}, \n" + " {\"name\": \"MyImage\", \"type\": \"image\"} \n" " ] \n" " } \n" " } \n" @@ -271,7 +271,7 @@ namespace UnitTest "properties": { "general": [ { - "id": "testColor", + "name": "testColor", "type": "color" } ] @@ -381,7 +381,7 @@ namespace UnitTest "properties": { "general": [ { - "id": "testColor", + "name": "testColor", "type": "color" } ] @@ -427,7 +427,7 @@ namespace UnitTest "properties": { "general": [ { - "id": "testColor", + "name": "testColor", "type": "color" } ] diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeSourceDataTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeSourceDataTests.cpp index 179dc7c966..c37943f79c 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeSourceDataTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialTypeSourceDataTests.cpp @@ -510,7 +510,7 @@ namespace UnitTest sourceData.m_shaderCollection.push_back(MaterialTypeSourceData::ShaderVariantReferenceData{ TestShaderFilename }); MaterialTypeSourceData::PropertyDefinition propertySource; - propertySource.m_nameId = "MyBool"; + propertySource.m_name = "MyBool"; propertySource.m_displayName = "My Bool"; propertySource.m_description = "This is a bool"; propertySource.m_dataType = MaterialPropertyDataType::Bool; @@ -536,7 +536,7 @@ namespace UnitTest sourceData.m_shaderCollection.push_back(MaterialTypeSourceData::ShaderVariantReferenceData{ TestShaderFilename }); MaterialTypeSourceData::PropertyDefinition propertySource; - propertySource.m_nameId = "MyFloat"; + propertySource.m_name = "MyFloat"; propertySource.m_displayName = "My Float"; propertySource.m_description = "This is a float"; propertySource.m_min = 0.0f; @@ -566,7 +566,7 @@ namespace UnitTest sourceData.m_shaderCollection.push_back(MaterialTypeSourceData::ShaderVariantReferenceData{ TestShaderFilename }); MaterialTypeSourceData::PropertyDefinition propertySource; - propertySource.m_nameId = "MyImage"; + propertySource.m_name = "MyImage"; propertySource.m_displayName = "My Image"; propertySource.m_description = "This is an image"; propertySource.m_dataType = MaterialPropertyDataType::Image; @@ -591,7 +591,7 @@ namespace UnitTest sourceData.m_shaderCollection.push_back(MaterialTypeSourceData::ShaderVariantReferenceData{TestShaderFilename}); MaterialTypeSourceData::PropertyDefinition propertySource; - propertySource.m_nameId = "MyInt"; + propertySource.m_name = "MyInt"; propertySource.m_displayName = "My Integer"; propertySource.m_dataType = MaterialPropertyDataType::Int; propertySource.m_outputConnections.push_back(MaterialTypeSourceData::PropertyConnection{MaterialPropertyOutputType::ShaderOption, AZStd::string("o_foo"), 0}); @@ -614,7 +614,7 @@ namespace UnitTest sourceData.m_shaderCollection.push_back(MaterialTypeSourceData::ShaderVariantReferenceData{TestShaderFilename}); MaterialTypeSourceData::PropertyDefinition propertySource; - propertySource.m_nameId = "MyInt"; + propertySource.m_name = "MyInt"; propertySource.m_dataType = MaterialPropertyDataType::Int; propertySource.m_outputConnections.push_back(MaterialTypeSourceData::PropertyConnection{MaterialPropertyOutputType::ShaderOption, AZStd::string("DoesNotExist"), 0}); sourceData.m_propertyLayout.m_properties["general"].push_back(propertySource); @@ -633,7 +633,7 @@ namespace UnitTest MaterialTypeSourceData::PropertyDefinition propertySource; propertySource.m_dataType = MaterialPropertyDataType::Int; - propertySource.m_nameId = "a"; + propertySource.m_name = "a"; sourceData.m_propertyLayout.m_properties["not a valid name because it has spaces"].push_back(propertySource); // Expected errors: @@ -654,7 +654,7 @@ namespace UnitTest MaterialTypeSourceData::PropertyDefinition propertySource; propertySource.m_dataType = MaterialPropertyDataType::Int; - propertySource.m_nameId = "not a valid name because it has spaces"; + propertySource.m_name = "not a valid name because it has spaces"; sourceData.m_propertyLayout.m_properties["general"].push_back(propertySource); // Expected errors: @@ -674,7 +674,7 @@ namespace UnitTest MaterialTypeSourceData::PropertyDefinition propertySource; propertySource.m_dataType = MaterialPropertyDataType::Int; - propertySource.m_nameId = "a"; + propertySource.m_name = "a"; sourceData.m_propertyLayout.m_properties["general"].push_back(propertySource); sourceData.m_propertyLayout.m_properties["general"].push_back(propertySource); @@ -738,7 +738,7 @@ namespace UnitTest sourceData.m_shaderCollection.push_back(MaterialTypeSourceData::ShaderVariantReferenceData{ "shaderC.shader" }); MaterialTypeSourceData::PropertyDefinition propertySource; - propertySource.m_nameId = "MyInt"; + propertySource.m_name = "MyInt"; propertySource.m_displayName = "Integer"; propertySource.m_description = "Integer property that is connected to multiple shader settings"; propertySource.m_dataType = MaterialPropertyDataType::Int; @@ -797,7 +797,7 @@ namespace UnitTest MaterialTypeSourceData sourceData; MaterialTypeSourceData::PropertyDefinition propertySource; - propertySource.m_nameId = "NonAliasFloat"; + propertySource.m_name = "NonAliasFloat"; propertySource.m_displayName = "Non-Alias Float"; propertySource.m_description = "This float is processed by a functor, not with a direct alias"; propertySource.m_dataType = MaterialPropertyDataType::Float; @@ -842,13 +842,13 @@ namespace UnitTest sourceData.m_shaderCollection.push_back(MaterialTypeSourceData::ShaderVariantReferenceData{TestShaderFilename}); MaterialTypeSourceData::PropertyDefinition propertySource; - propertySource.m_nameId = "EnableSpecialPassA"; + propertySource.m_name = "EnableSpecialPassA"; propertySource.m_displayName = "Enable Special Pass"; propertySource.m_description = "This is a bool to enable an extra shader/pass"; propertySource.m_dataType = MaterialPropertyDataType::Bool; // Note that we don't fill propertySource.m_outputConnections because this is not a direct-connected property sourceData.m_propertyLayout.m_properties["general"].push_back(propertySource); - propertySource.m_nameId = "EnableSpecialPassB"; + propertySource.m_name = "EnableSpecialPassB"; sourceData.m_propertyLayout.m_properties["general"].push_back(propertySource); sourceData.m_materialFunctorSourceData.push_back( @@ -902,7 +902,7 @@ namespace UnitTest sourceData.m_shaderCollection.push_back(MaterialTypeSourceData::ShaderVariantReferenceData{TestShaderFilename}); MaterialTypeSourceData::PropertyDefinition propertySource; - propertySource.m_nameId = "MyProperty"; + propertySource.m_name = "MyProperty"; propertySource.m_dataType = MaterialPropertyDataType::Bool; // Note that we don't fill propertySource.m_outputConnections because this is not a direct-connected property sourceData.m_propertyLayout.m_properties["general"].push_back(propertySource); @@ -938,7 +938,7 @@ namespace UnitTest auto addProperty = [&sourceData](MaterialPropertyDataType dateType, const char* propertyName, const char* srgConstantName, const AZ::RPI::MaterialPropertyValue& value) { MaterialTypeSourceData::PropertyDefinition propertySource; - propertySource.m_nameId = propertyName; + propertySource.m_name = propertyName; propertySource.m_dataType = dateType; propertySource.m_outputConnections.push_back(MaterialTypeSourceData::PropertyConnection{ MaterialPropertyOutputType::ShaderInput, AZStd::string(srgConstantName) }); propertySource.m_value = value; @@ -982,12 +982,12 @@ namespace UnitTest "version": 2, "groups": [ { - "id": "groupA", + "name": "groupA", "displayName": "Property Group A", "description": "Description of property group A" }, { - "id": "groupB", + "name": "groupB", "displayName": "Property Group B", "description": "Description of property group B" } @@ -995,12 +995,12 @@ namespace UnitTest "properties": { "groupA": [ { - "id": "foo", + "name": "foo", "type": "Bool", "defaultValue": true }, { - "id": "bar", + "name": "bar", "type": "Image", "defaultValue": "Default.png", "visibility": "Hidden" @@ -1008,12 +1008,12 @@ namespace UnitTest ], "groupB": [ { - "id": "foo", + "name": "foo", "type": "Float", "defaultValue": 0.5 }, { - "id": "bar", + "name": "bar", "type": "Color", "defaultValue": [0.5, 0.5, 0.5], "visibility": "Disabled" @@ -1075,10 +1075,10 @@ namespace UnitTest EXPECT_EQ(material.m_propertyLayout.m_properties.size(), 2); EXPECT_EQ(material.m_propertyLayout.m_properties["groupA"].size(), 2); EXPECT_EQ(material.m_propertyLayout.m_properties["groupB"].size(), 2); - EXPECT_EQ(material.m_propertyLayout.m_properties["groupA"][0].m_nameId, "foo"); - EXPECT_EQ(material.m_propertyLayout.m_properties["groupA"][1].m_nameId, "bar"); - EXPECT_EQ(material.m_propertyLayout.m_properties["groupB"][0].m_nameId, "foo"); - EXPECT_EQ(material.m_propertyLayout.m_properties["groupB"][1].m_nameId, "bar"); + EXPECT_EQ(material.m_propertyLayout.m_properties["groupA"][0].m_name, "foo"); + EXPECT_EQ(material.m_propertyLayout.m_properties["groupA"][1].m_name, "bar"); + EXPECT_EQ(material.m_propertyLayout.m_properties["groupB"][0].m_name, "foo"); + EXPECT_EQ(material.m_propertyLayout.m_properties["groupB"][1].m_name, "bar"); EXPECT_EQ(material.m_propertyLayout.m_properties["groupA"][0].m_dataType, MaterialPropertyDataType::Bool); EXPECT_EQ(material.m_propertyLayout.m_properties["groupA"][1].m_dataType, MaterialPropertyDataType::Image); EXPECT_EQ(material.m_propertyLayout.m_properties["groupB"][0].m_dataType, MaterialPropertyDataType::Float); @@ -1127,7 +1127,7 @@ namespace UnitTest "version": 2, "groups": [ { - "id": "general", + "name": "general", "displayName": "General", "description": "" } @@ -1135,12 +1135,12 @@ namespace UnitTest "properties": { "general": [ { - "id": "absolute", + "name": "absolute", "type": "Image", "defaultValue": "%s" }, { - "id": "relative", + "name": "relative", "type": "Image", "defaultValue": "%s" } diff --git a/Gems/Atom/TestData/TestData/Materials/Types/AutoBrick.materialtype b/Gems/Atom/TestData/TestData/Materials/Types/AutoBrick.materialtype index 0b62638c5a..00f11663f7 100644 --- a/Gems/Atom/TestData/TestData/Materials/Types/AutoBrick.materialtype +++ b/Gems/Atom/TestData/TestData/Materials/Types/AutoBrick.materialtype @@ -4,12 +4,12 @@ "version": 3, "groups": [ { - "id": "shape", + "name": "shape", "displayName": "Shape", "description": "Properties for configuring size, shape, and position of the bricks." }, { - "id": "appearance", + "name": "appearance", "displayName": "Appearance", "description": "Properties for configuring the appearance of the bricks and grout lines." } @@ -17,7 +17,7 @@ "properties": { "shape": [ { - "id": "brickWidth", + "name": "brickWidth", "displayName": "Brick Width", "description": "The width of each brick.", "type": "Float", @@ -27,11 +27,11 @@ "step": 0.001, "connection": { "type": "ShaderInput", - "id": "m_brickWidth" + "name": "m_brickWidth" } }, { - "id": "brickHeight", + "name": "brickHeight", "displayName": "Brick Height", "description": "The height of each brick.", "type": "Float", @@ -41,11 +41,11 @@ "step": 0.001, "connection": { "type": "ShaderInput", - "id": "m_brickHeight" + "name": "m_brickHeight" } }, { - "id": "brickOffset", + "name": "brickOffset", "displayName": "Offset", "description": "The offset of each stack of bricks as a percentage of brick width.", "type": "Float", @@ -54,11 +54,11 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_brickOffset" + "name": "m_brickOffset" } }, { - "id": "lineWidth", + "name": "lineWidth", "displayName": "Line Width", "description": "The width of the grout lines.", "type": "Float", @@ -68,11 +68,11 @@ "step": 0.0001, "connection": { "type": "ShaderInput", - "id": "m_lineWidth" + "name": "m_lineWidth" } }, { - "id": "lineDepth", + "name": "lineDepth", "displayName": "Line Depth", "description": "The depth of the grout lines.", "type": "Float", @@ -81,34 +81,34 @@ "softMax": 0.02, "connection": { "type": "ShaderInput", - "id": "m_lineDepth" + "name": "m_lineDepth" } } ], "appearance": [ { - "id": "noiseTexture", + "name": "noiseTexture", "type": "Image", "defaultValue": "TestData/Textures/noise512.png", "visibility": "Hidden", "connection": { "type": "ShaderInput", - "id": "m_noise" + "name": "m_noise" } }, { - "id": "brickColor", + "name": "brickColor", "displayName": "Brick Color", "description": "The color of the bricks.", "type": "Color", "defaultValue": [1.0,1.0,1.0], "connection": { "type": "ShaderInput", - "id": "m_brickColor" + "name": "m_brickColor" } }, { - "id": "brickColorNoise", + "name": "brickColorNoise", "displayName": "Brick Color Noise", "description": "Scale the variation of brick color.", "type": "Float", @@ -117,22 +117,22 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_brickNoiseFactor" + "name": "m_brickNoiseFactor" } }, { - "id": "lineColor", + "name": "lineColor", "displayName": "Line Color", "description": "The color of the grout lines.", "type": "Color", "defaultValue": [0.5,0.5,0.5], "connection": { "type": "ShaderInput", - "id": "m_lineColor" + "name": "m_lineColor" } }, { - "id": "lineColorNoise", + "name": "lineColorNoise", "displayName": "Line Color Noise", "description": "Scale the variation of grout line color.", "type": "Float", @@ -141,11 +141,11 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_lineNoiseFactor" + "name": "m_lineNoiseFactor" } }, { - "id": "brickColorBleed", + "name": "brickColorBleed", "displayName": "Brick Color Bleed", "description": "Distance into the grout line that the brick color will continue.", "type": "Float", @@ -154,11 +154,11 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_brickColorBleed" + "name": "m_brickColorBleed" } }, { - "id": "ao", + "name": "ao", "displayName": "Ambient Occlusion", "description": "The strength of baked ambient occlusion in the grout lines.", "type": "Float", @@ -167,7 +167,7 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_aoFactor" + "name": "m_aoFactor" } } ] diff --git a/Gems/Atom/TestData/TestData/Materials/Types/MinimalPBR.materialtype b/Gems/Atom/TestData/TestData/Materials/Types/MinimalPBR.materialtype index fb2b8523e1..81ebd63c28 100644 --- a/Gems/Atom/TestData/TestData/Materials/Types/MinimalPBR.materialtype +++ b/Gems/Atom/TestData/TestData/Materials/Types/MinimalPBR.materialtype @@ -4,24 +4,24 @@ "version": 3, "groups": [ { - "id": "settings", + "name": "settings", "displayName": "Settings" } ], "properties": { "settings": [ { - "id": "color", + "name": "color", "displayName": "Color", "type": "Color", "defaultValue": [ 1.0, 1.0, 1.0 ], "connection": { "type": "ShaderInput", - "id": "m_baseColor" + "name": "m_baseColor" } }, { - "id": "metallic", + "name": "metallic", "displayName": "Metallic", "type": "Float", "defaultValue": 0.0, @@ -29,11 +29,11 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_metallic" + "name": "m_metallic" } }, { - "id": "roughness", + "name": "roughness", "displayName": "Roughness", "type": "Float", "defaultValue": 1.0, @@ -41,7 +41,7 @@ "max": 1.0, "connection": { "type": "ShaderInput", - "id": "m_roughness" + "name": "m_roughness" } } ]