{
mWindow = application.GetWindow();
+ mWindow.GetRootLayer().SetProperty(Dali::Layer::Property::BEHAVIOR, Dali::Layer::Behavior::LAYER_3D);
+
// Get a handle to the mWindow
mWindow.SetBackgroundColor(Color::WHITE);
mModel.SetImageBasedLightSource(uri_diffuse_texture, uri_specular_texture, 0.6f);
mWindow.Add(mModel);
+
+ mModel.ResourceReadySignal().Connect(this, &Scene3DModelExample::ResourceReadySignal);
+ }
+
+ void ResourceReadySignal(Control control)
+ {
if(mModel.GetAnimationCount() > 0)
{
- Animation animation = (index == 0u) ? mModel.GetAnimation(0u) : mModel.GetAnimation("idleToSquatClip_0");
- animation.Play();
- animation.SetLoopCount(0);
+ mModel.GetAnimation(0u).Play();
+ mModel.GetAnimation(0u).SetLoopCount(0);
}
}
\r
if(!animations->empty())\r
{\r
- auto getActor = [&root](const std::string& name) {\r
- return root.FindChildByName(name);\r
+ auto getActor = [&root](const Scene3D::Loader::AnimatedProperty& property) {\r
+ return root.FindChildByName(property.mNodeName);\r
};\r
\r
animation = (*animations)[0].ReAnimate(getActor);\r
}\r
\r
auto root = mSceneLoader->mScene;\r
- auto getActor = [&root](const std::string& name) {\r
- return root.FindChildByName(name);\r
+ auto getActor = [&root](const Dali::Scene3D::Loader::AnimatedProperty& property) {\r
+ return root.FindChildByName(property.mNodeName);\r
};\r
\r
if(mSceneLoader->mSceneAnimations.size() > animationIndex)\r