Blender V2.61 - r43446
Defines | Functions

deform.c File Reference

#include <string.h>
#include <math.h>
#include "ctype.h"
#include "MEM_guardedalloc.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BKE_deform.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Defines

#define IS_SEPARATOR(a)   ((a)=='.' || (a)==' ' || (a)=='-' || (a)=='_')

Functions

void defgroup_copy_list (ListBase *outbase, ListBase *inbase)
bDeformGroupdefgroup_duplicate (bDeformGroup *ingroup)
void defvert_copy (MDeformVert *dvert_dst, const MDeformVert *dvert_src)
void defvert_copy_index (MDeformVert *dvert_dst, const MDeformVert *dvert_src, const int defgroup)
void defvert_sync (MDeformVert *dvert_dst, const MDeformVert *dvert_src, int use_verify)
void defvert_sync_mapped (MDeformVert *dvert_dst, const MDeformVert *dvert_src, const int *flip_map, const int flip_map_len, const int use_verify)
void defvert_remap (MDeformVert *dvert, int *map, const int map_len)
void defvert_normalize (MDeformVert *dvert)
void defvert_normalize_lock (MDeformVert *dvert, const int def_nr_lock)
void defvert_flip (MDeformVert *dvert, const int *flip_map, const int flip_map_len)
bDeformGroupdefgroup_find_name (Object *ob, const char *name)
int defgroup_name_index (Object *ob, const char *name)
int * defgroup_flip_map (Object *ob, int *flip_map_len, int use_default)
int * defgroup_flip_map_single (Object *ob, int *flip_map_len, int use_default, int defgroup)
int defgroup_flip_index (Object *ob, int index, int use_default)
static int defgroup_find_name_dupe (const char *name, bDeformGroup *dg, Object *ob)
static int defgroup_unique_check (void *arg, const char *name)
void defgroup_unique_name (bDeformGroup *dg, Object *ob)
void flip_side_name (char name[MAX_VGROUP_NAME], const char from_name[MAX_VGROUP_NAME], int strip_number)
float defvert_find_weight (const struct MDeformVert *dvert, const int defgroup)
float defvert_array_find_weight_safe (const struct MDeformVert *dvert, const int index, const int defgroup)
MDeformWeightdefvert_find_index (const MDeformVert *dvert, const int defgroup)
MDeformWeightdefvert_verify_index (MDeformVert *dvert, const int defgroup)
void defvert_add_index_notest (MDeformVert *dvert, int defgroup, const float weight)
void defvert_remove_group (MDeformVert *dvert, MDeformWeight *dw)

Detailed Description

Definition in file deform.c.


Define Documentation

#define IS_SEPARATOR (   a)    ((a)=='.' || (a)==' ' || (a)=='-' || (a)=='_')

Referenced by flip_side_name().


Function Documentation

void defgroup_copy_list ( ListBase outbase,
ListBase inbase 
)

Definition at line 48 of file deform.c.

References BLI_addtail(), defgroup_duplicate(), ListBase::first, ListBase::last, bDeformGroup::next, and NULL.

Referenced by copy_object().

bDeformGroup* defgroup_duplicate ( bDeformGroup ingroup) [read]

Definition at line 60 of file deform.c.

References MEM_callocN(), bDeformGroup::next, NULL, and bDeformGroup::prev.

Referenced by defgroup_copy_list(), and vgroup_duplicate().

bDeformGroup* defgroup_find_name ( Object ob,
const char *  name 
) [read]
static int defgroup_find_name_dupe ( const char *  name,
bDeformGroup dg,
Object ob 
) [static]

Definition at line 387 of file deform.c.

References Object::defbase, ListBase::first, bDeformGroup::name, and bDeformGroup::next.

Referenced by defgroup_unique_check().

int defgroup_flip_index ( Object ob,
int  index,
int  use_default 
)
int* defgroup_flip_map ( Object ob,
int *  flip_map_len,
int  use_default 
)
int* defgroup_flip_map_single ( Object ob,
int *  flip_map_len,
int  use_default,
int  defgroup 
)
int defgroup_name_index ( Object ob,
const char *  name 
)
static int defgroup_unique_check ( void *  arg,
const char *  name 
) [static]

Definition at line 402 of file deform.c.

References data, and defgroup_find_name_dupe().

Referenced by defgroup_unique_name().

void defgroup_unique_name ( bDeformGroup dg,
Object ob 
)
void defvert_add_index_notest ( MDeformVert dvert,
int  defgroup,
const float  weight 
)
float defvert_array_find_weight_safe ( const struct MDeformVert dvert,
const int  index,
const int  defgroup 
)
void defvert_copy ( MDeformVert dvert_dst,
const MDeformVert dvert_src 
)

Definition at line 78 of file deform.c.

References MDeformVert::dw, MEM_dupallocN(), MEM_freeN(), NULL, and MDeformVert::totweight.

void defvert_copy_index ( MDeformVert dvert_dst,
const MDeformVert dvert_src,
const int  defgroup 
)

Definition at line 101 of file deform.c.

References defvert_find_index(), defvert_verify_index(), and MDeformWeight::weight.

MDeformWeight* defvert_find_index ( const MDeformVert dvert,
const int  defgroup 
)

Definition at line 557 of file deform.c.

References MDeformWeight::def_nr, MDeformVert::dw, i, NULL, and MDeformVert::totweight.

float defvert_find_weight ( const struct MDeformVert dvert,
const int  defgroup 
)
void defvert_flip ( MDeformVert dvert,
const int *  flip_map,
const int  flip_map_len 
)

Definition at line 249 of file deform.c.

References MDeformWeight::def_nr, MDeformVert::dw, and i.

Referenced by doMirrorOnAxis(), and dvert_mirror_op().

void defvert_normalize ( MDeformVert dvert)
void defvert_normalize_lock ( MDeformVert dvert,
const int  def_nr_lock 
)
void defvert_remap ( MDeformVert dvert,
int *  map,
const int  map_len 
)

Definition at line 164 of file deform.c.

References BLI_assert, MDeformWeight::def_nr, MDeformVert::dw, i, and MDeformVert::totweight.

Referenced by vgroup_do_remap().

void defvert_remove_group ( MDeformVert dvert,
MDeformWeight dw 
)
void defvert_sync ( MDeformVert dvert_dst,
const MDeformVert dvert_src,
int  use_verify 
)
void defvert_sync_mapped ( MDeformVert dvert_dst,
const MDeformVert dvert_src,
const int *  flip_map,
const int  flip_map_len,
const int  use_verify 
)
MDeformWeight* defvert_verify_index ( MDeformVert dvert,
const int  defgroup 
) [read]
void flip_side_name ( char  name[MAX_VGROUP_NAME],
const char  from_name[MAX_VGROUP_NAME],
int  strip_number 
)