57 if (data_len_all != 1) {
119 if (i < tc->data_len) {
144 while (sel > unsel) {
179 const float *proj_vec =
NULL;
188 proj_vec = _proj_vec;
193 int td_table_len = 0;
196 for (
a = 0;
a < tc->data_len;
a++, td++) {
212 KDTree_3d *td_tree = BLI_kdtree_3d_new(td_table_len);
214 int td_table_index = 0;
217 for (
a = 0;
a < tc->data_len;
a++, td++) {
224 if (tc->use_local_mat) {
232 if (tc->use_local_mat) {
246 BLI_kdtree_3d_insert(td_tree, td_table_index, vec);
247 td_table[td_table_index++] = td;
257 BLI_kdtree_3d_balance(td_tree);
262 for (
a = 0;
a < tc->data_len;
a++, td++) {
267 if (tc->use_local_mat) {
275 if (tc->use_local_mat) {
289 KDTreeNearest_3d nearest;
290 const int td_index = BLI_kdtree_3d_find_nearest(td_tree, vec, &nearest);
293 if (td_index != -1) {
294 td->
rdist = nearest.dist;
296 copy_v3_v3(td->center, td_table[td_index]->center);
308 BLI_kdtree_3d_free(td_tree);
322 bool changed =
false;
340 const int old_rootbone =
data->rootbone;
341 if ((chainlen == 0) || (chainlen >
data->max_rootbone)) {
342 data->rootbone =
data->max_rootbone;
345 data->rootbone = chainlen;
347 changed |= (
data->rootbone != old_rootbone);
359 short *chainlen = &
t->settings->autoik_chainlen;
367 else if (mode == -1) {
379 bool changed =
false;
384 if (
ELEM(
NULL, tc->poseobj, tc->poseobj->pose)) {
388 for (pchan = tc->poseobj->pose->chanbase.first; pchan; pchan = pchan->
next) {
410 for (td = head; td <= tail; td++) {
426 if (td + 1 <= tail) {
438 if (dist < next_td->dist) {
439 next_td->
dist = dist;
446 if (td - 1 >= head) {
458 if (dist < next_td->dist) {
459 next_td->
dist = dist;
472 hdata->
ih1 = bezt->
h1;
473 hdata->
h1 = &bezt->
h1;
474 hdata->
ih2 = bezt->
h2;
475 hdata->
h2 = &bezt->
h2;
489 for (
int a = 0;
a < tc->data_len;
a++, td++) {
490 if ((td->flag &
TD_SKIP) || (!td->loc)) {
513 r_dir = (
center[0] > cframe) ?
'R' :
'L';
537 return (frame >= cframe);
539 return (frame <= cframe);
574 for (
int i = 0; i < fcu->
totvert; i++) {
583 rk->val += bezt->
vec[1][1];
589 if (rk->frame < bezt->
vec[1][0]) {
596 if (found ==
false) {
600 rk->
val = bezt->
vec[1][1];
611 printf(
"%s: nothing to do for FCurve %p (rna_path = '%s')\n", __func__, fcu, fcu->
rna_path);
618 rk->val = rk->val / (
float)rk->tot_count;
626 for (
int i = fcu->
totvert - 1; i >= 0; i--) {
640 if (rk->del_count == rk->tot_count - 1) {
642 if (can_average_points) {
644 bezt->
vec[1][1] = rk->val;
689 for (con = list->
first; con; con = con->
next) {
778 if (
t->data_len_all == 0 ||
t->mode ==
TFM_DUMMY) {
782 if (!
t->data_type || !
t->data_type->special_aftertrans_update) {
787 t->data_type->special_aftertrans_update(
C,
t);
821 int data_container_len_orig =
t->data_container_len;
823 *tc = &
t->data_container[
t->data_container_len - 1];
826 if (tc->data_len == 0) {
827 uint index = tc -
t->data_container;
828 if (index + 1 !=
t->data_container_len) {
830 t->data_container[index],
831 t->data_container[
t->data_container_len - 1]);
833 t->data_container_len -= 1;
836 t->data_len_all += tc->data_len;
839 if (data_container_len_orig !=
t->data_container_len) {
841 sizeof(*
t->data_container) *
t->data_container_len);
843 return t->data_len_all;
849 if (!
ELEM(
t->data_type,
882 else if (
ELEM(
t->data_type,
919 if (!
ELEM(
t->data_type,
936 const short object_type = obact ? obact->
type : -1;
940 if (
t->data_container) {
944 bool free_objects =
false;
945 if (objects ==
NULL) {
951 .object_mode = object_mode,
953 .no_dup_data = (object_mode & OB_MODE_POSE) == 0,
958 t->data_container =
MEM_callocN(
sizeof(*
t->data_container) * objects_len, __func__);
959 t->data_container_len = objects_len;
961 for (
int i = 0; i < objects_len; i++) {
1042 else if (
t->obedit_type ==
OB_MESH) {
1074 if (
t->obedit_type != -1) {
1104 *r_obj_armature = ob_armature;
1132 t->data_len_all = -1;
1136 if (
t->data_type ==
NULL) {
1137 printf(
"edit type not implemented!\n");
1139 t->data_len_all = 0;
1143 t->flag |=
t->data_type->flags;
1191 t->obedit_type = -1;
1193 t->data_type->createTransData(
C,
t);
1211 float tolerance[3] = {0.0f, 0.0f, 0.0f};
1214 for (; md; md = md->
next) {
1233 float mtx[4][4], imtx[4][4];
1245 for (i = 0; i < tc->
data_len; i++, td++) {
1247 float loc[3], iloc[3];
1249 if (td->loc ==
NULL) {
1267 if (
fabsf(iloc[0]) <= tolerance[0] || loc[0] * iloc[0] < 0.0f) {
1274 if (
fabsf(iloc[1]) <= tolerance[1] || loc[1] * iloc[1] < 0.0f) {
1280 if (
fabsf(iloc[2]) <= tolerance[2] || loc[2] * iloc[2] < 0.0f) {
1330 if (aend > astart + 2.0f) {
1346 if (is_first ==
false) {
1377 float delta_x = td->loc[0] - td->iloc[0];
1378 float delta_y = (td->loc[1] - td->iloc[1]) * y_fac;
1386 td2d->
h1[0] = td2d->
ih1[0] + delta_x;
1387 td2d->
h1[1] = td2d->
ih1[1] + delta_y;
1390 td2d->
h2[0] = td2d->
ih2[0] + delta_x;
1391 td2d->
h2[1] = td2d->
ih2[1] + delta_y;
1397 if (!
t->data_type || !
t->data_type->recalcData) {
1400 t->data_type->recalcData(
t);
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
void calc_action_range(const struct bAction *act, float *start, float *end, short incl_modifiers)
struct AnimData * BKE_animdata_from_id(const struct ID *id)
struct Main * CTX_data_main(const bContext *C)
void testhandles_fcurve(struct FCurve *fcu, eBezTriple_Flag sel_flag, bool use_handle)
#define BEZT_BINARYSEARCH_THRESH
void BKE_fcurve_delete_key(struct FCurve *fcu, int index)
#define BKE_view_layer_array_from_objects_in_mode(view_layer, v3d, r_len,...)
void id_us_min(struct ID *id)
void BKE_nlastrip_validate_fcurves(struct NlaStrip *strip)
struct NlaStrip * BKE_nlastack_add_strip(struct AnimData *adt, struct bAction *act, bool is_liboverride)
void BKE_scene_graph_evaluated_ensure(struct Depsgraph *depsgraph, struct Main *bmain)
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)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
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])
bool invert_m4_m4_fallback(float R[4][4], const float A[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_m4_m4(float R[4][4], const float A[4][4])
void mul_m4_v3(const float M[4][4], float r[3])
bool invert_m3_m3(float R[3][3], const float A[3][3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
void mul_v3_m3v3(float r[3], const float M[3][3], const float a[3])
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
void DEG_relations_tag_update(struct 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 BEZT_ISSEL_ANY(bezt)
#define OB_MODE_ALL_PAINT
#define OB_MODE_ALL_WEIGHT_PAINT
@ SCE_XFORM_SKIP_CHILDREN
#define OBACT(_view_layer)
@ ANIMRECORD_FLAG_WITHNLA
@ V3D_AROUND_CENTER_BOUNDS
@ V3D_AROUND_CENTER_MEDIAN
@ V3D_AROUND_LOCAL_ORIGINS
#define IS_AUTOKEY_FLAG(scene, flag)
int PE_start_edit(struct PTCacheEdit *edit)
struct PTCacheEdit * PE_get_current(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
struct Object * mirror_ob
struct ModifierData * next
struct SculptSession * sculpt
struct ToolSettings * toolsettings
void(* createTransData)(bContext *C, TransInfo *t)
TransDataCurveHandleFlags * hdata
struct Object * ob_center
struct bConstraint * next
struct bPoseChannel * next
struct tRetainedKeyframe * prev
struct tRetainedKeyframe * next