Enabling animation of Renderer properties when offstage 18/101318/2
authorDavid Steele <david.steele@partner.samsung.com>
Wed, 30 Nov 2016 19:21:54 +0000 (19:21 +0000)
committerDavid Steele <david.steele@samsung.com>
Tue, 13 Dec 2016 16:26:15 +0000 (08:26 -0800)
If the renderer exists, but hasn't been staged yet, then the scene
graph object also exists, but cannot be accessed because of a spurious
check for OnStage().

Removing the OnStage check to allow animations to run on Renderers
that haven't 'quite' been staged but are very likely to in the near
future.

Change-Id: I219cca9e08ebb6c7c5b2b8e7f33fd8bbb24b47ae
Signed-off-by: David Steele <david.steele@samsung.com>
dali/internal/event/rendering/renderer-impl.cpp

index a27c511583ba427b8d4ea252564fb3b170cd6a2e..379c68e59b4efab4a086be06ba31d7421aa14574 100644 (file)
@@ -852,14 +852,11 @@ const SceneGraph::PropertyBase* Renderer::GetSceneObjectAnimatableProperty( Prop
   DALI_ASSERT_ALWAYS( IsPropertyAnimatable(index) && "Property is not animatable" );
   const SceneGraph::PropertyBase* property = NULL;
 
-  if( OnStage() )
-  {
-    property = RENDERER_IMPL.GetRegisteredSceneGraphProperty(
-      this,
-      &Renderer::FindAnimatableProperty,
-      &Renderer::FindCustomProperty,
-      index );
-  }
+  property = RENDERER_IMPL.GetRegisteredSceneGraphProperty(
+    this,
+    &Renderer::FindAnimatableProperty,
+    &Renderer::FindCustomProperty,
+    index );
 
   return property;
 }
@@ -868,15 +865,12 @@ const PropertyInputImpl* Renderer::GetSceneObjectInputProperty( Property::Index
 {
   const PropertyInputImpl* property = NULL;
 
-  if( OnStage() )
-  {
-    const SceneGraph::PropertyBase* baseProperty =
-      RENDERER_IMPL.GetRegisteredSceneGraphProperty( this,
-                                                     &Renderer::FindAnimatableProperty,
-                                                     &Renderer::FindCustomProperty,
-                                                     index );
-    property = static_cast<const PropertyInputImpl*>( baseProperty );
-  }
+  const SceneGraph::PropertyBase* baseProperty =
+    RENDERER_IMPL.GetRegisteredSceneGraphProperty( this,
+                                                   &Renderer::FindAnimatableProperty,
+                                                   &Renderer::FindCustomProperty,
+                                                   index );
+  property = static_cast<const PropertyInputImpl*>( baseProperty );
 
   return property;
 }