35static void rna_EditBone_align_roll(
EditBone *ebo,
const float no[3])
41static float rna_Bone_do_envelope(
Bone *bone,
const float vec[3])
52static void rna_Bone_convert_local_to_pose(
Bone *bone,
54 const float matrix[16],
55 const float matrix_local[16],
56 const float parent_matrix[16],
57 const float parent_matrix_local[16],
61 float offs_bone[4][4];
62 float (*bone_arm_mat)[4] = (
float (*)[4])matrix_local;
63 float (*parent_pose_mat)[4] = (
float (*)[4])parent_matrix;
64 float (*parent_arm_mat)[4] = (
float (*)[4])parent_matrix_local;
86static void rna_Bone_MatrixFromAxisRoll(
const float axis[3],
float roll,
float r_matrix[9])
91static void rna_Bone_AxisRollFromMatrix(
const float matrix[9],
92 const float axis_override[3],
111static bool rna_BoneCollection_assign_abstract(
BoneCollection *bcoll,
115 bonecoll_assign_func_bone assign_bone,
116 bonecoll_assign_func_ebone assign_ebone)
125 const bool made_any_change = assign_bone(bcoll, pchan->
bone);
126 if (made_any_change) {
129 return made_any_change;
134 const bool made_any_change = assign_bone(bcoll, bone);
135 if (made_any_change) {
138 return made_any_change;
143 const bool made_any_change = assign_ebone(bcoll, ebone);
144 if (made_any_change) {
147 return made_any_change;
151 "%s is not supported, pass a Bone, PoseBone, or EditBone",
161 return rna_BoneCollection_assign_abstract(bcoll,
174 return rna_BoneCollection_assign_abstract(bcoll,
191 "Align the bone to a local-space roll so the Z axis "
192 "points in the direction of the vector given");
212 "Position in 3d space to evaluate",
221 func =
RNA_def_function(srna,
"convert_local_to_pose",
"rna_Bone_convert_local_to_pose");
223 "Transform a matrix from Local to Pose space (or back), taking "
224 "into account options like Inherit Scale and Local Location. "
225 "Unlike Object.convert_space, this uses custom rest and pose "
226 "matrices provided by the caller. If the parent matrices are "
227 "omitted, the bone is assumed to have no parent.");
243 parm,
"",
"The custom pose matrix of the parent bone (PoseBone.matrix)");
247 parm,
"",
"The custom rest matrix of the parent bone (Bone.matrix_local)");
248 RNA_def_boolean(func,
"invert",
false,
"",
"Convert from Pose to Local space");
251 func =
RNA_def_function(srna,
"MatrixFromAxisRoll",
"rna_Bone_MatrixFromAxisRoll");
266 func =
RNA_def_function(srna,
"AxisRollFromMatrix",
"rna_Bone_AxisRollFromMatrix");
268 "Convert a rotational matrix to the axis + roll representation. "
269 "Note that the resulting value of the roll may not be as "
270 "expected if the matrix has shear or negative determinant.");
279 parm,
"",
"The optional override for the axis (finds closest approximation for the matrix)");
298 func,
"bone",
"AnyType",
"",
"Bone, PoseBone, or EditBone to assign to this collection");
305 "Whether the bone was actually assigned; will be false if the bone was "
306 "already member of the collection");
313 func,
"bone",
"AnyType",
"",
"Bone, PoseBone, or EditBone to remove from this collection");
320 "Whether the bone was actually removed; will be false if the bone was "
321 "not a member of the collection to begin with");
C++ functions to deal with Armature collections (i.e. the successor of bone layers).
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)
float distfactor_to_bone(const blender::float3 &position, const blender::float3 &head, const blender::float3 &tail, float radius_head, float radius_tail, float falloff_distance)
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)
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)
CCL_NAMESPACE_BEGIN ccl_device float invert(const float color, const float factor)
MatBase< T, NumCol, NumRow > scale(const MatBase< T, NumCol, NumRow > &mat, const VectorT &scale)
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_main_add_notifier(uint type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)