Blender  V3.3
Classes
fcurve_cache.c File Reference
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BKE_fcurve.h"

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)
 
struct FCurvePathCacheBKE_fcurve_pathcache_create (ListBase *list)
 
void BKE_fcurve_pathcache_destroy (struct FCurvePathCache *fcache)
 
FCurveBKE_fcurve_pathcache_find (struct FCurvePathCache *fcache, const char *rna_path, const int array_index)
 
int BKE_fcurve_pathcache_find_array (struct FCurvePathCache *fcache, const char *rna_path, FCurve **fcurve_result, int fcurve_result_len)
 

Detailed Description

Cache F-Curve look-ups.

Definition in file fcurve_cache.c.

Function Documentation

◆ BKE_fcurve_pathcache_create()

struct FCurvePathCache* BKE_fcurve_pathcache_create ( ListBase list)

◆ BKE_fcurve_pathcache_destroy()

void BKE_fcurve_pathcache_destroy ( struct FCurvePathCache fcache)

◆ BKE_fcurve_pathcache_find()

FCurve* BKE_fcurve_pathcache_find ( struct FCurvePathCache fcache,
const char *  rna_path,
const int  array_index 
)

◆ BKE_fcurve_pathcache_find_array()

int BKE_fcurve_pathcache_find_array ( struct FCurvePathCache fcache,
const char *  rna_path,
struct FCurve **  fcurve_result,
int  fcurve_result_len 
)

Fill in an array of F-Curve, leave NULL when not found.

Returns
The number of F-Curves found.

Definition at line 144 of file fcurve_cache.c.

References FCurve::array_index, BLI_ghash_lookup(), FCurvePathCache::fcurve_array, FCurvePathCache_Span::index, FCurvePathCache_Span::len, len, NULL, and FCurvePathCache::span_from_rna_path.

Referenced by action_flip_pchan_cache_fcurve_assign_array().

◆ fcurve_cmp_for_cache()

static int fcurve_cmp_for_cache ( const void fcu_a_p,
const void fcu_b_p 
)
static

#qsort callback for an FCurve array.

Definition at line 47 of file fcurve_cache.c.

References FCurve::array_index, and FCurve::rna_path.

Referenced by BKE_fcurve_pathcache_create().