All Questions
229
questions
18
votes
3
answers
21k
views
How to get keyframe data from python?
I am looking for help on how to export armatures and their animations in a custom export script.
I wish to have an animation format similar to BVH, i.e. a bunch of ...
15
votes
3
answers
11k
views
How can I manually calculate bpy.types.PoseBone.matrix using Blender's Python API?
I have this .blend file which has a simple scene, and a python script. There's a readme section in the script, but to give a general idea:
There are two identical meshes in the scene, one skinned, and ...
12
votes
3
answers
5k
views
Controlling armature through python
I need to control an armature using Python so that I can animate a biped model using data from a text file. I've been using this tutorial and some other sources to try and do so, but I can never see ...
9
votes
1
answer
13k
views
How to get an armature by name in Python and get access to its bones?
I want to retrieve an armature by name and access its bones. However, this doesn't work:
armature = bpy.data.objects["rig"]
bones = armature.bones
It gives the ...
8
votes
1
answer
12k
views
How to rotate a bone using python
I have a bone, which i need to rotate. It has to be done on a server all the time, which means, that it would be nice to avoid clicking on the bone.
I understand that i need to use:
...
8
votes
1
answer
5k
views
Delete bones via script
I want to delete all bones in an armature which contain a specific word but I can't figure out how to. This is the script:
...
7
votes
1
answer
7k
views
Python Create Custom Armature without ops
how do you create an armature in Blender Python 2.7x without using bpy.ops? With meshes I would use something like
...
6
votes
2
answers
17k
views
How to get/select a bone by it's name in python?
I am having a master armature which has multiple bones. Now I want to apply rotation to a particular bone. Now, I can loop through all the bones in the armature and check for the bone with the ...
6
votes
2
answers
3k
views
How to convert curve to armature
I have a bezier curve that I created in Inkscape and I want to convert it to an armature, where each node of the curve is connected by a bone. See example below:
Is there a way to do this in Blender ...
6
votes
1
answer
3k
views
Morph between different facial expressions?
I want to use Blender to make a dynamic character. I want to know if it is possible to make a number of keyframes for facial expressions and then have the ability (using python's game engine) to ...
6
votes
2
answers
1k
views
Finding the armature owning a bone
I'm trying to write a script that constructs a transformation from a bone to an object (for "attaching" objects to animated armatures in a game engine). I can easily find the currently selected bone ...
5
votes
2
answers
3k
views
Move Bone Tail to a certain location
I have an armature where Automatic IK is enabled. I want to move my bone in pose mode using python instead of grabbing it using mouse. I tried the below but it didn't work as it says tail location is ...
5
votes
1
answer
7k
views
Renaming bones with Python
I often use Blender to port models between game engines for personal-use game mods, which means I frequently have to rename the bones in accordance with the rules of different game engines.
I already ...
5
votes
2
answers
3k
views
How can a bone's tail be changed by a script?
I want to calculate a rotation matrix from two vectors, in order to check the steps are correct I have setup 3 armatures.
A reference bone (arm_org),
One that is directly rotated by applying a ...
5
votes
3
answers
1k
views
Pin cloth vertices at a specific set of frames, and un-pin otherwise (in python)
I am using Blender 2.82a and am trying to pin cloth vertices only at a specific set of frames.
The broader context is to simulate actions on a cloth, where each action is parameterized by a cloth and ...