All Questions
38
questions
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 ...
3
votes
1
answer
8k
views
Get bone rotation in pose mode using Python
I want to get angles of joints in armature in pose mode, see the picture below. I tried to get local rotation of bones, but I can't find a way to do this.
I tried:
...
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 ...
3
votes
3
answers
3k
views
How do I prevent object from moving when parenting object to a bone?
I've been trying different examples to parent an object to a bone without the object moving (aka keep_transform), but no matter what I try it always offsets:
...
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 ...
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:
...
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:
...
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 ...
4
votes
1
answer
8k
views
Set bone constraints via python API
Is there any way to add bone constraint through python api?
For example, I have two armatures:
...
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 ...
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 ...
4
votes
1
answer
1k
views
Armature bones created in python disappear after exiting edit mode
I'm writing an importer for a file format with skeletal data, so I'd like to generate an armature with bones to represent it. I can put the object into edit mode and create EditBones without any ...
3
votes
1
answer
3k
views
Blender Python - exporting bone matrices for animation relative to parent
I am making a homegrown 3d engine for my projects.
So far, I am able to export:
mesh
materials
Node hierarchy
Each node in my engine has it own mesh(optional), material(optional) and a PARENT-...
3
votes
1
answer
2k
views
Convert particles to animated mesh including existing armature animation
The situation
I am using a boid physics particle system in Blender 2.82. I am rendering the particles using an object that has armature animation. Following a process similar to what is described in ...
3
votes
1
answer
3k
views
Global Pose/Rotation of a bone
Is it possible to determine the pose/rotation of a bone depending on the parent bones (with Python), in the best case in euler angles.
For example, I have a model of a human and the arm is rotated ...