- Timestamp:
- 10/21/09 17:45:13 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgAnimation/AnimationManagerBase.cpp
r10576 r10656 24 24 { 25 25 _needToLink = false; 26 _automaticLink = true; 26 27 } 27 28 … … 31 32 (*it).get()->reset(); 32 33 } 34 35 void AnimationManagerBase::dirty() 36 { 37 _needToLink = true; 38 } 39 40 void AnimationManagerBase::setAutomaticLink(bool state) { _automaticLink = state; } 41 bool AnimationManagerBase::isAutomaticLink() const { return _automaticLink; } 33 42 34 43 void AnimationManagerBase::operator()(osg::Node* node, osg::NodeVisitor* nv) … … 65 74 } 66 75 _needToLink = true; 76 _automaticLink = b._automaticLink; 67 77 buildTargetReference(); 68 78 } … … 71 81 { 72 82 _targets.clear(); 73 for( AnimationList::iterator iterAnim = _animations.begin(); iterAnim != _animations.end(); ++iterAnim ) 83 for( AnimationList::iterator iterAnim = _animations.begin(); iterAnim != _animations.end(); ++iterAnim ) 74 84 { 75 85 Animation* anim = (*iterAnim).get(); … … 99 109 } 100 110 101 bool AnimationManagerBase::needToLink() const { return _needToLink ; }111 bool AnimationManagerBase::needToLink() const { return _needToLink && isAutomaticLink(); } 102 112 103 113
