[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52090] trunk/blender: code cleanup:

Campbell Barton ideasman42 at gmail.com
Sun Nov 11 11:55:35 CET 2012


Revision: 52090
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52090
Author:   campbellbarton
Date:     2012-11-11 10:55:32 +0000 (Sun, 11 Nov 2012)
Log Message:
-----------
code cleanup:
- blf doesnt have includes for TRUE/FALSE, use 1/0.
- rename ogl_multisamples -> multi_sample, also shorten enum strings.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
    trunk/blender/source/blender/blenfont/intern/blf.c
    trunk/blender/source/blender/makesrna/intern/rna_userdef.c
    trunk/blender/source/blender/windowmanager/intern/wm_window.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_userpref.py	2012-11-11 10:03:25 UTC (rev 52089)
+++ trunk/blender/release/scripts/startup/bl_ui/space_userpref.py	2012-11-11 10:55:32 UTC (rev 52090)
@@ -446,7 +446,7 @@
         #~ col.prop(system, "use_antialiasing")
         col.label(text="Window Draw Method:")
         col.prop(system, "window_draw_method", text="")
-        col.prop(system, "ogl_multisamples", text="")
+        col.prop(system, "multi_sample", text="")
         col.label(text="Text Draw Options:")
         col.prop(system, "use_text_antialiasing")
         col.label(text="Textures:")

Modified: trunk/blender/source/blender/blenfont/intern/blf.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf.c	2012-11-11 10:03:25 UTC (rev 52089)
+++ trunk/blender/source/blender/blenfont/intern/blf.c	2012-11-11 10:55:32 UTC (rev 52090)
@@ -28,7 +28,6 @@
  *  \ingroup blf
  */
 
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -149,10 +148,10 @@
 
 	if (global_font_default == -1) {
 		printf("Warning: Can't find default font!\n");
-		return FALSE;
+		return 0;
 	}
 	else {
-		return TRUE;
+		return 1;
 	}
 }
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_userdef.c	2012-11-11 10:03:25 UTC (rev 52089)
+++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c	2012-11-11 10:55:32 UTC (rev 52090)
@@ -3019,11 +3019,11 @@
 	};
 	
 	static EnumPropertyItem multi_sample_levels[] = {
-		{USER_MULTISAMPLE_NONE, "MULTISAMPLE_NONE", 0, "No MultiSample", "Do not use OpenGL MultiSample"},
-		{USER_MULTISAMPLE_2, "MULTISAMPLE_2", 0, "MultiSample: 2", "Use 2x OpenGL MultiSample (requires restart)"},
-		{USER_MULTISAMPLE_4, "MULTISAMPLE_4", 0, "MultiSample: 4", "Use 4x OpenGL MultiSample (requires restart)"},
-		{USER_MULTISAMPLE_8, "MULTISAMPLE_8", 0, "MultiSample: 8", "Use 8x OpenGL MultiSample (requires restart)"},
-		{USER_MULTISAMPLE_16, "MULTISAMPLE_16", 0, "MultiSample: 16", "Use 16x OpenGL MultiSample (requires restart)"},
+		{USER_MULTISAMPLE_NONE, "NONE", 0, "No MultiSample", "Do not use OpenGL MultiSample"},
+		{USER_MULTISAMPLE_2, "2", 0, "MultiSample: 2", "Use 2x OpenGL MultiSample (requires restart)"},
+		{USER_MULTISAMPLE_4, "4", 0, "MultiSample: 4", "Use 4x OpenGL MultiSample (requires restart)"},
+		{USER_MULTISAMPLE_8, "8", 0, "MultiSample: 8", "Use 8x OpenGL MultiSample (requires restart)"},
+		{USER_MULTISAMPLE_16, "16", 0, "MultiSample: 16", "Use 16x OpenGL MultiSample (requires restart)"},
 		{0, NULL, 0, NULL, NULL}
 	};
 	
@@ -3322,7 +3322,7 @@
 	RNA_def_property_update(prop, 0, "rna_userdef_text_update");
 	
 	/* Full scene anti-aliasing */
-	prop = RNA_def_property(srna, "ogl_multisamples", PROP_ENUM, PROP_NONE);
+	prop = RNA_def_property(srna, "multi_sample", PROP_ENUM, PROP_NONE);
 	RNA_def_property_enum_bitflag_sdna(prop, NULL, "ogl_multisamples");
 	RNA_def_property_enum_items(prop, multi_sample_levels);
 	RNA_def_property_ui_text(prop, "MultiSample", "Enable OpenGL multi-sampling, only for systems that support it, requires restart");

Modified: trunk/blender/source/blender/windowmanager/intern/wm_window.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_window.c	2012-11-11 10:03:25 UTC (rev 52089)
+++ trunk/blender/source/blender/windowmanager/intern/wm_window.c	2012-11-11 10:55:32 UTC (rev 52090)
@@ -345,7 +345,7 @@
 	                              (GHOST_TWindowState)win->windowstate,
 	                              GHOST_kDrawingContextTypeOpenGL,
 	                              0 /* no stereo */,
-								  U.ogl_multisamples /* AA */);
+	                              U.ogl_multisamples /* AA */);
 	
 	if (ghostwin) {
 		/* needed so we can detect the graphics card below */




More information about the Bf-blender-cvs mailing list