mTargetPropertyIndex( targetPropertyIndex ),
mTargetProxy( NULL ),
mSceneGraphConstraint( NULL ),
+ mCustomWeight( NULL ),
mOffstageWeight( Dali::ActiveConstraint::DEFAULT_WEIGHT ),
mRemoveTime( 0.0f ),
mAlphaFunction( Dali::Constraint::DEFAULT_ALPHA_FUNCTION ),
mRemoveAction( Dali::Constraint::DEFAULT_REMOVE_ACTION ),
+ mTag(0),
mApplyAnimation(),
mRemoveAnimation()
{
}
}
-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<float>* sceneProperty = dynamic_cast< const SceneGraph::AnimatableProperty<float>* >( base );
+
+ if( sceneProperty )
+ {
+ mCustomWeight = sceneProperty;
+
+ OnCustomWeightSet( weightObject );
+ }
+}
+
+void ActiveConstraintBase::FirstApply( ProxyObject& parent, TimePeriod applyTime )
{
// Notify derived classes
OnFirstApply( parent );
return mRemoveAction;
}
+void ActiveConstraintBase::SetTag(const unsigned int tag)
+{
+ mTag = tag;
+}
+
+unsigned int ActiveConstraintBase::GetTag() const
+{
+ return mTag;
+}
+
+
bool ActiveConstraintBase::IsSceneObjectRemovable() const
{
return true; // The constraint removed when target SceneGraph::PropertyOwner is destroyed