diff options
Diffstat (limited to 'source/blender/blenkernel/intern/group.c')
-rw-r--r-- | source/blender/blenkernel/intern/group.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index 4f768bbad23..6377a6f6ccd 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -29,14 +29,11 @@ #include <stdio.h> #include <string.h> +#include <math.h> #include "MEM_guardedalloc.h" -#include "DNA_action_types.h" -#include "DNA_effect_types.h" #include "DNA_group_types.h" -#include "DNA_ID.h" -#include "DNA_ipo_types.h" #include "DNA_material_types.h" #include "DNA_object_types.h" #include "DNA_nla_types.h" @@ -47,16 +44,11 @@ #include "BKE_global.h" #include "BKE_group.h" -#include "BKE_ipo.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_object.h" #include "BKE_scene.h" /* object_in_scene */ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - static void free_group_object(GroupObject *go) { MEM_freeN(go); @@ -288,6 +280,7 @@ int group_is_animated(Object *parent, Group *group) return 0; } +#if 0 // add back when timeoffset & animsys work again /* only replaces object strips or action when parent nla instructs it */ /* keep checking nla.c though, in case internal structure of strip changes */ static void group_replaces_nla(Object *parent, Object *target, char mode) @@ -327,6 +320,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode) } } } +#endif /* puts all group members in local timing system, after this call you can draw everything, leaves tags in objects to signal it needs further updating */ @@ -336,13 +330,18 @@ void group_handle_recalc_and_update(Scene *scene, Object *parent, Group *group) { GroupObject *go; +#if 0 /* warning, isnt clearing the recalc flag on the object which causes it to run all the time, + * not just on frame change. + * This isnt working because the animation data is only re-evalyated on frame change so commenting for now + * but when its enabled at some point it will need to be changed so as not to update so much - campbell */ + /* if animated group... */ if(give_timeoffset(parent) != 0.0f || parent->nlastrips.first) { int cfrao; /* switch to local time */ cfrao= scene->r.cfra; - scene->r.cfra -= (int)give_timeoffset(parent); + scene->r.cfra -= (int)floor(give_timeoffset(parent) + 0.5f); /* we need a DAG per group... */ for(go= group->gobject.first; go; go= go->next) { @@ -361,7 +360,9 @@ void group_handle_recalc_and_update(Scene *scene, Object *parent, Group *group) /* restore */ scene->r.cfra= cfrao; } - else { + else +#endif + { /* only do existing tags, as set by regular depsgraph */ for(go= group->gobject.first; go; go= go->next) { if(go->ob) { |