Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiika Hamalainen <blender@miikah.org>2012-06-29 15:19:29 +0400
committerMiika Hamalainen <blender@miikah.org>2012-06-29 15:19:29 +0400
commit3ad9e0f3ec522289b6ae13bd2a951b33d9ebfc4d (patch)
tree0039e8841b1f8c1c9b241ce4e32d731c193b47c4 /source/blender/blenkernel/intern/dynamicpaint.c
parentaf63f9ec21834246bd87dc1e051d69a6da021c06 (diff)
Fix #31948: dynamic paint substeps do not work for objects parented to armatures
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 6589b1e1082..a6467af2773 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -33,6 +33,7 @@
#include "BLI_utildefines.h"
#include "DNA_anim_types.h"
+#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
#include "DNA_dynamicpaint_types.h"
#include "DNA_group_types.h" /*GroupObject*/
@@ -46,6 +47,7 @@
#include "DNA_texture_types.h"
#include "BKE_animsys.h"
+#include "BKE_armature.h"
#include "BKE_bvhutils.h" /* bvh tree */
#include "BKE_blender.h"
#include "BKE_cdderivedmesh.h"
@@ -528,11 +530,6 @@ static int subframe_updateObject(Scene *scene, Object *ob, int flags, float fram
}
}
}
- /* for curve following objects, parented curve has to be updated too */
- if (ob->type == OB_CURVE) {
- Curve *cu = ob->data;
- BKE_animsys_evaluate_animdata(scene, &cu->id, cu->adt, frame, ADT_RECALC_ANIM);
- }
/* was originally OB_RECALC_ALL - TODO - which flags are really needed??? */
ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
@@ -547,6 +544,18 @@ static int subframe_updateObject(Scene *scene, Object *ob, int flags, float fram
else
BKE_object_where_is_calc_time(scene, ob, frame);
+ /* for curve following objects, parented curve has to be updated too */
+ if (ob->type == OB_CURVE) {
+ Curve *cu = ob->data;
+ BKE_animsys_evaluate_animdata(scene, &cu->id, cu->adt, frame, ADT_RECALC_ANIM);
+ }
+ /* and armatures... */
+ if (ob->type == OB_ARMATURE) {
+ bArmature *arm = ob->data;
+ BKE_animsys_evaluate_animdata(scene, &arm->id, arm->adt, frame, ADT_RECALC_ANIM);
+ BKE_pose_where_is(scene, ob);
+ }
+
return 0;
}