Alembic export: unified code of exploreTransform and exploreObject.
authorSybren A. Stüvel <sybren@stuvel.eu>
Tue, 11 Apr 2017 12:59:48 +0000 (14:59 +0200)
committerSybren A. Stüvel <sybren@stuvel.eu>
Thu, 13 Apr 2017 14:34:37 +0000 (16:34 +0200)
source/blender/alembic/intern/abc_exporter.cc

index c58aedd65037779e17de6e14681fbb1e51c2ba80..a8d1587abdb3286757767ab201023950f055f16a 100644 (file)
@@ -515,20 +515,17 @@ void AbcExporter::exploreObject(EvaluationContext *eval_ctx, Object *ob, Object
        ListBase *lb = object_duplilist(eval_ctx, m_scene, ob);
 
        if (lb) {
-               DupliObject *dupliob = static_cast<DupliObject *>(lb->first);
+               DupliObject *link = static_cast<DupliObject *>(lb->first);
 
-               while (dupliob) {
+               for (; link; link = link->next) {
                        /* This skips things like custom bone shapes. */
-                       if (m_settings.renderable_only && dupliob->no_draw) {
-                               dupliob = dupliob->next;
+                       if (m_settings.renderable_only && link->no_draw) {
                                continue;
                        }
 
-                       if (dupliob->type == OB_DUPLIGROUP) {
-                               exploreObject(eval_ctx, dupliob->ob, ob);
+                       if (link->type == OB_DUPLIGROUP) {
+                               exploreObject(eval_ctx, link->ob, ob);
                        }
-
-                       dupliob = dupliob->next;
                }
        }