Fix #107032: API Document: matrix_channel (PoseBone) description incorrect
Update the RNA and DNA documentation for two bone matrices: - `PoseBone.matrix_channel` (`bPoseChannel::chan_mat` in DNA) contains the evaluated loc/rot/scale channels, including constraints and drivers. - `PoseBone.matrix` (`bPoseChannel::pose_mat` in DNA) contains the same transform, but then expressed in the armature object space. No functional changes, just clarifications in comments / tooltips.
This commit is contained in:
@@ -290,13 +290,14 @@ typedef struct bPoseChannel {
|
||||
char _pad[2];
|
||||
|
||||
/**
|
||||
* Matrix result of location/rotation/scale components & constraints.
|
||||
* Matrix result of location/rotation/scale components, and evaluation of
|
||||
* animation data and constraints.
|
||||
*
|
||||
* This is the dynamic component of `pose_mat` (without #Bone.arm_mat).
|
||||
*/
|
||||
float chan_mat[4][4];
|
||||
/**
|
||||
* Constraints accumulate here. in the end, `pose_mat = bone->arm_mat * chan_mat`
|
||||
* this matrix is object space.
|
||||
* Channel matrix in the armature object space, i.e. `pose_mat = bone->arm_mat * chan_mat`.
|
||||
*/
|
||||
float pose_mat[4][4];
|
||||
/** For display, pose_mat with bone length applied. */
|
||||
|
||||
@@ -1134,7 +1134,10 @@ static void rna_def_pose_channel(BlenderRNA *brna)
|
||||
RNA_def_property_float_sdna(prop, NULL, "chan_mat");
|
||||
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Channel Matrix", "4x4 matrix, before constraints");
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Channel Matrix",
|
||||
"4x4 matrix of the bone's location/rotation/scale channels (including "
|
||||
"animation and drivers) and the effect of bone constraints");
|
||||
|
||||
/* writable because it touches loc/scale/rot directly */
|
||||
prop = RNA_def_property(srna, "matrix_basis", PROP_FLOAT, PROP_MATRIX);
|
||||
@@ -1156,7 +1159,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"Pose Matrix",
|
||||
"Final 4x4 matrix after constraints and drivers are applied (object space)");
|
||||
"Final 4x4 matrix after constraints and drivers are applied, in the armature object space");
|
||||
RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update");
|
||||
|
||||
/* Head/Tail Coordinates (in Pose Space) - Automatically calculated... */
|
||||
|
||||
Reference in New Issue
Block a user