[Tizen] Update Scene3D demo after Scene3D Loader API change + Fix Layer behavior 08/287808/1 accepted/tizen/7.0/unified/20230213.171736
authorRichard <r.huang@samsung.com>
Thu, 24 Nov 2022 13:56:59 +0000 (13:56 +0000)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 7 Feb 2023 00:47:20 +0000 (09:47 +0900)
Change-Id: I5a08b9055621dfbdf339379d0ac9e236f3bf941b

examples/scene3d-model/scene3d-model-example.cpp
examples/scene3d/scene3d-example.cpp

index bf86b18..e0535a6 100644 (file)
@@ -215,6 +215,7 @@ public:
   void Create(Application& application)
   {
     mWindow = application.GetWindow();
+    mWindow.GetRootLayer().SetProperty(Layer::Property::BEHAVIOR, Layer::LAYER_3D);
 
     mWindow.GetRootLayer().SetProperty(Dali::Layer::Property::BEHAVIOR, Dali::Layer::Behavior::LAYER_3D);
 
index fa5ff00..555143c 100644 (file)
@@ -186,6 +186,7 @@ Actor LoadScene(std::string sceneName, CameraActor camera, std::vector<Animation
 \r
   ResourceBundle                        resources;\r
   SceneDefinition                       scene;\r
+  SceneMetadata                         metaData;\r
   std::vector<AnimationGroupDefinition> animGroups;\r
   std::vector<CameraParameters>         cameraParameters;\r
   std::vector<LightParameters>          lights;\r
@@ -195,6 +196,7 @@ Actor LoadScene(std::string sceneName, CameraActor camera, std::vector<Animation
   LoadResult output{\r
     resources,\r
     scene,\r
+    metaData,\r
     *animations,\r
     animGroups,\r
     cameraParameters,\r
@@ -447,6 +449,8 @@ void Scene3DExample::OnKey(const KeyEvent& e)
         {\r
           KeyboardFocusManager::Get().SetCurrentFocusActor(mActivatedActor);\r
         }\r
+        auto window = mApp.GetWindow();\r
+        window.GetRootLayer().SetProperty(Layer::Property::BEHAVIOR, Layer::LAYER_UI);\r
       }\r
       else\r
       {\r
@@ -485,6 +489,7 @@ void Scene3DExample::OnTap(Dali::Actor actor, const Dali::TapGesture& tap)
   try\r
   {\r
     auto window      = mApp.GetWindow();\r
+    window.GetRootLayer().SetProperty(Layer::Property::BEHAVIOR, Layer::LAYER_3D);\r
     auto renderTasks = window.GetRenderTaskList();\r
     renderTasks.RemoveTask(mSceneRender);\r
 \r