60 if (data_len_all != 1) {
122 if (i < tc->data_len) {
147 while (sel > unsel) {
176 const bool use_island,
177 const float proj_vec[3])
215 const float *proj_vec =
nullptr;
224 proj_vec = _proj_vec;
229 int td_table_len = 0;
232 for (a = 0; a < tc->data_len; a++, td++) {
246 MEM_mallocN(
sizeof(*td_table) * td_table_len, __func__));
249 KDTree_3d *td_tree = BLI_kdtree_3d_new(td_table_len);
251 int td_table_index = 0;
254 for (a = 0; a < tc->data_len; a++, td++) {
261 BLI_kdtree_3d_insert(td_tree, td_table_index, vec);
262 td_table[td_table_index++] = td;
272 BLI_kdtree_3d_balance(td_tree);
277 for (a = 0; a < tc->data_len; a++, td++) {
281 KDTreeNearest_3d nearest;
282 const int td_index = BLI_kdtree_3d_find_nearest(td_tree, vec, &nearest);
285 if (td_index != -1) {
286 td->
rdist = nearest.dist;
288 copy_v3_v3(td->center, td_table[td_index]->center);
300 BLI_kdtree_3d_free(td_tree);
313 bool changed =
false;
331 const int old_rootbone = data->
rootbone;
332 if ((chainlen == 0) || (chainlen > data->max_rootbone)) {
333 data->rootbone = data->max_rootbone;
336 data->rootbone = chainlen;
338 changed |= (data->rootbone != old_rootbone);
357 else if (mode == -1) {
369 bool changed =
false;
374 if (
ELEM(
nullptr, tc->poseobj, tc->poseobj->pose)) {
400 for (td = head; td <= tail; td++) {
416 if (td + 1 <= tail) {
423 if (next_td !=
nullptr) {
428 if (dist < next_td->dist) {
429 next_td->
dist = dist;
436 if (td - 1 >= head) {
443 if (next_td !=
nullptr) {
448 if (dist < next_td->dist) {
449 next_td->
dist = dist;
463 hdata->
ih1 = bezt->
h1;
464 hdata->
h1 = &bezt->
h1;
465 hdata->
ih2 = bezt->
h2;
466 hdata->
h2 = &bezt->
h2;
487 for (
int a = 0; a < tc->data_len; a++, td++) {
488 if ((td->flag &
TD_SKIP) || (!td->loc)) {
511 r_dir = (center[0] > cframe) ?
'R' :
'L';
535 return (frame >= cframe);
537 return (frame <= cframe);
694 if (tc->data_len == 0) {
737 t->
flag &= ~T_PROP_EDIT_ALL;
807 const short object_type = obact ? obact->
type : -1;
818 if (objects.is_empty()) {
820 params.object_mode = object_mode;
828 objects = local_objects;
835 for (
int i = 0; i < objects.size(); i++) {
994 *r_obj_armature = ob_armature;
1021 Object *ob_armature =
nullptr;
1024 printf(
"edit type not implemented!\n");
1099 for (; md; md = md->
next) {
1111 float mtx[4][4], imtx[4][4];
1117 mul_m4_m4m4(mtx, obinv, ob->object_to_world().ptr());
1122 for (
int i = 0; i < tc->
data_len; i++, td++) {
1123 float loc[3], iloc[3];
1125 if (td->loc ==
nullptr) {
1141 bool is_clipping =
false;
1143 if (
fabsf(iloc[0]) <= mmd->
tolerance || loc[0] * iloc[0] < 0.0f) {
1150 if (
fabsf(iloc[1]) <= mmd->
tolerance || loc[1] * iloc[1] < 0.0f) {
1156 if (
fabsf(iloc[2]) <= mmd->
tolerance || loc[2] * iloc[2] < 0.0f) {
1181 if (
ELEM(
nullptr, scene,
id, sad)) {
1203 const float2 frame_range = adt->
action->wrap().get_frame_range_of_keys(
true);
1204 if (frame_range[1] > frame_range[0] + 2.0f) {
1217 "Expecting un-assigning an action to always work when pushing down an NLA strip");
1228 if (is_first ==
false) {
1257 float delta_x = td->loc[0] - td->iloc[0];
1258 float delta_y = (td->loc[1] - td->iloc[1]) * y_fac;
1266 td2d->
h1[0] = td2d->
ih1[0] + delta_x;
1267 td2d->
h1[1] = td2d->
ih1[1] + delta_y;
1270 td2d->
h2[0] = td2d->
ih2[0] + delta_x;
1271 td2d->
h2[1] = td2d->
ih2[1] + delta_y;
Functions to insert, delete or modify keyframes.
Blender kernel action and pose functionality.
AnimData * BKE_animdata_from_id(const ID *id)
Main * CTX_data_main(const bContext *C)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
blender::Vector< Object * > BKE_view_layer_array_from_objects_in_mode_params(const Scene *scene, ViewLayer *view_layer, const View3D *v3d, const ObjectsInModeParams *params)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
NlaStrip * BKE_nlastack_add_strip(OwnedAnimData owned_adt, bAction *act, bool is_liboverride)
void BKE_nlastrip_validate_fcurves(NlaStrip *strip)
void BKE_scene_graph_evaluated_ensure(Depsgraph *depsgraph, Main *bmain)
#define BLI_assert_msg(a, msg)
A KD-tree for nearest neighbor search.
BLI_LINKSTACK_*** wrapper macros for using a LinkNode to store a stack of pointers,...
#define BLI_LINKSTACK_PUSH(var, ptr)
#define BLI_LINKSTACK_DECLARE(var, type)
#define BLI_LINKSTACK_FREE(var)
#define BLI_LINKSTACK_INIT(var)
#define BLI_LINKSTACK_POP(var)
#define LISTBASE_FOREACH(type, var, list)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
void mul_m3_v3(const float M[3][3], float r[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()
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
bool invert_m3_m3(float inverse[3][3], const float mat[3][3])
void mul_m4_v3(const float M[4][4], float r[3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
void mul_v3_m3v3(float r[3], const float M[3][3], const float a[3])
bool invert_m4_m4_fallback(float inverse[4][4], const float mat[4][4])
MINLINE void sub_v3_v3(float r[3], const float a[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void project_v3_v3v3(float out[3], const float p[3], const float v_proj[3])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
#define UNUSED_VARS_NDEBUG(...)
void DEG_relations_tag_update(Main *bmain)
#define ID_IS_OVERRIDE_LIBRARY(_id)
@ NLASTRIP_FLAG_USR_INFLUENCE
@ NLASTRIP_FLAG_AUTO_BLENDS
@ NLASTRIP_EXTEND_NOTHING
@ CONSTRAINT_TYPE_CHILDOF
@ CONSTRAINT_TYPE_TRANSFORM
@ CONSTRAINT_TYPE_FOLLOWTRACK
@ CONSTRAINT_TYPE_OBJECTSOLVER
@ CONSTRAINT_TYPE_ARMATURE
@ CONSTRAINT_TYPE_ROTLIKE
@ CONSTRAINT_TYPE_KINEMATIC
@ CONSTRAINT_TYPE_TRANSLIKE
@ CONSTRAINT_TYPE_CLAMPTO
@ CONSTRAINT_TYPE_FOLLOWPATH
@ ACTCON_MIX_BEFORE_SPLIT
@ TRANSLIKE_MIX_BEFORE_SPLIT
@ TRANSLIKE_MIX_BEFORE_FULL
#define OB_MODE_ALL_PAINT
#define OB_MODE_ALL_WEIGHT_PAINT
#define OB_MODE_ALL_PAINT_GPENCIL
@ SCE_XFORM_SKIP_CHILDREN
@ AUTOKEY_FLAG_LAYERED_RECORD
@ AUTOKEY_FLAG_INSERTAVAILABLE
@ V3D_AROUND_CENTER_BOUNDS
@ V3D_AROUND_CENTER_MEDIAN
@ V3D_AROUND_LOCAL_ORIGINS
PTCacheEdit * PE_get_current(Depsgraph *depsgraph, Scene *scene, Object *ob)
int PE_start_edit(PTCacheEdit *edit)
bool sequencer_retiming_mode_is_active(const bContext *C)
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
local_group_size(16, 16) .push_constant(Type b
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
ActionSlotAssignmentResult assign_action_slot_handle(NlaStrip &strip, slot_handle_t slot_handle, ID &animated_id)
bool unassign_action(ID &animated_id)
bool is_keying_flag(const Scene *scene, eKeying_Flag flag)
struct Object * mirror_ob
struct ModifierData * next
struct SculptSession * sculpt
void(* create_trans_data)(bContext *C, TransInfo *t)
void(* special_aftertrans_update)(bContext *C, TransInfo *t)
void(* recalc_data)(TransInfo *t)
TransDataCurveHandleFlags * hdata
TransDataContainer * data_container
TransConvertTypeInfo * data_type
struct Object * ob_center