From 3ad9e0f3ec522289b6ae13bd2a951b33d9ebfc4d Mon Sep 17 00:00:00 2001 From: Miika Hamalainen Date: Fri, 29 Jun 2012 11:19:29 +0000 Subject: Fix #31948: dynamic paint substeps do not work for objects parented to armatures --- source/blender/blenkernel/intern/dynamicpaint.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'source/blender/blenkernel/intern/dynamicpaint.c') 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; } -- cgit v1.2.3 From 468ef74ed74d2173a06d94b2f571b32c5b77cb2d Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 3 Jul 2012 19:09:07 +0000 Subject: More spell and typo fixes (mostly visualise->visualize, grey->gray, normalise->normalize). --- source/blender/blenkernel/intern/dynamicpaint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/dynamicpaint.c') diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index a6467af2773..dd5751c5d1f 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -1686,7 +1686,7 @@ struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd, c[1] = material->g; c[2] = material->b; } - else { /* default grey */ + else { /* default gray */ c[0] = 0.65f; c[1] = 0.65f; c[2] = 0.65f; -- cgit v1.2.3