34 static float rna_PoseBone_do_envelope(
bPoseChannel *chan,
float vec[3])
48 static void rna_PoseBone_bbone_segment_matrix(
61 reports,
RPT_ERROR,
"Invalid index %d for B-Bone segments of '%s'!", index, pchan->
name);
73 static void rna_PoseBone_compute_bbone_handles(
bPoseChannel *pchan,
92 &
params, ret_h1, ret_roll1, ret_h2, ret_roll2, ease || offsets, offsets);
95 static void rna_Pose_apply_pose_from_action(
ID *pose_owner,
98 const float evaluation_time)
118 func =
RNA_def_function(srna,
"apply_pose_from_action",
"rna_Pose_apply_pose_from_action");
122 "Apply the given action to this pose by evaluating it at a specific time. Only updates the "
123 "pose of selected bones, or all bones if none are selected.");
125 parm =
RNA_def_pointer(func,
"action",
"Action",
"Action",
"The Action containing the pose");
134 "Time at which the given action is evaluated to obtain the pose",
144 func =
RNA_def_function(srna,
"evaluate_envelope",
"rna_PoseBone_do_envelope");
153 "Position in 3d space to evaluate",
159 func,
"factor", 0, -FLT_MAX, FLT_MAX,
"Factor",
"Envelope factor", -FLT_MAX, FLT_MAX);
163 func =
RNA_def_function(srna,
"bbone_segment_matrix",
"rna_PoseBone_bbone_segment_matrix");
165 func,
"Retrieve the matrix of the joint between B-Bone segments if available");
171 parm =
RNA_def_int(func,
"index", 0, 0, INT_MAX,
"",
"Index of the segment endpoint", 0, 10000);
173 parm =
RNA_def_boolean(func,
"rest",
false,
"",
"Return the rest pose matrix");
176 func =
RNA_def_function(srna,
"compute_bbone_handles",
"rna_PoseBone_compute_bbone_handles");
178 func,
"Retrieve the vectors and rolls coming from B-Bone custom handles");
183 parm,
"",
"The direction vector of the start handle in bone local space");
186 func,
"roll1", 0, -FLT_MAX, FLT_MAX,
"",
"Roll of the start handle", -FLT_MAX, FLT_MAX);
193 func,
"roll2", 0, -FLT_MAX, FLT_MAX,
"",
"Roll of the end handle", -FLT_MAX, FLT_MAX);
195 parm =
RNA_def_boolean(func,
"rest",
false,
"",
"Return the rest pose state");
196 parm =
RNA_def_boolean(func,
"ease",
false,
"",
"Apply scale from ease values");
198 func,
"offsets",
false,
"",
"Apply roll and curve offsets from bone properties");
void BKE_pose_apply_action_selected_bones(struct Object *ob, struct bAction *action, struct AnimationEvalContext *anim_eval_context)
float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float rad1, float rad2, float rdist)
void BKE_pchan_bbone_spline_params_get(struct bPoseChannel *pchan, bool rest, struct BBoneSplineParameters *r_param)
void BKE_pchan_bbone_handles_compute(const BBoneSplineParameters *param, float h1[3], float *r_roll1, float h2[3], float *r_roll2, bool ease, bool offsets)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void DEG_id_tag_update(struct ID *id, int flag)
Object is a sort of wrapper for general info.
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)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, 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[])
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)
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)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_api_pose(StructRNA *srna)
void RNA_api_pose_channel(StructRNA *srna)
struct Mat4 * bbone_pose_mats
struct Mat4 * bbone_rest_mats
struct bPoseChannel_Runtime runtime
void WM_event_add_notifier(const bContext *C, uint type, void *reference)