[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26323] branches/nurbs25/source: - Remove debug printf

Emmanuel Stone emmanuel.stone at gmail.com
Wed Jan 27 08:31:53 CET 2010


Revision: 26323
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26323
Author:   eman
Date:     2010-01-27 08:31:53 +0100 (Wed, 27 Jan 2010)

Log Message:
-----------
- Remove debug printf
- Safety check pointer for nurbanaSizeChanged
- Fixed rna resolution_u crash
- Commented out isolines temporarily

Modified Paths:
--------------
    branches/nurbs25/source/blender/blenkernel/intern/curve.c
    branches/nurbs25/source/blender/blenkernel/intern/displist.c
    branches/nurbs25/source/blender/makesrna/intern/rna_curve.c
    branches/nurbs25/source/creator/CMakeLists.txt

Modified: branches/nurbs25/source/blender/blenkernel/intern/curve.c
===================================================================
--- branches/nurbs25/source/blender/blenkernel/intern/curve.c	2010-01-27 05:42:17 UTC (rev 26322)
+++ branches/nurbs25/source/blender/blenkernel/intern/curve.c	2010-01-27 07:31:53 UTC (rev 26323)
@@ -805,12 +805,14 @@
 }
 void nurbanaSizeChanged(Nurb *nu)
 {
-	NRB_SizeChanged(nu->nurbanaPtr,nu->pntsu,nu->pntsv);
+	if(nu->nurbanaPtr)
+		NRB_SizeChanged(nu->nurbanaPtr,nu->pntsu,nu->pntsv);
 }
 
 void nurbanaResetIsoLines(Nurb *nu)
 {
-	NRB_resetIsoLines(nu->nurbanaPtr); 
+	if(nu->nurbanaPtr)
+		NRB_resetIsoLines(nu->nurbanaPtr); 
 }
 
 void nurbana3dmRead(char *str)

Modified: branches/nurbs25/source/blender/blenkernel/intern/displist.c
===================================================================
--- branches/nurbs25/source/blender/blenkernel/intern/displist.c	2010-01-27 05:42:17 UTC (rev 26322)
+++ branches/nurbs25/source/blender/blenkernel/intern/displist.c	2010-01-27 07:31:53 UTC (rev 26323)
@@ -206,8 +206,6 @@
 			nu = dl -> nurb;
 			dl->nors= MEM_callocN(sizeof(float) * 3 * NRB_getVertexCount(nu -> nurbanaPtr), "dlnors");
 			NRB_getNormals(nu -> nurbanaPtr, dl -> index, dl -> trian, dl -> verts, dl -> nors);
-			for(a=0;a<NRB_getVertexCount(nu -> nurbanaPtr);a+=3)
-				printf("normalss: %.3f, %.3f, %.3f \n",dl->nors[a],dl->nors[a+1],dl->nors[a+2]);
 		} else if(dl->type==DL_SURF) {
 			if(dl->nors==NULL) {
 				dl->nors= MEM_callocN(sizeof(float)*3*dl->nr*dl->parts, "dlnors");

Modified: branches/nurbs25/source/blender/makesrna/intern/rna_curve.c
===================================================================
--- branches/nurbs25/source/blender/makesrna/intern/rna_curve.c	2010-01-27 05:42:17 UTC (rev 26322)
+++ branches/nurbs25/source/blender/makesrna/intern/rna_curve.c	2010-01-27 07:31:53 UTC (rev 26323)
@@ -212,9 +212,6 @@
 static void rna_Curve_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
 	ID *id= ptr->id.data;
-	Nurb *nu= (Nurb*)ptr->data;
-	nurbanaSizeChanged(nu);
-	nurbanaResetIsoLines(nu);
 	DAG_id_flush_update(id, OB_RECALC_DATA);
 	WM_main_add_notifier(NC_GEOM|ND_DATA, id);
 }
@@ -244,6 +241,8 @@
 	
 	while(nu) {
 		nu->resolu= cu->resolu;
+		nurbanaSizeChanged(nu);
+		nurbanaResetIsoLines(nu);
 		nu= nu->next;
 	}
 	
@@ -260,6 +259,8 @@
 	
 	while(nu) {
 		nu->resolv= cu->resolv;
+		nurbanaSizeChanged(nu);
+		nurbanaResetIsoLines(nu);
 		nu= nu->next;
 	}
 	
@@ -1025,7 +1026,7 @@
 	RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
 
 
-	prop= RNA_def_property(srna, "isolines", PROP_BOOLEAN, PROP_NONE);
+/*	prop= RNA_def_property(srna, "isolines", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "isovis", 0);
 	RNA_def_property_ui_text(prop, "Isolines", "Turn on isolines which define the surface in U and V."); //FIXME eman better description?
 	RNA_def_property_update(prop, 0, "rna_Curve_update_isolines");
@@ -1041,7 +1042,7 @@
 	RNA_def_property_range(prop, 1, 1024);
 	RNA_def_property_ui_text(prop, "Isoline Density", "Number of isolines per surface.");
 	RNA_def_property_update(prop, 0, "rna_Curve_update_isolines");
-
+*/
 	prop= RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_SMOOTH);
 	RNA_def_property_ui_text(prop, "Smooth", "Smooth the normals of the surface or beveled curve.");

Modified: branches/nurbs25/source/creator/CMakeLists.txt
===================================================================
--- branches/nurbs25/source/creator/CMakeLists.txt	2010-01-27 05:42:17 UTC (rev 26322)
+++ branches/nurbs25/source/creator/CMakeLists.txt	2010-01-27 07:31:53 UTC (rev 26323)
@@ -282,7 +282,7 @@
 			COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python31.dll\" \"${TARGETDIR}\\\"
 			COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python31_d.dll\" \"${TARGETDIR}\\\"
 			COMMAND copy /Y \"${WIN_LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" \"${TARGETDIR}\\\"
-			COMMAND copy /Y \"${WIN_LIBDIR}\\samplerate\\lib\\libsamplerate-0.dll\" \"${TARGETDIR}\\\"
+			#COMMAND copy /Y \"${WIN_LIBDIR}\\samplerate\\lib\\libsamplerate-0.dll\" \"${TARGETDIR}\\\"
 		)
 
 		IF(WITH_INTERNATIONAL)





More information about the Bf-blender-cvs mailing list