X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fanimation%2Factive-constraint-base.cpp;h=ca99221eb2ca213616a6cfb1afb43078e522a2d1;hb=f9ecc941e7e4ec9b6589a57a138f6940ac6967f6;hp=7f29377509437a77c4c4093c771bab5c654ee410;hpb=976e145aa7066b74195e82d548340580582433ec;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/animation/active-constraint-base.cpp b/dali/internal/event/animation/active-constraint-base.cpp index 7f29377..ca99221 100644 --- a/dali/internal/event/animation/active-constraint-base.cpp +++ b/dali/internal/event/animation/active-constraint-base.cpp @@ -78,6 +78,7 @@ ActiveConstraintBase::ActiveConstraintBase( EventToUpdate& eventToUpdate, Proper mTargetPropertyIndex( targetPropertyIndex ), mTargetProxy( NULL ), mSceneGraphConstraint( NULL ), + mCustomWeight( NULL ), mOffstageWeight( Dali::ActiveConstraint::DEFAULT_WEIGHT ), mRemoveTime( 0.0f ), mAlphaFunction( Dali::Constraint::DEFAULT_ALPHA_FUNCTION ), @@ -103,7 +104,20 @@ ActiveConstraintBase::~ActiveConstraintBase() } } -void ActiveConstraintBase::FirstApply( ProxyObject& parent, TimePeriod applyTime, ActiveConstraintCallbackType* callback ) +void ActiveConstraintBase::SetCustomWeightObject( ProxyObject& weightObject, Property::Index weightIndex ) +{ + const SceneGraph::PropertyBase* base = weightObject.GetSceneObjectAnimatableProperty( weightIndex ); + const SceneGraph::AnimatableProperty* sceneProperty = dynamic_cast< const SceneGraph::AnimatableProperty* >( base ); + + if( sceneProperty ) + { + mCustomWeight = sceneProperty; + + OnCustomWeightSet( weightObject ); + } +} + +void ActiveConstraintBase::FirstApply( ProxyObject& parent, TimePeriod applyTime ) { // Notify derived classes OnFirstApply( parent );