X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-scene-loader%2Fpublic-api%2Fblend-shape-details.cpp;h=110f28cfb94cd503ae587880a0e875cd507e8559;hp=9e7692427a95bb2bff98c0260fa7e790d2e09eef;hb=7875069ceecfd24c2a8cf3a28564f7d115296e93;hpb=c052b6678e2c6d8a65545dbbe4531ea7057c1999 diff --git a/dali-scene-loader/public-api/blend-shape-details.cpp b/dali-scene-loader/public-api/blend-shape-details.cpp index 9e76924..110f28c 100644 --- a/dali-scene-loader/public-api/blend-shape-details.cpp +++ b/dali-scene-loader/public-api/blend-shape-details.cpp @@ -1,6 +1,6 @@ /* -* Copyright (c) 2021 Samsung Electronics Co., Ltd. +* Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,14 +17,14 @@ */ // FILE HEADER -#include "dali-scene-loader/public-api/blend-shape-details.h" +#include // EXTERNAL INCLUDES -#include "dali/public-api/animation/constraints.h" -#include "dali/public-api/object/property.h" +#include +#include // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/resource-bundle.h" +#include namespace Dali { @@ -52,7 +52,7 @@ void BlendShapes::ConfigureProperties(const std::pair(index))); - shader.RegisterProperty(COMPONENT_SIZE, Property::Value(static_cast(mesh.second.blendShapeBufferOffset))); + shader.RegisterProperty(NUMBER_OF_BLEND_SHAPES, Property::Value(static_cast(index))); + shader.RegisterProperty(COMPONENT_SIZE, Property::Value(static_cast(mesh.second.blendShapeBufferOffset))); - // Create a read only property to preserve the components of the blend shape. - int32_t components = 0x0; - for(auto& bs : mesh.first.mBlendShapes) - { - components |= (bs.deltas.IsDefined() * Component::POSITIONS) | - (bs.normals.IsDefined() * Component::NORMALS) | (bs.tangents.IsDefined() * Component::TANGENTS); + // Create a read only property to preserve the components of the blend shape. + int32_t components = 0x0; + for(auto& bs : mesh.first.mBlendShapes) + { + components |= (bs.deltas.IsDefined() * Component::POSITIONS) | + (bs.normals.IsDefined() * Component::NORMALS) | (bs.tangents.IsDefined() * Component::TANGENTS); + } + shader.RegisterProperty(COMPONENTS, components, Property::AccessMode::READ_ONLY); } - shader.RegisterProperty(COMPONENTS, components, Property::AccessMode::READ_ONLY); } } // namespace SceneLoader