Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-11-16 23:45:40 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2014-11-17 13:19:54 +0300
commitb7f5ab0cd33bc7632bd71af5f883745e340d6e18 (patch)
tree44319a121504220313b7af8bf63eec659034985d /source/blender/bmesh/intern/bmesh_mesh_conv.c
parentd526ef607d0a8741799ede335c2c64dc87e4f094 (diff)
ShapeKeys: Add `BKE_keyblock_is_basis` to check whether a given keyblock is used a basis by others.
Also fix stupid debug-only error in previous commit.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_mesh_conv.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_conv.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c
index 8c96cc9addf..3630bb78b8a 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c
@@ -850,15 +850,7 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, bool do_tessface)
* bmesh and the mesh are out of sync */
(oldverts != NULL)) /* not used here, but 'oldverts' is used later for applying 'ofs' */
{
- bool act_is_basis = false;
-
- /* find if this key is a basis for any others */
- for (currkey = me->key->block.first; currkey; currkey = currkey->next) {
- if (bm->shapenr - 1 == currkey->relative) {
- act_is_basis = true;
- break;
- }
- }
+ const bool act_is_basis = BKE_keyblock_is_basis(me->key, bm->shapenr - 1);
/* active key is a base */
if (act_is_basis && (cd_shape_keyindex_offset != -1)) {