|
Blender V5.0
|
#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_anim_types.h"#include "BLI_ghash.h"#include "BKE_fcurve.hh"Go to the source code of this file.
Classes | |
| struct | FCurvePathCache_Span |
| struct | FCurvePathCache |
Functions | |
F-Curve Path Cache | |
Cache for finding curves by RNA path & array index. | |
| static int | fcurve_cmp_for_cache (const void *fcu_a_p, const void *fcu_b_p) |
| FCurvePathCache * | BKE_fcurve_pathcache_create (blender::Span< FCurve * > fcurves) |
| void | BKE_fcurve_pathcache_destroy (FCurvePathCache *fcache) |
| 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) |
Cache F-Curve look-ups.
Definition in file fcurve_cache.cc.
| FCurvePathCache * BKE_fcurve_pathcache_create | ( | blender::Span< FCurve * > | fcurves | ) |
Cached f-curve look-ups, use when this needs to be done many times.
Definition at line 65 of file fcurve_cache.cc.
References BLI_assert, BLI_ghash_insert(), BLI_ghash_str_new_ex(), FCurvePathCache::fcurve_array, FCurvePathCache::fcurve_array_len, fcurve_cmp_for_cache(), i, FCurvePathCache_Span::index, blender::Span< T >::index_range(), FCurvePathCache_Span::len, MEM_callocN(), MEM_malloc_arrayN(), blender::Span< T >::size(), FCurvePathCache::span_from_rna_path, FCurvePathCache::span_table, and STREQ.
Referenced by BKE_action_flip_with_pose().
| void BKE_fcurve_pathcache_destroy | ( | FCurvePathCache * | fcache | ) |
Definition at line 113 of file fcurve_cache.cc.
References BLI_ghash_free(), FCurvePathCache::fcurve_array, MEM_freeN(), FCurvePathCache::span_from_rna_path, and FCurvePathCache::span_table.
Referenced by BKE_action_flip_with_pose().
| FCurve * BKE_fcurve_pathcache_find | ( | const FCurvePathCache * | fcache, |
| const char * | rna_path, | ||
| const int | array_index ) |
Definition at line 121 of file fcurve_cache.cc.
References BLI_ghash_lookup(), FCurvePathCache::fcurve_array, i, FCurvePathCache_Span::index, FCurvePathCache_Span::len, len, and FCurvePathCache::span_from_rna_path.
| int BKE_fcurve_pathcache_find_array | ( | const FCurvePathCache * | fcache, |
| const char * | rna_path, | ||
| FCurve ** | fcurve_result, | ||
| int | fcurve_result_len ) |
Fill in an array of F-Curve, leave NULL when not found.
Definition at line 145 of file fcurve_cache.cc.
References FCurve::array_index, BLI_ghash_lookup(), FCurvePathCache::fcurve_array, i, FCurvePathCache_Span::index, FCurvePathCache_Span::len, len, and FCurvePathCache::span_from_rna_path.
Referenced by action_flip_pchan_cache_fcurve_assign_array().
|
static |
#qsort callback for an FCurve array.
Definition at line 48 of file fcurve_cache.cc.
References FCurve::array_index, and FCurve::rna_path.
Referenced by BKE_fcurve_pathcache_create().