/**
* A Vector3 non-animatable property.
*/
-template <int DirtyFlagMask>
class PropertyVector3 : public PropertyInputImpl
{
public:
* @param [in] initialValue The initial value of the property.
*/
PropertyVector3( Vector3 initialValue )
- : mValue( initialValue )
+ : mValue( initialValue ),
+ mDirtyFlag( true )
{
}
}
/**
+ * Clear the dirty flag
+ */
+ void Clear()
+ {
+ mDirtyFlag = false;
+ }
+
+ /**
* @copydoc Dali::Internal::PropertyInputImpl::GetType()
*/
virtual Dali::Property::Type GetType() const
*/
virtual bool InputInitialized() const
{
- return true; // Animatable properties are always valid
+ return true;
}
/**
*/
virtual bool InputChanged() const
{
- return (mDirtyFlags & DirtyFlagMask);
+ return mDirtyFlag;
}
/**
*/
void OnSet()
{
- mDirtyFlags |= DirtyFlagMask;
+ mDirtyFlag = true;
}
private:
private:
- int mDirtyFlags;
+ bool mDirtyFlag;
};
void Node::ResetDefaultProperties( BufferIndex updateBufferIndex )
{
+ // clear dirty flags in parent origin & anchor point
+ mParentOrigin.Clear();
+ mAnchorPoint.Clear();
// Reset default properties
mSize.ResetToBaseValue( updateBufferIndex );
mPosition.ResetToBaseValue( updateBufferIndex );
public: // Default properties
- PropertyVector3<TransformFlag> mParentOrigin; ///< Local transform; the position is relative to this. Sets the TransformFlag dirty when changed
- PropertyVector3<TransformFlag> mAnchorPoint; ///< Local transform; local center of rotation. Sets the TransformFlag dirty when changed
+ PropertyVector3 mParentOrigin; ///< Local transform; the position is relative to this. Sets the TransformFlag dirty when changed
+ PropertyVector3 mAnchorPoint; ///< Local transform; local center of rotation. Sets the TransformFlag dirty when changed
AnimatableProperty<Vector3> mSize; ///< Size is provided for layouting
AnimatableProperty<Vector3> mPosition; ///< Local transform; distance between parent-origin & anchor-point