diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-31 10:13:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-31 10:13:20 +0400 |
commit | 797d2bbd8894462d19f0eda4d9bf818e477f7112 (patch) | |
tree | 880d8676fe8ba9a480f68448144bb40c9645f676 /source/blender | |
parent | 9905094f5da957f7c4ae14ed9ce6e043e5b30ac3 (diff) |
use_verify option to defvert_sync_mapped and defvert_sync was flipped, also minor edits to defvert_verify_index() - no functional change.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/deform.c | 26 | ||||
-rw-r--r-- | source/blender/editors/mesh/editface.c | 1 | ||||
-rw-r--r-- | source/blender/python/BPY_extern.h | 18 |
3 files changed, 18 insertions, 27 deletions
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index a9610023775..83eda860510 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -104,8 +104,8 @@ void defvert_sync (MDeformVert *dvert_r, const MDeformVert *dvert, int use_verif MDeformWeight *dw; for(i=0, dw=dvert->dw; i < dvert->totweight; i++, dw++) { MDeformWeight *dw_r; - if(use_verify) dw_r= defvert_find_index(dvert_r, dw->def_nr); - else dw_r= defvert_verify_index(dvert_r, dw->def_nr); + if(use_verify) dw_r= defvert_verify_index(dvert_r, dw->def_nr); + else dw_r= defvert_find_index(dvert_r, dw->def_nr); if(dw_r) { dw_r->weight= dw->weight; @@ -123,8 +123,8 @@ void defvert_sync_mapped (MDeformVert *dvert_r, const MDeformVert *dvert, const for (i=0, dw=dvert->dw; i < dvert->totweight; i++, dw++) { if (dw->def_nr < flip_map_len) { MDeformWeight *dw_r; - if(use_verify) dw_r= defvert_find_index(dvert_r, flip_map[dw->def_nr]); - else dw_r= defvert_verify_index(dvert_r, flip_map[dw->def_nr]); + if(use_verify) dw_r= defvert_verify_index(dvert_r, flip_map[dw->def_nr]); + else dw_r= defvert_find_index(dvert_r, flip_map[dw->def_nr]); if(dw_r) { dw_r->weight= dw->weight; @@ -487,25 +487,25 @@ MDeformWeight *defvert_verify_index(MDeformVert *dv, const int defgroup) MDeformWeight *newdw; /* do this check always, this function is used to check for it */ - if(!dv || defgroup<0) + if(!dv || defgroup < 0) return NULL; - newdw = defvert_find_index(dv, defgroup); + newdw= defvert_find_index(dv, defgroup); if(newdw) return newdw; - newdw = MEM_callocN(sizeof(MDeformWeight)*(dv->totweight+1), "deformWeight"); - if(dv->dw) { + newdw= MEM_callocN(sizeof(MDeformWeight)*(dv->totweight+1), "deformWeight"); + if (dv->dw) { memcpy(newdw, dv->dw, sizeof(MDeformWeight)*dv->totweight); MEM_freeN(dv->dw); } - dv->dw=newdw; - - dv->dw[dv->totweight].weight=0.0f; - dv->dw[dv->totweight].def_nr=defgroup; + dv->dw= newdw; + newdw += dv->totweight; + newdw->weight= 0.0f; + newdw->def_nr= defgroup; /* Group index */ dv->totweight++; - return dv->dw+(dv->totweight-1); + return newdw; } diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 279657e71c2..02d20e64bc3 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -346,7 +346,6 @@ void paintface_select_linked(bContext *UNUSED(C), Object *ob, int UNUSED(mval[2] paintface_flush_flags(ob); } -/* note: caller needs to run paintface_flush_flags(ob) after this */ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags) { Mesh *me; diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index c43a2520bb8..d8ddcd593a8 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -20,7 +20,10 @@ * * The Original Code was in: source/blender/bpython/include/BPY_extern.h * - * Contributor(s): Michel Selten, Willian P. Germano, Chris Keith + * Contributor(s): Michel Selten, + * Willian P. Germano, + * Chris Keith, + * Campbell Barton * * ***** END GPL LICENSE BLOCK ***** */ @@ -39,14 +42,10 @@ struct ID; /* DNA_ID.h */ struct Object; /* DNA_object_types.h */ struct ChannelDriver; /* DNA_anim_types.h */ struct ListBase; /* DNA_listBase.h */ -struct SpaceText; /* DNA_space_types.h */ -struct ScrArea; /* DNA_screen_types.h */ -struct bScreen; /* DNA_screen_types.h */ struct bConstraint; /* DNA_constraint_types.h */ struct bPythonConstraint; /* DNA_constraint_types.h */ struct bConstraintOb; /* DNA_constraint_types.h */ struct bConstraintTarget; /* DNA_constraint_types.h*/ -struct BPyMenu; struct bContext; struct bContextDataResult; struct ReportList; @@ -61,16 +60,9 @@ void BPY_pyconstraint_target(struct bPythonConstraint *con, struct bConstraintTa void BPY_pyconstraint_update(struct Object *owner, struct bConstraint *con); int BPY_is_pyconstraint(struct Text *text); // void BPY_free_pyconstraint_links(struct Text *text); -// + void BPY_python_start(int argc, const char **argv); void BPY_python_end(void); -// void init_syspath(int first_time); -// void syspath_append(char *dir); -// void BPY_rebuild_syspath(void); -// int BPY_path_update(void); -// -// int BPY_Err_getLinenumber(void); -// const char *BPY_Err_getFilename(void); /* 2.5 UI Scripts */ int BPY_filepath_exec(struct bContext *C, const char *filepath, struct ReportList *reports); |