[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32180] trunk/blender/source/blender: fix for user counts with text3d bold/italic fonts.
Campbell Barton
ideasman42 at gmail.com
Wed Sep 29 08:24:05 CEST 2010
Revision: 32180
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32180
Author: campbellbarton
Date: 2010-09-29 08:24:05 +0200 (Wed, 29 Sep 2010)
Log Message:
-----------
fix for user counts with text3d bold/italic fonts.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/curve.c
trunk/blender/source/blender/blenloader/intern/readfile.c
Modified: trunk/blender/source/blender/blenkernel/intern/curve.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/curve.c 2010-09-29 05:15:55 UTC (rev 32179)
+++ trunk/blender/source/blender/blenkernel/intern/curve.c 2010-09-29 06:24:05 UTC (rev 32180)
@@ -74,12 +74,22 @@
for(a=0; a<cu->totcol; a++) {
if(cu->mat[a]) cu->mat[a]->id.us--;
- cu->mat[a]= 0;
+ cu->mat[a]= NULL;
}
if(cu->vfont) cu->vfont->id.us--;
- cu->vfont= 0;
+ cu->vfont= NULL;
+
+ if(cu->vfontb) cu->vfontb->id.us--;
+ cu->vfontb= NULL;
+
+ if(cu->vfonti) cu->vfonti->id.us--;
+ cu->vfonti= NULL;
+
+ if(cu->vfontbi) cu->vfontbi->id.us--;
+ cu->vfontbi= NULL;
+
if(cu->key) cu->key->id.us--;
- cu->key= 0;
+ cu->key= NULL;
}
/* frees editcurve entirely */
@@ -210,9 +220,12 @@
*/
if(cu->id.lib==0) return;
-
- if(cu->vfont) cu->vfont->id.lib= 0;
-
+
+ if(cu->vfont) cu->vfont->id.lib= NULL;
+ if(cu->vfontb) cu->vfontb->id.lib= NULL;
+ if(cu->vfonti) cu->vfonti->id.lib= NULL;
+ if(cu->vfontbi) cu->vfontbi->id.lib= NULL;
+
if(cu->id.us==1) {
cu->id.lib= 0;
cu->id.flag= LIB_LOCAL;
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2010-09-29 05:15:55 UTC (rev 32179)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2010-09-29 06:24:05 UTC (rev 32180)
@@ -2735,7 +2735,7 @@
cu->strinfo= newdataadr(fd, cu->strinfo);
cu->tb= newdataadr(fd, cu->tb);
- if(cu->vfont==0) link_list(fd, &(cu->nurb));
+ if(curve_type(cu) != OB_FONT) link_list(fd, &(cu->nurb));
else {
cu->nurb.first=cu->nurb.last= 0;
@@ -2766,7 +2766,7 @@
nu->bp= newdataadr(fd, nu->bp);
nu->knotsu= newdataadr(fd, nu->knotsu);
nu->knotsv= newdataadr(fd, nu->knotsv);
- if (cu->vfont==0) nu->charidx= nu->mat_nr;
+ if (curve_type(cu) != OB_FONT) nu->charidx= nu->mat_nr;
if(fd->flags & FD_FLAGS_SWITCH_ENDIAN) {
switch_endian_knots(nu);
More information about the Bf-blender-cvs
mailing list