diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-15 12:43:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-15 12:43:17 +0400 |
commit | f294b3b082ee239df54e3fcd49d6f5611fdeee72 (patch) | |
tree | 499803fdf0eb43ee2fe4e9fcfc9d84467d10083e /source/blender/blenkernel/intern | |
parent | d1f90abfa92d3bf46f6424163ea00831d3b8d044 (diff) |
minor edits to DM_update_weight_mcol(), skip getting vars when in editmode, also remove old/invalid comment.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index ba0003f82b9..8333fc4ab26 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1200,12 +1200,8 @@ void DM_update_weight_mcol(Object *ob, DerivedMesh *dm, int const draw_flag, { BMEditMesh *em = (dm->type == DM_TYPE_EDITBMESH) ? BMEdit_FromObject(ob) : NULL; unsigned char (*wtcol_v)[4]; - unsigned char(*wtcol_l)[4] = CustomData_get_layer(dm->getLoopDataLayout(dm), CD_PREVIEW_MLOOPCOL); - MLoop *mloop = dm->getLoopArray(dm), *ml; - MPoly *mp = dm->getPolyArray(dm); int numVerts = dm->getNumVerts(dm); - int totloop; - int i, j; + int i; if (em) { if (em->derivedVertColor && em->derivedVertColorLen == numVerts) { @@ -1248,6 +1244,12 @@ void DM_update_weight_mcol(Object *ob, DerivedMesh *dm, int const draw_flag, /* editmesh draw function checks spesifically for this */ } else { + unsigned char(*wtcol_l)[4] = CustomData_get_layer(dm->getLoopDataLayout(dm), CD_PREVIEW_MLOOPCOL); + MLoop *mloop = dm->getLoopArray(dm), *ml; + MPoly *mp = dm->getPolyArray(dm); + int totloop; + int j; + /* now add to loops, so the data can be passed through the modifier stack */ /* If no CD_PREVIEW_MLOOPCOL existed yet, we have to add a new one! */ if (!wtcol_l) { |