File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ This issue fixes several bugs that were still found in 1.9.2.
3434* Support for InvSphere, Box and Tube solids in bam2egg
3535* Add normalized() method to vectors
3636* asyncFlattenStrong with inPlace=True caused node to disappear
37+ * Fix asyncFlattenStrong called on nodes without parent
38+ * Fix is_playing() check when playing an animation backwards
3739
3840------------------------ RELEASE 1.9.2 ------------------------
3941
Original file line number Diff line number Diff line change @@ -24,7 +24,16 @@ do_task() {
2424 // We make another instance of the original node, so we can safely flatten
2525 // that without affecting the original copy.
2626 NodePath np (" flatten_root" );
27- np.attach_new_node (_orig);
27+
28+ // Except if we try to attach a node without parents, this will cause the
29+ // original NodePath to be affected, so we have to make a (shallow) copy.
30+ if (_orig->get_num_parents () == 0 ) {
31+ PT (PandaNode) copy = _orig->make_copy ();
32+ copy->copy_children (_orig);
33+ np.attach_new_node (copy);
34+ } else {
35+ np.attach_new_node (_orig);
36+ }
2837 np.flatten_strong ();
2938 _model = np.get_child (0 ).node ();
3039 _is_ready = true ;
Original file line number Diff line number Diff line change @@ -356,7 +356,12 @@ is_playing() const {
356356 return false ;
357357
358358 case PM_play:
359- return get_f () < _play_frames;
359+ if (_effective_frame_rate < 0.0 ) {
360+ // If we're playing backwards, check if we're at the beginning.
361+ return get_f () > 0 ;
362+ } else {
363+ return get_f () < _play_frames;
364+ }
360365
361366 case PM_loop:
362367 case PM_pingpong:
You can’t perform that action at this time.
0 commit comments