Used for bone operations.
xshade |
↑ |
shape |
↑ |
bone_joint |
get_limit | Gets the minimum and maximum values of the working angle about the specified axis |
set_limit | Sets the minimum and maximum values of the working angle about the specified axis |
auto_direction | Auto Align Axis |
axis_dir | The axis direction used for Auto Align Axis |
matrix | The bone transformation matrix |
offset | The offset value of the bone position |
range | Range limits of the angle of rotation for each local XYZ axis |
rotation | Rotation (quaternion) |
size | The bone size |
get_limit
Gets the minimum and maximum values of the working angle about the specified axis.
Return value :
vec2
Arguments :
int : axis number (X:0, Y:1, Z:2)
#Output the minimum and maximum values of the working angle about the X axis if the selected object is a bone
print xshade.scene().active_shape().bone_joint.get_limit(0)
set_limit
Sets the minimum and maximum values of the working angle about the specified axis
Arguments :
int : axis number (X:0, Y:1, Z:2)
vec2 : working range
A working range value of -1.0 is equal to -180 degrees; 1.0 is equal to 180 degrees.
#Specify the minimum and maximum values of the working angle about the X axis if the selected object is a bone
xshade.scene().active_shape().bone_joint.set_limit(0, [-0.8, 1.0])
auto_direction
Automatically resets the bone axis direction.
Type :
bool
#Output the Auto Align Axis setting if the selected object is a bone
print xshade.scene().active_shape().bone_joint.auto_direction
axis_dir
The axis direction used when automatically resetting the bone axis direction.
Type :
vec3
#Output the axis direction used for Auto Align Axis if the selected object is a bone
print xshade.scene().active_shape().bone_joint.axis_dir
matrix
The bone transformation matrix.
Type :
mat4
#Output the transformation matrix if the selected object is a bone
print xshade.scene().active_shape().bone_joint.matrix
offset
The offset value of the bone position.
Type :
vec3
#Output the joint offset value if the selected object is a bone
print xshade.scene().active_shape().bone_joint.offset
range
Whether to limit the range of the angle of rotation for each local XYZ axis.
Type :
bool
#Output the Range on/off value if the selected object is a bone
print xshade.scene().active_shape().bone_joint.range
rotation
Rotation (quaternion).
Type :
quaternion
#Output the joint rotation if the selected object is a bone
print xshade.scene().active_shape().bone_joint.rotation
size
The bone size.
Type :
float
#Output the bone size if the selected object is a bone
print xshade.scene().active_shape().bone_joint.size