All Questions
229
questions
0
votes
1
answer
72
views
How to recalculate pose bone rotations when armature bone rotation is changed?
I'm trying to import bones and animation data in to blender. The quaternions I have for each keyframe are correct if the armature's bones do not have any rotation. However I also need to import the ...
0
votes
0
answers
16
views
Obtaining joint-local rotations of armature with python
I have written scripts that take as input the joint-local rotations (in quaternions) of an armature. All works as expected when extracting these rotations directly from a .bvh file and converting them ...
1
vote
0
answers
22
views
Unable to reproduce armature bone rotations from .bvh import
I am trying to format the bone rotations of an armature in the way they are formatted inside of a .bvh mocap file. I thought I would be able to obtain the 3D Euler rotations as they seem to be written ...
3
votes
2
answers
161
views
Why is my Stretch-To update button looking for Grease Pencil in Blender 4?
I've been trying to make a button to reset all the stretch-tos in my custom armature as per this question, but my previous menu work has all been in a new menu section in the sidebar of the 3D view.
...
0
votes
1
answer
15
views
Selection of bones to selection of tails of bones
I have an armature with a bunch of bones with zero length, and I can select one and do Select > Similar > Length to get all of the bones with no length, ...
0
votes
0
answers
30
views
Blender's bone.matrix_basis.to_euler() output data is flipped on some bone
I'm currently writing a blender addon to export animations to a json format which i can use for my projects.
My current way of exporting is this:
I grab the matrix of the armature bone: ...
0
votes
0
answers
56
views
how do i create animation whit pose data and with python
I'm making animations based on smpl armature through several pose data. Divide people through person id and put pose data in the armature. However, person id 2 data is contained in all armatures and ...
0
votes
1
answer
20
views
What is the correct way to add settings from the Bone Properties tab to a Sidebar Panel?
I once again stumped with the add-on that I'm working on that puts the settings from the Properties Editor into a panel in the 3D Viewport sidebar. I completed the Armature Data Properties section, ...
0
votes
0
answers
34
views
How can I enable individual bone xray instead of full armature xray?
is it possible to somehow make bones have individual x-ray / in front properties? I understand that this property is being held in it's parent data block for the Armature object but why can't it also ...
0
votes
0
answers
16
views
I am trying to make an addon that enables the user to animate the influence of the armature modifier
I am wondering wether it is possible since the armature modifier struct doesn't have an influence float input. Neither do any of the other modifiers. It is my goal to have an influence slider just ...
1
vote
0
answers
143
views
How can I ensure that my 'rig_ui.py' file is loaded when the armature is linked and overridden in Blender 3.6?
I managed to delete rig_ui.py the script of my rigify armature after renaming things somehow (at least i think that is the problem), and i don't know what to do to restore its original functionality, ...
1
vote
0
answers
157
views
How to efficiently get an armature's object data?
I'm trying to programmatically create an armature and I've run into an issue. While creating a new armature is straight-forward enough (bpy.ops.object.armature_add()...
3
votes
1
answer
175
views
How is a bone's roll defined?
Background
I have a number of bones defined as positions + rotation quaternions.
In blender I understand bones are defined as a head, a tail and a roll. With the head -> tail vector being the ...
0
votes
0
answers
34
views
Is there a way to keyframe the action of applying/adding modifiers (or constraints for bones)
I'm new to scripting in Blender but I've made a tool for an easy IK/FK switch for myself. I've been testing the tool without keyframing and it functionally works great but what I didn't take into ...
0
votes
0
answers
107
views
How to animate armature in blender/python?
I tried to animate simple bones with python, keyframes are inserted in timeline but nothing happens,
Partially this question is copy-paste of that one (sorry) but I didn't find answer there
...
0
votes
0
answers
97
views
Creating a good armature for a rig/skeleton/bones
I am creating a rig/skeleton/bones in Blender python, using bpy, here: https://github.com/coderextreme/X3DJSONLD/blob/master/blend/blenderskeleton.py
I was looking at the code and in Blender and I ...
2
votes
1
answer
59
views
Python: Rename Armature's "root"
TWO QUESTIONS:
1- How do I identify the "Sub Armature" shown in green in a Python Script?
2- How do I rename that same item?
This isn't a bone, nor is it the Armature (that's "...
0
votes
0
answers
20
views
How to delete a bone by script? [duplicate]
MY Code:
...
0
votes
0
answers
14
views
symmetrical weight painting can't let me paint center vertices of a mesh with mirror modifier and armature modifier
I know how to do symmetrical weight painting on a mesh with mirror modifier and armature modifier, but this setting prevents me from weight painting center vertices properly.
my mesh is like 1st ...
1
vote
0
answers
73
views
How to programmatically find a "Y" pose such that it is the inverse of another "X" pose in relation to the T-pose?
That is, if I "Apply" the armature modifier of the "Y" pose onto the mesh then if I now link that mesh to the armature of the "X" pose the mesh should look like the ...
0
votes
0
answers
28
views
How to control existing Custom Properties that are assigned to armatures via operator?
I'm creating an addon that sets the Blender settings based on what type of render we need. However, I'm unable to change the attributes that control aspects of the rigs. I can't access them. The thing ...
1
vote
0
answers
24
views
Python command to get the bone an object is parented to
Assuming an object is parented to an armature and one of its bones. (Type 'bone')
How to get the name of this bone using Python script?
Thanks in advance!
(Blender 3.3 User)
1
vote
1
answer
22
views
With python, is there a more efficient way to duplicate a range of keyframes (all fcurves) than using keyframe_points.insert()
I have a combined animation (position of object, bone rotations...) with about 600 keyframes. Now I want to make a script that clones a selected range of these keyframes and pastes them after the ...
0
votes
1
answer
118
views
blender python transfer pose bone position to an object (matrix issue)
I have an object inside a bone, matches the bone exactly (position, scale, rotation). The armature and the object have different origin points.
I am trying to make the object follow the bone exactly ...
1
vote
0
answers
113
views
How to change pose of armature of a gltf file when the mesh is deformed?
I load a gltf file by pygltf and deform the vertices of gltf mesh by using a nonrigid method. when I export the gltf file, the mesh is deformed but the armature position is not changed.
I am looking ...
0
votes
1
answer
62
views
Coding: parenting 1 bone to another bone
I'm trying to make an addon for blender, but I'm having some difficulty with it I'm trying to use a script to select 2 specific bones with a certain name pattern and then parent the first bone to the ...
0
votes
1
answer
95
views
Simple armature creation script results in a crash when attempting to set bone parenting
My full script is more complex than this, but the issue I'm having can be reproduced with these 9 lines of Python code that create an armature with a single bone:
...
0
votes
0
answers
233
views
Blender real-time animation based on the sensor data
How can i animate the model in the image below based on sensor data? I need to make it real-time(like when person moves his arm, model in the blender should move too.) I tried keyframe_insert method ...
0
votes
0
answers
105
views
What's the differences between posebone's vector and bone's vector?
I want to get a certain bone's head/tail coords in world space in pose mode. I've seen some answers about Bones.vector and PoseBone.vector.
When I set different frame of the armature, the PoseBone....
1
vote
2
answers
551
views
When rigging a car It rescales and rotates
I use Rigacar plugin. MacOs Ventura, Blender 3.4.1 (Steam)
At first I parent everything to the body of the car, origins to geometry and finally, apply all transformations.
However when: Add > ...
1
vote
1
answer
83
views
The results of python scripts and python console are different?
I'm running a script to create a bone and rotate it by setting rotation_euler of the PoseBone. But I got wrong results from the scripts.
My scripts code:
...
2
votes
1
answer
121
views
snap bone locations using python
I'm trying to snap bone locations which are of a certain proximity to a vertexes of a mesh, to the difference of position based an the corresponding vertex of another mesh with the same topology.
...
1
vote
3
answers
61
views
Server json Blender crashes
Can someone help me understand why this code:
...
1
vote
1
answer
679
views
How to move and resize a bone in Python such that the head and the tail are at a certain global position?
I want to move and resize a bone by setting the coordinates of the head of the bone and the tail of the bone explicitly.
For example, let's say that these are my coordinates of my bone head:
...
0
votes
1
answer
788
views
Error when retargeting Animation to Human mesh
I'm using Rokoko plugin. Does anyone have a solution to this error?
...
1
vote
0
answers
37
views
Rotating individual bones in Python not working
At the end of a script, I need to disconnect all the bones in my armature and rotate them 90 degrees to match what Unreal expects for the joints. I can't seem to get this to work in Python, though.
...
0
votes
1
answer
65
views
How can I get / set the name of an extruded bone in Python?
I'm auto generating my armature, and after extruding a bone, I'd like set its name. This will help me reference it later, so I can parent other bones to it.
Right now I'm extruding the bone with this:
...
0
votes
1
answer
519
views
How to access pose bones via python in this condition?
I'm making an add-on to boost my workflow. I want to add custom shapes to the bones of the armature selected in the PointerProperty from the panel. But according to ...
0
votes
0
answers
89
views
Calculating join angle of an armature
For a school project I need to calculate joint angle of an armature. I found some code that works with 2 bones, but I need to calculate the angle of every 2 adjacent bones (knees, elbows, back, etc). ...
0
votes
3
answers
1k
views
Hide Unhide armature in viewport hotkey
I'm making the switch from Maya to Blender, but one thing that I couldn't find is to assign a hotkey to hide and unhide an armature in the viewport. I don't like the visual clutter and as an animator ...
1
vote
1
answer
243
views
Can I delete all duplicated drivers of armature?
I separated some bones from a armature which has lots of bone drivers, and when I separated some bones, it made a new armature with old armature's drivers. After editing I joined old armature to new ...
3
votes
2
answers
222
views
How can I search to see if there's more than one bone with a certain name?
I've already figured out the code for finding bones by their name. I just need to know if there's more than one bone that meets this criteria (for example the words: "hand", "ik", ...
0
votes
2
answers
164
views
How do I search for a bone's name, then rename it with a script?
What I need to do is search for a bone then rename that bone, for example I want to find the left hand. I search for that bone with the letters "hand", "ik", and "L" in ...
0
votes
1
answer
305
views
Get the actual position of bone (head and tail) even when armature is rotated
I would like to know if it is possible to get the real coordinates of a bone's head and tail when the armature is rotated.
I already got something working with translations of armature but can't ...
1
vote
1
answer
182
views
Quickly & continuously generate images without rendering?
I know the title is a little ambiguous but bear with me for a minute
On one hand I have blender with a 3D model and a server script
...
0
votes
1
answer
180
views
How do I change the name of a custom property that already has been assigned to Armature object?
How do I change the name of a custom property that already has been assigned to Armature object?
As an example, I know that I can assign a new property in the selected armature in edit or pose mode by ...
0
votes
1
answer
323
views
How do I assing a copy_transform constraint to bones stored in different lists?
So, I am writing a set of scripts to help me out with manual rigging in Blender. But I came across a problem when trying to assign constraints to 2 different groups of bones that I store in separate ...
0
votes
0
answers
199
views
Is there a way to copy constraints from one armature to another?
I have two armatures, all the names and the number of bones are the same, but constraints are configured for one armature, is there a way, perhaps some script to copy the constraints to second ...
0
votes
1
answer
121
views
Trying to Create Driver for Armature Layer
import bpy
arm = bpy.data.armatures[bpy.context.active_object.name] # type: ignore
drv = arm.driver_add('layers', 0)[0].driver
The error I receive here is: ...
0
votes
1
answer
204
views
How to check if a bone layer is empty with python
When I run my script, I want to activate only the bone layer that contains bones and mute the empty layers without bones.
Is there an api that can tell if a layer is empty or not?