Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actor.unloadAnims clears all control effects #853

rdb opened this issue Jan 22, 2020 · 0 comments

Actor.unloadAnims clears all control effects #853

rdb opened this issue Jan 22, 2020 · 0 comments


Copy link

@rdb rdb commented Jan 22, 2020

When unloading a particular animation from Actor, all control effects are cleared from all bound animations. This is unexpected and was a cause of confusion in this thread:

Below is a minimal sample that reproduces this:

from import Actor
from direct.directbase import TestStart
from panda3d.core import PartBundle

a = Actor('ralph.egg.pz')

a.load_anims({'walk1': 'ralph-walk.egg.pz'})
a.load_anims({'walk2': 'ralph-walk.egg.pz'})

a.set_control_effect('walk1', 0.5)
a.set_control_effect('walk2', 0.5)

# Pose one at left foot forward, the other right foot forward.
# With the above blends, Ralph should be in a roughly neutral pose
# (but not in the bind pose).
a.pose('walk1', 10)
a.pose('walk2', 0)

# Load a run animation and bind it.  This (rightly) doesn't have any effect,
# because there is no control effect active for this animation.
a.load_anims({'run': 'ralph-run.egg.pz'})
a.pose('run', 0)

# Unload the run animation.  Intuitively, this should have no effect.
# However, it resets Ralph to the bind pose.

base.trackball.node().set_pos(0, 30, 0)
@rdb rdb added this to the 1.10.6 milestone Jan 22, 2020
@rdb rdb self-assigned this Jan 22, 2020
@rdb rdb closed this in bd3dd63 Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.