Announcement

Collapse
No announcement yet.

It's possible to update the Animtree?

Collapse
X
 
  • 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:

    Code:
    exec function test ()
    {
    	local AnimNode N;
    	N = Mesh.FindAnimNode('Slot1'); 
    	
    	`log("node1"@N);
    	`log("node1"@string(AnimNodeBlendPerBone(N).BranchStartBoneName[0]));
    	
    	AnimNodeBlendPerBone(N).BranchStartBoneName[0] = 'Root';
    
    	//Mesh.ForceUpdate(false);
    	//Mesh.ForceSkelUpdate();
    }
    Any idea?

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

    Comment


      #3
      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.

      Comment

      Working...
      X