It always works correctly. It does not always work like you'd expect. The differences are basically down to how Euler angles operate, especially in conjunction with constraints.
So when you copy rotation, here's what it does:
It decomposes your target bone's orientation into XYZ Euler triplets. These are not necessarily or even likely to be the same XYZ ...
Open a "text editor" window, select a file that should already exist from the dropdown menu (rig_ui.py) and press the triangle play button, tu run the script.
This procedure recreates the Rigify layer ui menu in the N panel, if for some reason it hasn't been created.
This can happen if the "Auto run Python scripts" preference is disabled, ...
What I would do here is use a locked track constraint:
Here, I'm locked tracking the tail of my control bone, locking the deform bone's Z axis, tracking to its Y axis. What that means is that deform is going to rotate in its local Z axis to get its tail (+Y) pointed as close to control's tail as possible, given only that axis in which to rotate.
Why is ...
The problem was that you used object coordinates. Object coordinates always point towards obeject X, Y and Z-axis. To fix this you have to either change it to UV or Generated coordinates which bend with the object.
SET TO GENERATED:
SET TO UV:
If I understand correctly, you want to change your rest pose, but permanently, so that when you go into Edit Mode, the bone positions do not revert to any other position, because they've been truly changed from the position they were in originally, making the new position the new default rest pose, even in Edit Mode. There is a way to do this, and it's not ...
Your mesh is high-poly, which will make rigging and animations more complicated imho, but what you could do is join the helmet to the rest of the body (CtrlJ), remove its vertices from all groups and assign them to the vertex group called spine.006 which is controlled by the head bone:
Switch to pose mode and find and select the bone that rotates backwards. Go to the last keyframe in your animation (frame 80 it looks like), and negate the W, X, Y, Z of the rotation in the Bone Properties panel, ie. replace 0.1 with -0.1. Insert a keyframe to save the values. Your rotation should now work.
(I think there's an op that will do this ...
If you're trying to parent the rig to the model, its the other way round. You first have to select the rig you want to parent, and then the mesh you want the rig to be parented to. then ctrl+P and you should be done.
Rolling a pose bone.
Using python, how do you get the "roll" of a pose_bone?
IMO this is simply a case of rotating the bone around any pivot point that is on a line parallel to y axis vector passing thru points head and tail.
Matrix math to translate, rotate, scale with respect to a pivot point in Object mode
from mathutils import ...
It's a bone roll problem.
The bone rolls differ in your rig. Bones have 3 axes and a roll value. These values determine in which direction for example a limb bends when the bones are rotated around one of the axes in a positive or negative direction.
Select the armature, go in Edit mode, and check the bone roll values. Activate the display of the bone axes ...
import numpy as np
from mathutils import Vector
context = bpy.context
scene = context.scene
RobloxRig = bpy.context.scene.objects['__Rig']
UpperRightArm_bone = RobloxRig.pose.bones["RightUpperArm"]
def angle(v1, v2, acute):
# v1 is your first vector
# v2 is your second vector
angle = np.arccos(np.dot(v1, v2) / (np....
as your bone is not completely aligned with the global X axis, rotating it on the global X axis makes it rotate on its local Z. If you align it completely with the global X axis in Edit mode, it won't happen any more. Once aligned:
Not sure why you need to rotate it on the global X axis though, just keyframe rotations on its local Y axis.
Your weight paints are probably off. Click on your model, switch to weight paint mode, go to Object data properties panel, and click on the bone causing the problem under vertex groups. Where the problem is occurring, there should be red dots. Change the brush type to subtract and make the color of the red spots causing the problem blue.
Here is where you ...
I figured out the problem! When I duplicated the first side to the other and renamed it to flip them, it did not get rid of the ".001" from dupli automatically, and that's what was making the other side go wacky. I'm annoyed how easy of a fix it was.
As mentioned by Denis, a child-of constraint would be easier. But it's still possible to answer your explicit question, "How can I set the empty rotation in such a way that the hand will have the correct resting rotation when I add the copy transform to the hand ik?"
Get the hand posed how you'd like, without the copy transforms constraint.
Figured out how to mirror the same animation keyframes to the other bone hand, without any re-work or manual labor required.
With the animated hand's bone rig selected, select all the keyframes in the Timeline (Shift+F12 to get the Timeline view and use your mouse to box-select them all or press Ctrl+A) and copying them with Ctrl+C.
Then proceeded to ...
As I told you, there's a difference between the Rest and Pose position of the bones because of the fact that the IK bones will stick to their controller as soon as you switch to Pose mode, and if the controller head is not placed exactly where the IK bone's tail is placed, it will make the IK jump. How to fix it?
First select the IK bone and make all the ...
To strictly answer the question: Easiest thing is to parent an empty to the mesh vertices, then copy transforms from that empty. (And probably limit scale, because vertex triangle parenting leaves you with some pretty gigantic skew problems that you probably don't want...)
Alternative, without any empty, is to copy location from a vertex group marked vertex,...
The primary problem is that blender doesn't update matrices automatically after setting by code and the secondary problem is setting correct matrices. check the same kind of problem which I have answered here:
How can I copy the location and rotation of multiple bones of a skeleton and paste them to an identical skeleton?
Because your object has shapekeys, you have a shapekey selected and therefore you're changing this shapekey, you're not changing the original shape, which is on the top of your list and which is called Basis. If you want to make any change to the original shape, select this shapekey called Basis. If you want to save the shape you've created and make it the ...
In Python, How to get pose bone to rotate with another pose bone from a different armature? Finding Rotational difference have shown how to snap a bone to another using world space matrices of each. The example snaps one bone to the world space rotation of another.
Similarly here could look at local space. Have simply converted the local ...
The simplest way would probably be to create a Pose Library for the source file and save the pose to it, then later append that Pose library to the destination file, then link to it, and then assign the pose to the new hand.
Select your source hand armature in Object Mode, then go into Pose Mode and select every bone of the hand. The reason for selecting all ...