[Bf-blender-cvs] [df7b9fa2eeb] master: Fix T53410: 3D Text always recalculated

Campbell Barton noreply at git.blender.org
Thu Nov 30 06:57:11 CET 2017


Commit: df7b9fa2eeb5908de4e1b3c2c6f7cf30329f1e3d
Author: Campbell Barton
Date:   Thu Nov 30 17:08:37 2017 +1100
Branches: master
https://developer.blender.org/rBdf7b9fa2eeb5908de4e1b3c2c6f7cf30329f1e3d

Fix T53410: 3D Text always recalculated

===================================================================

M	source/blender/blenkernel/intern/depsgraph.c

===================================================================

diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 3ddf0f43d30..30b7f15da7c 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -67,6 +67,7 @@
 #include "BKE_action.h"
 #include "BKE_DerivedMesh.h"
 #include "BKE_collision.h"
+#include "BKE_curve.h"
 #include "BKE_effect.h"
 #include "BKE_fcurve.h"
 #include "BKE_global.h"
@@ -2267,8 +2268,18 @@ static void dag_object_time_update_flags(Main *bmain, Scene *scene, Object *ob)
 				break;
 			case OB_FONT:
 				cu = ob->data;
-				if (BLI_listbase_is_empty(&cu->nurb) && cu->str && cu->vfont)
-					ob->recalc |= OB_RECALC_DATA;
+				if (cu->str && cu->vfont) {
+					/* Can be in the curve-cache or the curve. */
+					if (ob->curve_cache && !BLI_listbase_is_empty(&ob->curve_cache->disp)) {
+						/* pass */
+					}
+					else if (!BLI_listbase_is_empty(&cu->nurb)) {
+						/* pass */
+					}
+					else {
+						ob->recalc |= OB_RECALC_DATA;
+					}
+				}
 				break;
 			case OB_LATTICE:
 				lt = ob->data;



More information about the Bf-blender-cvs mailing list