26 static void rna_EditBone_align_roll(
EditBone *ebo,
float no[3])
31 static float rna_Bone_do_envelope(
Bone *bone,
float vec[3])
42 static void rna_Bone_convert_local_to_pose(
Bone *bone,
45 float matrix_local[16],
46 float parent_matrix[16],
47 float parent_matrix_local[16],
51 float offs_bone[4][4];
52 float(*bone_arm_mat)[4] = (
float(*)[4])matrix_local;
53 float(*parent_pose_mat)[4] = (
float(*)[4])parent_matrix;
54 float(*parent_arm_mat)[4] = (
float(*)[4])parent_matrix_local;
76 static void rna_Bone_MatrixFromAxisRoll(
float axis[3],
float roll,
float r_matrix[9])
81 static void rna_Bone_AxisRollFromMatrix(
float matrix[9],
82 float axis_override[3],
106 "Align the bone to a local-space roll so the Z axis "
107 "points in the direction of the vector given");
109 func,
"vector", 3,
NULL, -FLT_MAX, FLT_MAX,
"Vector",
"", -FLT_MAX, FLT_MAX);
127 "Position in 3d space to evaluate",
133 func,
"factor", 0, -FLT_MAX, FLT_MAX,
"Factor",
"Envelope factor", -FLT_MAX, FLT_MAX);
136 func =
RNA_def_function(srna,
"convert_local_to_pose",
"rna_Bone_convert_local_to_pose");
138 "Transform a matrix from Local to Pose space (or back), taking "
139 "into account options like Inherit Scale and Local Location. "
140 "Unlike Object.convert_space, this uses custom rest and pose "
141 "matrices provided by the caller. If the parent matrices are "
142 "omitted, the bone is assumed to have no parent.");
158 parm,
"",
"The custom pose matrix of the parent bone (PoseBone.matrix)");
162 parm,
"",
"The custom rest matrix of the parent bone (Bone.matrix_local)");
163 parm =
RNA_def_boolean(func,
"invert",
false,
"",
"Convert from Pose to Local space");
166 func =
RNA_def_function(srna,
"MatrixFromAxisRoll",
"rna_Bone_MatrixFromAxisRoll");
181 func =
RNA_def_function(srna,
"AxisRollFromMatrix",
"rna_Bone_AxisRollFromMatrix");
183 "Convert a rotational matrix to the axis + roll representation. "
184 "Note that the resulting value of the roll may not be as "
185 "expected if the matrix has shear or negative determinant.");
194 parm,
"",
"The optional override for the axis (finds closest approximation for the matrix)");
typedef float(TangentPoint)[2]
void mat3_vec_to_roll(const float mat[3][3], const float vec[3], float *r_roll)
float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float rad1, float rad2, float rdist)
void BKE_bone_parent_transform_invert(struct BoneParentTransform *bpt)
void vec_roll_to_mat3(const float vec[3], float roll, float r_mat[3][3])
void mat3_to_vec_roll(const float mat[3][3], float r_vec[3], float *r_roll)
void BKE_bone_parent_transform_calc_from_matrices(int bone_flag, int inherit_scale_mode, const float offs_bone[4][4], const float parent_arm_mat[4][4], const float parent_pose_mat[4][4], struct BoneParentTransform *r_bpt)
void BKE_bone_parent_transform_apply(const struct BoneParentTransform *bpt, const float inmat[4][4], float outmat[4][4])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void normalize_m3_m3(float R[3][3], const float M[3][3]) ATTR_NONNULL()
bool invert_m4_m4(float R[4][4], const float A[4][4])
bool is_zero_m4(const float mat[4][4])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
float ED_armature_ebone_roll_to_vector(const EditBone *bone, const float align_axis[3], const bool axis_only)
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
void RNA_api_armature_edit_bone(StructRNA *srna)
void RNA_api_bone(StructRNA *srna)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_function_output(FunctionRNA *UNUSED(func), PropertyRNA *ret)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
const int rna_matrix_dimsize_4x4[]
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_function_flag(FunctionRNA *func, int flag)
const int rna_matrix_dimsize_3x3[]
PropertyRNA * RNA_def_float_vector_xyz(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)