[Bf-blender-cvs] [6a2cefc] master: Fix T40839: Object Font Text Rendering Bug

Sergey Sharybin noreply at git.blender.org
Mon Jul 21 17:33:11 CEST 2014


Commit: 6a2cefc061ec3805ce3f47bf76b728943fb2e4a7
Author: Sergey Sharybin
Date:   Mon Jul 21 21:30:53 2014 +0600
Branches: master
https://developer.blender.org/rB6a2cefc061ec3805ce3f47bf76b728943fb2e4a7

Fix T40839: Object Font Text Rendering Bug

The issue was caused by the wrong objects order for
convertblender.c. Dependency graph totally missed
handling of this situation.

Fixed now, but it's not that pretty, don't try this
at home obviously. But consider this to be good enough
for the current dependency graph.

Details are in the build_dag_object().

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

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

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

diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 4fa4031..aaf0013 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -59,6 +59,7 @@
 #include "DNA_movieclip_types.h"
 #include "DNA_mask_types.h"
 
+#include "BKE_anim.h"
 #include "BKE_animsys.h"
 #include "BKE_action.h"
 #include "BKE_effect.h"
@@ -688,6 +689,29 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
 				dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Curve Taper");
 			}
 			if (ob->type == OB_FONT) {
+				/* Really rather dirty hack. needs to support font family to work
+				 * reliably on render export.
+				 *
+				 * This totally mimics behavior of regular verts duplication with
+				 * parenting. The only tricky thing here is to get list of objects
+				 * used for the custom "font".
+				 *
+				 * This shouldn't harm so much because this code only runs on DAG
+				 * rebuild and this feature is not that commonly used.
+				 *
+				 *                                                 - sergey -
+				 */
+				if (cu->family[0] != '\n') {
+					ListBase *duplilist;
+					DupliObject *dob;
+					duplilist = object_duplilist(G.main->eval_ctx, scene, ob);
+					for (dob= duplilist->first; dob; dob = dob->next) {
+						node2 = dag_get_node(dag, dob->ob);
+						dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Object Font");
+					}
+					free_object_duplilist(duplilist);
+				}
+
 				if (cu->textoncurve) {
 					node2 = dag_get_node(dag, cu->textoncurve);
 					/* Text on curve requires path to be evaluated for the target curve. */




More information about the Bf-blender-cvs mailing list