28static void rna_EditBone_align_roll(
EditBone *ebo,
const float no[3])
33static float rna_Bone_do_envelope(
Bone *bone,
const float vec[3])
44static void rna_Bone_convert_local_to_pose(
Bone *bone,
46 const float matrix[16],
47 const float matrix_local[16],
48 const float parent_matrix[16],
49 const float parent_matrix_local[16],
53 float offs_bone[4][4];
54 float(*bone_arm_mat)[4] = (
float(*)[4])matrix_local;
55 float(*parent_pose_mat)[4] = (
float(*)[4])parent_matrix;
56 float(*parent_arm_mat)[4] = (
float(*)[4])parent_matrix_local;
78static void rna_Bone_MatrixFromAxisRoll(
const float axis[3],
float roll,
float r_matrix[9])
83static void rna_Bone_AxisRollFromMatrix(
const float matrix[9],
84 const float axis_override[3],
103static bool rna_BoneCollection_assign_abstract(
BoneCollection *bcoll,
107 bonecoll_assign_func_bone assign_bone,
108 bonecoll_assign_func_ebone assign_ebone)
117 const bool made_any_change = assign_bone(bcoll, pchan->
bone);
118 if (made_any_change) {
121 return made_any_change;
126 const bool made_any_change = assign_bone(bcoll, bone);
127 if (made_any_change) {
130 return made_any_change;
135 const bool made_any_change = assign_ebone(bcoll, ebone);
136 if (made_any_change) {
139 return made_any_change;
143 "%s is not supported, pass a Bone, PoseBone, or EditBone",
153 return rna_BoneCollection_assign_abstract(bcoll,
166 return rna_BoneCollection_assign_abstract(bcoll,
183 "Align the bone to a local-space roll so the Z axis "
184 "points in the direction of the vector given");
204 "Position in 3d space to evaluate",
213 func =
RNA_def_function(srna,
"convert_local_to_pose",
"rna_Bone_convert_local_to_pose");
215 "Transform a matrix from Local to Pose space (or back), taking "
216 "into account options like Inherit Scale and Local Location. "
217 "Unlike Object.convert_space, this uses custom rest and pose "
218 "matrices provided by the caller. If the parent matrices are "
219 "omitted, the bone is assumed to have no parent.");
235 parm,
"",
"The custom pose matrix of the parent bone (PoseBone.matrix)");
239 parm,
"",
"The custom rest matrix of the parent bone (Bone.matrix_local)");
240 RNA_def_boolean(func,
"invert",
false,
"",
"Convert from Pose to Local space");
243 func =
RNA_def_function(srna,
"MatrixFromAxisRoll",
"rna_Bone_MatrixFromAxisRoll");
258 func =
RNA_def_function(srna,
"AxisRollFromMatrix",
"rna_Bone_AxisRollFromMatrix");
260 "Convert a rotational matrix to the axis + roll representation. "
261 "Note that the resulting value of the roll may not be as "
262 "expected if the matrix has shear or negative determinant.");
271 parm,
"",
"The optional override for the axis (finds closest approximation for the matrix)");
290 func,
"bone",
"AnyType",
"",
"Bone, PoseBone, or EditBone to assign to this collection");
297 "Whether the bone was actually assigned; will be false if the bone was "
298 "already member of the collection");
305 func,
"bone",
"AnyType",
"",
"Bone, PoseBone, or EditBone to remove from this collection");
312 "Whether the bone was actually removed; will be false if the bone was "
313 "not a member of the collection to begin with");
bool ANIM_armature_bonecoll_unassign_editbone(BoneCollection *bcoll, EditBone *ebone)
bool ANIM_armature_bonecoll_assign(BoneCollection *bcoll, Bone *bone)
bool ANIM_armature_bonecoll_unassign(BoneCollection *bcoll, Bone *bone)
bool ANIM_armature_bonecoll_assign_editbone(BoneCollection *bcoll, EditBone *ebone)
void BKE_bone_parent_transform_invert(BoneParentTransform *bpt)
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_apply(const BoneParentTransform *bpt, const float inmat[4][4], float outmat[4][4])
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], BoneParentTransform *r_bpt)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
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 inverse[4][4], const float mat[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)
draw_view in_light_buf[] float
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
const char * RNA_struct_identifier(const StructRNA *type)
bool RNA_pointer_is_null(const PointerRNA *ptr)
void RNA_api_armature_edit_bone(StructRNA *srna)
void RNA_api_bone(StructRNA *srna)
void RNA_api_bonecollection(StructRNA *srna)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
PropertyRNA * RNA_def_float_vector_xyz(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_array(PropertyRNA *prop, int length)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
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_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_function_output(FunctionRNA *, PropertyRNA *ret)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)