[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35355] trunk/blender/source/blender: quiet warnings and fix building without python.

Campbell Barton ideasman42 at gmail.com
Fri Mar 4 18:01:34 CET 2011


Revision: 35355
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35355
Author:   campbellbarton
Date:     2011-03-04 17:01:33 +0000 (Fri, 04 Mar 2011)
Log Message:
-----------
quiet warnings and fix building without python.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_text/text_ops.c
    trunk/blender/source/blender/makesrna/intern/makesrna.c
    trunk/blender/source/blender/makesrna/intern/rna_define.c
    trunk/blender/source/blender/makesrna/intern/rna_scene.c
    trunk/blender/source/blender/render/intern/source/rayshade.c

Modified: trunk/blender/source/blender/editors/space_text/text_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_text/text_ops.c	2011-03-04 16:02:42 UTC (rev 35354)
+++ trunk/blender/source/blender/editors/space_text/text_ops.c	2011-03-04 17:01:33 UTC (rev 35355)
@@ -572,6 +572,7 @@
 
 static int run_script(bContext *C, ReportList *reports)
 {
+#ifdef WITH_PYTHON
 	Text *text= CTX_data_edit_text(C);
 	const short is_live= (reports == NULL);
 
@@ -596,6 +597,10 @@
 
 		BKE_report(reports, RPT_ERROR, "Python script fail, look in the console for now...");
 	}
+#else
+	(void)C;
+	(void)reports;
+#endif /* !WITH_PYTHON */
 	return OPERATOR_CANCELLED;
 }
 
@@ -792,7 +797,7 @@
 	/* run the script while editing, evil but useful */
 	if(CTX_wm_space_text(C)->live_edit)
 		run_script(C, NULL);
-	
+
 	return OPERATOR_FINISHED;
 }
 
@@ -863,7 +868,7 @@
 	/* run the script while editing, evil but useful */
 	if(CTX_wm_space_text(C)->live_edit)
 		run_script(C, NULL);
-	
+
 	return OPERATOR_FINISHED;
 }
 

Modified: trunk/blender/source/blender/makesrna/intern/makesrna.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/makesrna.c	2011-03-04 16:02:42 UTC (rev 35354)
+++ trunk/blender/source/blender/makesrna/intern/makesrna.c	2011-03-04 17:01:33 UTC (rev 35355)
@@ -1790,7 +1790,7 @@
 	}
 }
 
-static const char *rna_property_subtype_unit(PropertyType type)
+static const char *rna_property_subtype_unit(PropertySubType type)
 {
 	switch(RNA_SUBTYPE_UNIT(type)) {
 		case PROP_UNIT_NONE:		return "PROP_UNIT_NONE";

Modified: trunk/blender/source/blender/makesrna/intern/rna_define.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_define.c	2011-03-04 16:02:42 UTC (rev 35354)
+++ trunk/blender/source/blender/makesrna/intern/rna_define.c	2011-03-04 17:01:33 UTC (rev 35355)
@@ -1815,7 +1815,7 @@
 void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
 {
 	if(!DefRNA.preprocess) {
-		fprintf(stderr, "RNA_def_struct_refine_func: only during preprocessing.\n");
+		fprintf(stderr, "RNA_def_property_update: only during preprocessing.\n");
 		return;
 	}
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c	2011-03-04 16:02:42 UTC (rev 35354)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c	2011-03-04 17:01:33 UTC (rev 35355)
@@ -2151,7 +2151,7 @@
 	
 	prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
 	RNA_def_property_int_sdna(prop, NULL, "size");
-	RNA_def_property_range(prop, 1, INT_MAX);
+	RNA_def_property_range(prop, 1, SHRT_MAX);
 	RNA_def_property_ui_range(prop, 1, 100, 10, 1);
 	RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution");
 	RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);

Modified: trunk/blender/source/blender/render/intern/source/rayshade.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/rayshade.c	2011-03-04 16:02:42 UTC (rev 35354)
+++ trunk/blender/source/blender/render/intern/source/rayshade.c	2011-03-04 17:01:33 UTC (rev 35355)
@@ -2347,7 +2347,7 @@
 		
 		samples++;
 		
-		if ((lar->ray_samp_method == LA_SAMP_HALTON)) {
+		if (lar->ray_samp_method == LA_SAMP_HALTON) {
 		
 			/* adaptive sampling - consider samples below threshold as in shadow (or vice versa) and exit early */
 			if ((max_samples > min_adapt_samples) && (adapt_thresh > 0.0) && (samples > max_samples / 3)) {




More information about the Bf-blender-cvs mailing list