import bpy
from mathutils import Matrix, Vector
bpy.ops.transform.resize(value=(1, 2, 1), orient_type='LOCAL')
obj = bpy.context.active_object
mat = obj.matrix_world
print(mat)
bpy.ops.transform.resize(value=(1, .5, 1), orient_type='GLOBAL', orient_matrix=mat)
I have the following code. I have an group of parented bones. I am trying to length each individually along their own local axis. But because of the parent child relationship the children always deform along the local axis of the parent. My plan is to lengthen each bone along its local axis and then shrink each of its children along it's parents local axis. Repeating this process down the line. However I am a little confused on how to reverse the Local applied scale to the children's Global scale.
The code I have here is attempting to resize one object using local resize and then return it to its original size using a global resize. I just need help with understanding how the matrices work.