diff options
-rw-r--r-- | source/blender/blenkernel/intern/group.c | 17 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_group_types.h | 4 |
2 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index e48ec8ac288..3b8daced657 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -364,17 +364,22 @@ void group_handle_recalc_and_update(Scene *scene, Object *UNUSED(parent), Group scene->r.cfra= cfrao; } else -#endif +#else { - /* only do existing tags, as set by regular depsgraph */ + /* use 2 loops to avoid updating objects multiple times */ for(go= group->gobject.first; go; go= go->next) { - if(go->ob) { - if(go->ob->recalc) { - object_handle_update(scene, go->ob); - } + if(go->ob && go->recalc) { + go->ob->recalc |= go->recalc; + } + } + + for(go= group->gobject.first; go; go= go->next) { + if(go->ob && go->recalc) { + object_handle_update(scene, go->ob); } } } +#endif } Object *group_get_member_with_action(Group *group, bAction *act) diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h index 61a527dd351..7416f6ea397 100644 --- a/source/blender/makesdna/DNA_group_types.h +++ b/source/blender/makesdna/DNA_group_types.h @@ -40,8 +40,8 @@ typedef struct GroupObject { struct GroupObject *next, *prev; struct Object *ob; void *lampren; /* used while render */ - int recalc; /* copy of ob->recalc, used to set animated groups OK */ - int pad; + short recalc; /* copy of ob->recalc, used to set animated groups OK */ + char pad[6]; } GroupObject; |