[Bf-blender-cvs] [c76bbaffee1] collada: fix: Collada: changed scene update for sampling animation data
Gaia Clary
noreply at git.blender.org
Wed Mar 28 21:30:41 CEST 2018
Commit: c76bbaffee16d1fcf34a9ccfbdc5309dbd9e2e68
Author: Gaia Clary
Date: Tue Mar 6 21:35:10 2018 +0100
Branches: collada
https://developer.blender.org/rBc76bbaffee16d1fcf34a9ccfbdc5309dbd9e2e68
fix: Collada: changed scene update for sampling animation data
According to a comment in physics_fluid.c it sounds like the
function BKE_scene_update_for_newframe() does not work in all
cases. According to the comment it seems better to use
ED_update_for_newframe() instead.
This change only affects the export of Animation Data.
I make this change as a precaution. I am not aware that
there was anything wrong here before.
===================================================================
M source/blender/collada/collada_utils.cpp
===================================================================
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 4d25010eb59..44b8ae707f9 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -56,6 +56,7 @@ extern "C" {
#include "BKE_main.h"
#include "ED_armature.h"
+#include "ED_screen.h"
#include "WM_api.h" // XXX hrm, see if we can do without this
#include "WM_types.h"
@@ -180,10 +181,15 @@ EvaluationContext *bc_get_evaluation_context()
void bc_update_scene(Scene *scene, float ctime)
{
- BKE_scene_frame_set(scene, ctime);
Main *bmain = bc_get_main();
EvaluationContext *ev_context = bc_get_evaluation_context();
- BKE_scene_update_for_newframe(ev_context, bmain, scene, scene->lay);
+
+ /*
+ * See remark in physics_fluid.c lines 395...)
+ * BKE_scene_update_for_newframe(ev_context, bmain, scene, scene->lay);
+ */
+ BKE_scene_frame_set(scene, ctime);
+ ED_update_for_newframe(bmain, scene, 1);
}
Object *bc_add_object(Scene *scene, int type, const char *name)
More information about the Bf-blender-cvs
mailing list