67 const uint fcurve_array_len = fcurves.
size();
70 fcurve_array[
i] = fcurves[
i];
84 while (
i < fcurve_array_len) {
86 for (i_end =
i + 1; i_end < fcurve_array_len; i_end++) {
88 if (fcurve_array[
i]->array_index > fcurve_array[i_end]->array_index) {
89 BLI_assert(!
STREQ(fcurve_array[
i]->rna_path, fcurve_array[i_end]->rna_path));
92 if (!
STREQ(fcurve_array[
i]->rna_path, fcurve_array[i_end]->rna_path)) {
99 span->
len = i_end -
i;
122 const char *rna_path,
123 const int array_index)
127 if (span ==
nullptr) {
133 for (
int i = 0;
i <
len;
i++) {
134 if (fcurve[
i]->array_index == array_index) {
138 if (fcurve[
i]->array_index > array_index) {
146 const char *rna_path,
148 int fcurve_result_len)
150 memset(fcurve_result, 0x0,
sizeof(*fcurve_result) * fcurve_result_len);
154 if (span ==
nullptr) {
161 for (
int i = 0;
i <
len;
i++) {
163 if (
uint(fcurve[
i]->array_index) >
uint(fcurve_result_len)) {
GHash * BLI_ghash_str_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
Read Guarded memory(de)allocation.
constexpr int64_t size() const
constexpr IndexRange index_range() const
void BKE_fcurve_pathcache_destroy(FCurvePathCache *fcache)
FCurvePathCache * BKE_fcurve_pathcache_create(blender::Span< FCurve * > fcurves)
static int fcurve_cmp_for_cache(const void *fcu_a_p, const void *fcu_b_p)
FCurve * BKE_fcurve_pathcache_find(const FCurvePathCache *fcache, const char *rna_path, const int array_index)
int BKE_fcurve_pathcache_find_array(const FCurvePathCache *fcache, const char *rna_path, FCurve **fcurve_result, int fcurve_result_len)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
GHash * span_from_rna_path
FCurvePathCache_Span * span_table