No announcement yet.

It's possible to update the Animtree?

  • Filter
  • Time
  • Show
Clear All
new posts

    It's possible to update the Animtree?

    I want to modify branchstarbones in a AnimBlendPerBone slot, to reduce animtree complexity. I can change it, but there are no effect, is like the Animtree needs to be updated.

    But I don't know how to do. I tried with mesh.forceupdate and mesh.forceskelupdate, but nothing.

    This is the example code to change values:

    exec function test ()
    	local AnimNode N;
    	N = Mesh.FindAnimNode('Slot1'); 
    	AnimNodeBlendPerBone(N).BranchStartBoneName[0] = 'Root';
    Any idea?

    SkelealMeshComponent::UpdateAnimations()? Or using AnimNodeSequence::SetPosition(float NewTime, bool bFireNotifies).


      Thank you, I did the test but not worked.

      I was looking into skeletalmesh source and found InitSkelControls(), but not worked neither.

      The only that works is "SetAnimTreeTemplate", to reassign the animtree. But after that it's needed to restore morphs with InitMorphTargets() and add again the morphs to the node. And the pawn pose are reseted. So it's no a good solution.

      To solve my problem I can use some diferent animations instead changing the animblendperbone, but changing the node would be a more elegant solution.