I wonder if this behaviour is working against you here? That calling unloadAnims()
with a single animation is clearing the control effects for other animations?
Maybe, instead of unloadAnims
, you could give this code a try, which does the same thing as unloadAnims
but without clearing all the control effects:
prevAnim[pridx] = "Animation Name"
proplst[pridx].setControlEffect(prevAnim[pridx], 0.0)
cdict = proplst[pridx].getAnimControlDict()
lodNames = cdict.keys()
partNames = cdict[next(iter(lodNames))].keys()
for lodName in lodNames:
for partName in partNames:
animDef = cdict[lodName][partName].get(prevAnim[pridx])
if animDef:
animDef.animControl = None
EDIT: oops, corrected