From 5c118146fec953309b897e2f560f44a3b2ea5b0f Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 30 Nov 2016 19:21:54 +0000 Subject: [PATCH] Enabling animation of Renderer properties when offstage 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 --- dali/internal/event/rendering/renderer-impl.cpp | 28 ++++++++++--------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/dali/internal/event/rendering/renderer-impl.cpp b/dali/internal/event/rendering/renderer-impl.cpp index a27c511..379c68e 100644 --- a/dali/internal/event/rendering/renderer-impl.cpp +++ b/dali/internal/event/rendering/renderer-impl.cpp @@ -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( baseProperty ); - } + const SceneGraph::PropertyBase* baseProperty = + RENDERER_IMPL.GetRegisteredSceneGraphProperty( this, + &Renderer::FindAnimatableProperty, + &Renderer::FindCustomProperty, + index ); + property = static_cast( baseProperty ); return property; } -- 2.7.4