diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-29 04:49:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-29 04:49:44 +0400 |
commit | f239d2e751d1d55ee555125bc7e517638ca0eebc (patch) | |
tree | 08fd7c44b428f1a879302ed9fd124bb817fbcb95 /source | |
parent | 838a601a71508425a15a144c742984a1cddff338 (diff) |
minor adjustment to vertex color baking, tag the meshes directly, no need to do via the objects.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/object/object_bake.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 426f543c045..01e614fef41 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -648,15 +648,12 @@ static void finish_bake_internal(BakeRender *bkr) if (bkr->scene->r.bake_flag & R_BAKE_VCOL) { /* update all tagged meshes */ - Object *ob; + Mesh *me; BLI_assert(BLI_thread_is_main()); - for (ob = G.main->object.first; ob; ob = ob->id.next) { - if (ob->type == OB_MESH) { - Mesh *me = ob->data; - if (me->id.flag & LIB_DOIT) { - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); - BKE_mesh_tessface_clear(me); - } + for (me = G.main->mesh.first; me; me = me->id.next) { + if (me->id.flag & LIB_DOIT) { + DAG_id_tag_update(&me->id, OB_RECALC_DATA); + BKE_mesh_tessface_clear(me); } } } |