Blender  V2.59
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"

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_r, const MDeformVert *dvert)
void defvert_sync (MDeformVert *dvert_r, const MDeformVert *dvert, int use_verify)
void defvert_sync_mapped (MDeformVert *dvert_r, const MDeformVert *dvert, const int *flip_map, int use_verify)
void defvert_remap (MDeformVert *dvert, int *map)
void defvert_normalize (MDeformVert *dvert)
void defvert_flip (MDeformVert *dvert, const int *flip_map)
bDeformGroupdefgroup_find_name (Object *ob, const char *name)
int defgroup_name_index (Object *ob, const char *name)
int defgroup_find_index (Object *ob, bDeformGroup *dg)
int * defgroup_flip_map (Object *ob, int use_default)
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 group_num)
float defvert_array_find_weight_safe (const struct MDeformVert *dvert, int index, int group_num)
MDeformWeightdefvert_find_index (const MDeformVert *dvert, const int defgroup)
MDeformWeightdefvert_verify_index (MDeformVert *dv, const int defgroup)

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 54 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 66 of file deform.c.

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

Referenced by defgroup_copy_list(), and vgroup_duplicate().

int defgroup_find_index ( Object ob,
bDeformGroup dg 
)
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 311 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  use_default 
)
int defgroup_name_index ( Object ob,
const char *  name 
)
static int defgroup_unique_check ( void *  arg,
const char *  name 
) [static]

Definition at line 326 of file deform.c.

References defgroup_find_name_dupe().

Referenced by defgroup_unique_name().

void defgroup_unique_name ( bDeformGroup dg,
Object ob 
)
float defvert_array_find_weight_safe ( const struct MDeformVert dvert,
int  index,
int  group_num 
)
void defvert_copy ( MDeformVert dvert_r,
const MDeformVert dvert 
)

Definition at line 84 of file deform.c.

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

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

Definition at line 471 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  group_num 
)
void defvert_flip ( MDeformVert dvert,
const int *  flip_map 
)

Definition at line 173 of file deform.c.

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

Referenced by doMirrorOnAxis(), and dvert_mirror_op().

void defvert_normalize ( MDeformVert dvert)

Definition at line 151 of file deform.c.

References MDeformVert::dw, i, MDeformVert::totweight, and MDeformWeight::weight.

Referenced by vgroup_normalize_active().

void defvert_remap ( MDeformVert dvert,
int *  map 
)

Definition at line 142 of file deform.c.

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

Referenced by vgroup_do_remap().

void defvert_sync ( MDeformVert dvert_r,
const MDeformVert dvert,
int  use_verify 
)
void defvert_sync_mapped ( MDeformVert dvert_r,
const MDeformVert dvert,
const int *  flip_map,
int  use_verify 
)
MDeformWeight* defvert_verify_index ( MDeformVert dv,
const int  defgroup 
) [read]
void flip_side_name ( char  name[MAX_VGROUP_NAME],
const char  from_name[MAX_VGROUP_NAME],
int  strip_number 
)