Show
Ignore:
Timestamp:
10/21/09 17:45:13 (5 years ago)
Author:
cedricpinson
Message:

From Cedric Pinson, this commit contains the following change:
* Change ref_ptr to observer_ptr to avoid cross reference and leak in Skinning
* Set invalidate to true to re run the check visitor in Skeleton
* Shallow copy Sampler in channel copy constructor
* Add accessor in VertexInfluence?
* Remove dead code in Timeline.cpp
* Dont force linking in Bone::UpdateBone?, the decision is done by the user or the manager
* Add offset in timeline stats to display each manager on the screen
* Add a flag in animation manager base to enable or not automatic link when modifying the manager

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgAnimation/AnimationManagerBase.cpp

    r10576 r10656  
    2424{ 
    2525    _needToLink = false; 
     26    _automaticLink = true; 
    2627} 
    2728 
     
    3132        (*it).get()->reset(); 
    3233} 
     34 
     35void AnimationManagerBase::dirty() 
     36{ 
     37    _needToLink = true; 
     38} 
     39 
     40void AnimationManagerBase::setAutomaticLink(bool state) { _automaticLink = state; } 
     41bool AnimationManagerBase::isAutomaticLink() const { return _automaticLink; } 
    3342 
    3443void AnimationManagerBase::operator()(osg::Node* node, osg::NodeVisitor* nv) 
     
    6574    } 
    6675    _needToLink = true; 
     76    _automaticLink = b._automaticLink; 
    6777    buildTargetReference(); 
    6878} 
     
    7181{ 
    7282    _targets.clear(); 
    73     for( AnimationList::iterator iterAnim = _animations.begin(); iterAnim != _animations.end(); ++iterAnim )  
     83    for( AnimationList::iterator iterAnim = _animations.begin(); iterAnim != _animations.end(); ++iterAnim ) 
    7484    { 
    7585        Animation* anim = (*iterAnim).get(); 
     
    99109} 
    100110 
    101 bool AnimationManagerBase::needToLink() const { return _needToLink; } 
     111bool AnimationManagerBase::needToLink() const { return _needToLink && isAutomaticLink(); } 
    102112 
    103113