Jump to content

Blender animation, batch bone editing?


Tefnacht

Recommended Posts

Hi.

 

First of all, I am not a artist or a real animator, its just a hobby and I slowly taught myself over the years but there is still a lot I don't know. I don't know much about the proper terminology either, therefore I had some trouble deciding on a good thread title ... or use Google for that matter. I'm not really sure what the thing I am looking for is even called :)

 

So here is my situation: I have a rather long and large animation, Umpas pole dance to be precise, and I want to change it a little so I can use it in my mod. Since its a pole dance, a pole is needed. Currently this is done by simply adding a animated object to the animation that contains the pole. For various reasons this will not do in my situation. My pole is a world object (a activator) with collision geometry.

 

Now, the pole dance animation is set up in a way that requires the pole to be roughly where the player is standing (at the position of the Bip01 bone), this won't work for me for various reasons, constant collision between player and pole being one of them.

 

I successfully imported the animation into Blender, have it all nicely set up and can edit and re-export it to my hearts content. But ... well, the animation is long. 2183 keys. Editing them all by hand is out of the question.

What I want to do is this: I need to apply a constant translation to the Bip01 NonAccum bone in every single key. In my case about 5 units in Y direction, a very small fraction along X and -0.5 on Z. This would result in the player actually standing unmoving 50 game units away from the pole, while the visible body mesh is happily wrapping itself around it.

 

I got it to work and look good in Blender by adding a transform constraint to the Bip01 NonAccum bone that does my translation. Sadly the .kf exporter does not seem to take constraints into consideration. No real surprise there. The exported animation has the NonAccum bone back where it was without the added constraint.

 

After some digging I found a script called “Bake Constraints” which supposedly creates a clone of the skeleton and removes all the constraints but keeps the additional bone translation and rotation they caused. Pretty much like applying a mesh modifier.

However, this script has been running for two hours now and is only at 30%. Since I know for a fact that my first attempt won't work out anyway and I will have to do this whole procedure at least a couple dozen times until I get it right ... that takes too long.

 

There must be a simpler way to do this?

 

Manually, I would grab the NonAccum bone, add 5 to y, press I, choose LocRot, go to the next frame, grab the bone, add 5 to y, press I, choose LocRot ... and that 2183 times. There must be a way to automate that?

 

Please? Can anyone help me?

Link to comment

Well,

 

it's a few days later and I still didn't manage to get a complete run of “Bake Constraints”. The script becomes exponentially slower over time. Best thing I managed so far before I had to abort and turn off my machine was ~70% after 11 hours. What a joke. Screw this.

 

Instead I used a macro recorder. The procedure was: Press G (to grab the selected bone), press Y (to move it along the y-axis), press 5 (to move it fife units), press Enter (to apply movement), press I (to open the insert key menu), press Enter (to choose the last option selected, LocRot in my case), press CursorRight twice (to move to the next frame) and start all over.

 

I set up the macro recorder to replay this button sequence for Blender at a really high speed and my modification was done 2183 times in less than a minute. BAM! Then I did the same for X and Z and was a happy camper.

 

But I still cannot believe Blender doesn't have a built-in function to do stuff like that. ...it must have! Well, it probably has. Hidden somewhere between the tens of hundreds available options and actions.

 

So ... if you know a way to do something like this inside Blender, please, please post it here.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use