diff --git a/panda/src/chan/Sources.pp b/panda/src/chan/Sources.pp index 34f4706248..4af481ac68 100644 --- a/panda/src/chan/Sources.pp +++ b/panda/src/chan/Sources.pp @@ -21,7 +21,9 @@ animControl.I animControl.N \ animControl.h animControlCollection.I \ animControlCollection.h animGroup.I animGroup.h auto_bind.h \ - config_chan.h movingPartBase.I movingPartBase.h \ + config_chan.h \ + movingPart.I movingPart.h \ + movingPartBase.I movingPartBase.h \ movingPartMatrix.I movingPartMatrix.h movingPartScalar.I \ movingPartScalar.h partBundle.I partBundle.N partBundle.h \ partBundleNode.I partBundleNode.h \ diff --git a/panda/src/chan/movingPartBase.I b/panda/src/chan/movingPartBase.I index 229a22b35b..e5bb26ebf6 100644 --- a/panda/src/chan/movingPartBase.I +++ b/panda/src/chan/movingPartBase.I @@ -25,9 +25,11 @@ //////////////////////////////////////////////////////////////////// INLINE MovingPartBase:: MovingPartBase(const MovingPartBase ©) : - PartGroup(copy) + PartGroup(copy), + _forced_channel(copy._forced_channel) { - // We don't copy the bound channels. + // We don't copy the bound channels. We do copy the forced_channel, + // though this is just a pointerwise copy. } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/chan/movingPartBase.cxx b/panda/src/chan/movingPartBase.cxx index 663e1423ee..b4515a2ad7 100644 --- a/panda/src/chan/movingPartBase.cxx +++ b/panda/src/chan/movingPartBase.cxx @@ -136,7 +136,9 @@ do_update(PartBundle *root, const CycleData *root_cdata, PartGroup *parent, // See if any of the channel values have changed since last time. if (_forced_channel != (AnimChannelBase *)NULL) { - needs_update = _forced_channel->has_changed(0.0, 0.0); + if (!needs_update) { + needs_update = _forced_channel->has_changed(0.0, 0.0); + } } else { const PartBundle::CData *cdata = (const PartBundle::CData *)root_cdata; diff --git a/panda/src/chan/partBundle.cxx b/panda/src/chan/partBundle.cxx index 5a8c76c946..f99b9b5775 100644 --- a/panda/src/chan/partBundle.cxx +++ b/panda/src/chan/partBundle.cxx @@ -264,6 +264,9 @@ freeze_joint(const string &joint_name, const TransformState *transform) { return false; } + CDWriter cdata(_cycler, false); + cdata->_anim_changed = true; + return child->apply_freeze(transform); } @@ -287,6 +290,9 @@ control_joint(const string &joint_name, PandaNode *node) { return false; } + CDWriter cdata(_cycler, false); + cdata->_anim_changed = true; + return child->apply_control(node); } @@ -309,6 +315,9 @@ release_joint(const string &joint_name) { return false; } + CDWriter cdata(_cycler, false); + cdata->_anim_changed = true; + return child->clear_forced_channel(); }