64 if (data_len_all != 1) {
100 std::ranges::sort(sorted_index_span, compare);
111 const auto compare = [&](
const int a,
const int b) {
116 if (is_selected_a && is_selected_b) {
155 "Expected sorting by selection state to only happen once");
157 const auto compare = [&](
const int a,
const int b) {
163 if (is_selected_a == is_selected_b) {
169 return is_selected_a;
182 const bool use_island,
183 const float proj_vec[3])
222 const float *proj_vec =
nullptr;
231 proj_vec = _proj_vec;
236 int td_table_len = 0;
248 int td_table_index = 0;
258 td_table[td_table_index++] = td;
279 if (td_index != -1) {
296 MEM_delete(td_table);
308 bool changed =
false;
329 const int old_rootbone =
data->rootbone;
330 if ((chainlen == 0) || (chainlen >
data->max_rootbone)) {
331 data->rootbone =
data->max_rootbone;
334 data->rootbone = chainlen;
336 changed |= (
data->rootbone != old_rootbone);
354 else if (mode == -1) {
366 bool changed =
false;
397 for (td = head; td <= tail; td++) {
413 if (td + 1 <= tail) {
420 if (next_td !=
nullptr) {
425 if (dist < next_td->dist) {
426 next_td->
dist = dist;
433 if (td - 1 >= head) {
440 if (next_td !=
nullptr) {
445 if (dist < next_td->dist) {
446 next_td->
dist = dist;
459 hdata->
ih1 = bezt->
h1;
460 hdata->
h1 = &bezt->
h1;
461 hdata->
ih2 = bezt->
h2;
462 hdata->
h2 = &bezt->
h2;
483 for (
int a = 0; a < tc->
data_len; a++, td++) {
510 dir = (center[0] > cframe) ?
'R' :
'L';
534 return (frame >= cframe);
536 return (frame <= cframe);
834 const short object_type = obact ? obact->
type : -1;
856 objects = local_objects;
862 for (
int i = 0; i < objects.
size(); i++) {
865 tc->use_mirror_axis_x = ((id_cast<Mesh *>(objects[i]->
data))->symmetry &
ME_SYMMETRY_X) !=
867 tc->use_mirror_axis_y = ((id_cast<Mesh *>(objects[i]->
data))->symmetry &
ME_SYMMETRY_Y) !=
869 tc->use_mirror_axis_z = ((id_cast<Mesh *>(objects[i]->
data))->symmetry &
ME_SYMMETRY_Z) !=
1021 *r_obj_armature = ob_armature;
1053 Object *ob_armature =
nullptr;
1056 printf(
"edit type not implemented!\n");
1135 for (; md; md = md->
next) {
1147 float mtx[4][4], imtx[4][4];
1153 mul_m4_m4m4(mtx, obinv, ob->object_to_world().ptr());
1158 for (
int i = 0; i < tc->
data_len; i++, td++) {
1159 float loc[3], iloc[3];
1161 if (td->
loc ==
nullptr) {
1177 bool is_clipping =
false;
1179 if (
fabsf(iloc[0]) <= mmd->
tolerance || loc[0] * iloc[0] < 0.0f) {
1186 if (
fabsf(iloc[1]) <= mmd->
tolerance || loc[1] * iloc[1] < 0.0f) {
1192 if (
fabsf(iloc[2]) <= mmd->
tolerance || loc[2] * iloc[2] < 0.0f) {
1218 if (
ELEM(
nullptr, scene,
id, sad)) {
1234 const bool is_first = (adt) && (adt->
nla_tracks.first_ ==
nullptr);
1240 const float2 frame_range = adt->
action->wrap().get_frame_range_of_keys(
true);
1241 if (frame_range[1] > frame_range[0] + 2.0f) {
1253 "Expecting un-assigning an action to always work when pushing down an NLA strip");
1264 if (is_first ==
false) {
1293 float delta_x = td->
loc[0] - td->
iloc[0];
1294 float delta_y = (td->
loc[1] - td->
iloc[1]) * y_fac;
1302 td2d->
h1[0] = td2d->
ih1[0] + delta_x;
1303 td2d->
h1[1] = td2d->
ih1[1] + delta_y;
1306 td2d->
h2[0] = td2d->
ih2[0] + delta_x;
1307 td2d->
h2[1] = td2d->
ih2[1] + delta_y;
Functions to insert, delete or modify keyframes.
Blender kernel action and pose functionality.
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 ID_IS_OVERRIDE_LIBRARY(_id)
#define OB_MODE_ALL_PAINT_MESH
#define OB_MODE_ALL_WEIGHT_PAINT
Read Blender memory allocation and freeing.
#define UNUSED_VARS_NDEBUG(...)
#define BLI_assert_msg(a, msg)
#define MEM_realloc_uninitialized(vmemh, len)
constexpr int64_t size() const
constexpr bool is_empty() const
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)
void fill_index_range(MutableSpan< T > span, const T start=0)
bool retiming_keys_are_selected(const Scene *scene)
void view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
MINLINE float min_ff(float a, float b)
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void mul_m3_v3(const float M[3][3], float r[3])
void kdtree_balance(KDTree< CoordT > *tree)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
void copy_m3_m4(float m1[3][3], const float m2[4][4])
@ SCE_XFORM_SKIP_CHILDREN
@ CONSTRAINT_TYPE_FOLLOWTRACK
@ CONSTRAINT_TYPE_KINEMATIC
@ CONSTRAINT_TYPE_TRANSFORM
@ CONSTRAINT_TYPE_FOLLOWPATH
@ CONSTRAINT_TYPE_ROTLIKE
@ CONSTRAINT_TYPE_ARMATURE
@ CONSTRAINT_TYPE_CLAMPTO
@ CONSTRAINT_TYPE_OBJECTSOLVER
@ CONSTRAINT_TYPE_CHILDOF
@ CONSTRAINT_TYPE_TRANSLIKE
void copy_m3_m3(float m1[3][3], const float m2[3][3])
bool invert_m4_m4_fallback(float inverse[4][4], const float mat[4][4])
@ NLASTRIP_FLAG_USR_INFLUENCE
@ NLASTRIP_FLAG_AUTO_BLENDS
bool invert_m3_m3(float inverse[3][3], const float mat[3][3])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
@ NLASTRIP_EXTEND_NOTHING
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
@ V3D_AROUND_CENTER_BOUNDS
@ V3D_AROUND_LOCAL_ORIGINS
@ V3D_AROUND_CENTER_MEDIAN
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void BKE_scene_graph_evaluated_ensure(Depsgraph *depsgraph, Main *bmain)
void BKE_nlastrip_validate_fcurves(NlaStrip *strip)
void project_v3_v3v3(float out[3], const float p[3], const float v_proj[3])
MINLINE void sub_v3_v3(float r[3], const float a[3])
KDTree< CoordT > * kdtree_new(uint nodes_len_capacity)
void mul_m4_v3(const float M[4][4], float r[3])
AnimData * BKE_animdata_from_id(const ID *id)
VecBase< float, 2 > float2
PTCacheEdit * PE_get_current(Depsgraph *depsgraph, Scene *scene, Object *ob)
bool BKE_constraint_has_influence(const struct bConstraint *con)
@ OB_MODE_VERTEX_GREASE_PENCIL
@ OB_MODE_SCULPT_GREASE_PENCIL
@ OB_MODE_WEIGHT_GREASE_PENCIL
@ OB_MODE_PAINT_GREASE_PENCIL
BMesh const char void * data
Vector< Object * > BKE_view_layer_array_from_objects_in_mode_params(const Main &bmain, const Scene *scene, ViewLayer *view_layer, const View3D *v3d, const ObjectsInModeParams *params)
void kdtree_insert(KDTree< CoordT > *tree, int index, const CoordT &co)
int kdtree_find_nearest(const KDTree< CoordT > *tree, const CoordT &co, KDTreeNearest< CoordT > *r_nearest)
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
@ ACTCON_MIX_BEFORE_SPLIT
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
void normalize_m3_m3(float R[3][3], const float M[3][3]) ATTR_NONNULL()
MINLINE float normalize_v3_v3(float r[3], const float a[3])
void kdtree_free(KDTree< CoordT > *tree)
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
Main * CTX_data_main(const bContext *C)
MINLINE float max_ff(float a, float b)
void DEG_relations_tag_update(Main *bmain)
NlaStrip * BKE_nlastack_add_strip(OwnedAnimData owned_adt, const bool is_liboverride)
@ AUTOKEY_FLAG_INSERTAVAILABLE
@ AUTOKEY_FLAG_LAYERED_RECORD
void copy_m4_m4(float m1[4][4], const float m2[4][4])
int PE_start_edit(PTCacheEdit *edit)
VecBase< float, 3 > float3
@ TRANSLIKE_MIX_BEFORE_SPLIT
@ TRANSLIKE_MIX_BEFORE_FULL
void mul_v3_m3v3(float r[3], const float M[3][3], const float a[3])
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
eNlaStrip_Blend_Mode act_blendmode
eNlaStrip_Extrapolate_Mode act_extendmode
ListBaseT< NlaTrack > nla_tracks
struct Object * mirror_ob
struct ModifierData * next
eNlaStrip_Blend_Mode blendmode
eNlaStrip_Extrapolate_Mode extendmode
ListBaseT< ModifierData > modifiers
bke::ObjectRuntime * runtime
eRegionView3D_Persp persp
struct ToolSettings * toolsettings
struct Object * ob_center
ListBaseT< struct bConstraint > constraints
ePchan_ConstFlag constflag
ListBaseT< bPoseChannel > chanbase
SculptSession * sculpt_session