[Tizen] Use Renderer to register skinning property 40/292240/1
authorseungho baek <sbsh.baek@samsung.com>
Tue, 2 May 2023 05:55:13 +0000 (14:55 +0900)
committerseungho baek <sbsh.baek@samsung.com>
Tue, 2 May 2023 05:55:13 +0000 (14:55 +0900)
Change-Id: If4f9e0d9b4fb454e02666694ea24ec8fd31c8482
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
dali-scene3d/internal/model-components/model-node-impl.cpp

index 257cbd0..51cfd76 100644 (file)
@@ -319,25 +319,19 @@ void ModelNode::UpdateBoneMatrix(Scene3D::ModelPrimitive primitive)
       continue;
     }
 
-    Dali::Shader shader = renderer.GetShader();
-    if(!shader)
-    {
-      continue;
-    }
-
     if(boneData.constraint)
     {
       boneData.constraint.Remove();
       boneData.constraint.Reset();
     }
 
-    if(shader.GetPropertyIndex(boneData.propertyName) == Property::INVALID_INDEX)
+    if(renderer.GetPropertyIndex(boneData.propertyName) == Property::INVALID_INDEX)
     {
-      auto propBoneXform = shader.RegisterProperty(boneData.propertyName, Matrix{false});
+      auto propBoneXform = renderer.RegisterProperty(boneData.propertyName, Matrix{false});
 
       Matrix inverseMatrix = boneData.inverseMatrix;
       // Constrain bone matrix to joint transform.
-      boneData.constraint = Constraint::New<Matrix>(shader, propBoneXform, [inverseMatrix](Matrix& output, const PropertyInputContainer& inputs)
+      boneData.constraint = Constraint::New<Matrix>(renderer, propBoneXform, [inverseMatrix](Matrix& output, const PropertyInputContainer& inputs)
                                                     { Matrix::Multiply(output, inverseMatrix, inputs[0]->GetMatrix()); });
 
       Actor joint = Self();