Browse Source

fill in initial value from node when it is initially set

David Rose 19 years ago
parent
commit
7d904403d3

+ 3 - 0
panda/src/chan/animChannelMatrixDynamic.cxx

@@ -187,6 +187,9 @@ set_value(const TransformState *value) {
 void AnimChannelMatrixDynamic::
 set_value_node(PandaNode *value_node) {
   _value_node = value_node;
+  if (_value_node != (PandaNode *)NULL) {
+    _value = _value_node->get_transform();
+  }
 }
 
 

+ 4 - 0
panda/src/chan/animChannelScalarDynamic.cxx

@@ -114,6 +114,10 @@ set_value_node(PandaNode *value_node) {
   }
 
   _value_node = value_node;
+
+  if (_value_node != (PandaNode *)NULL) {
+    _value = _value_node->get_transform();
+  }
 }