[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36396] trunk/blender: fix for error in own last commit, also indentation edits.

Campbell Barton ideasman42 at gmail.com
Sat Apr 30 16:39:39 CEST 2011


Revision: 36396
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36396
Author:   campbellbarton
Date:     2011-04-30 14:39:39 +0000 (Sat, 30 Apr 2011)
Log Message:
-----------
fix for error in own last commit, also indentation edits.

Modified Paths:
--------------
    trunk/blender/intern/ghost/test/gears/GHOST_C-Test.c
    trunk/blender/source/blender/python/intern/bpy_rna.c

Modified: trunk/blender/intern/ghost/test/gears/GHOST_C-Test.c
===================================================================
--- trunk/blender/intern/ghost/test/gears/GHOST_C-Test.c	2011-04-30 13:58:31 UTC (rev 36395)
+++ trunk/blender/intern/ghost/test/gears/GHOST_C-Test.c	2011-04-30 14:39:39 UTC (rev 36396)
@@ -83,71 +83,71 @@
 static void gearGL(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth)
 {
 	GLint i;
-    GLfloat r0, r1, r2;
-    GLfloat angle, da;
-    GLfloat u, v, len;
+	GLfloat r0, r1, r2;
+	GLfloat angle, da;
+	GLfloat u, v, len;
 	const double pi = 3.14159264;
 	
-    r0 = inner_radius;
-    r1 = (float)(outer_radius - tooth_depth/2.0);
-    r2 = (float)(outer_radius + tooth_depth/2.0);
+	r0 = inner_radius;
+	r1 = (float)(outer_radius - tooth_depth/2.0);
+	r2 = (float)(outer_radius + tooth_depth/2.0);
 	
-    da = (float)(2.0*pi / teeth / 4.0);
+	da = (float)(2.0*pi / teeth / 4.0);
 	
-    glShadeModel(GL_FLAT);
-    glNormal3f(0.0, 0.0, 1.0);
+	glShadeModel(GL_FLAT);
+	glNormal3f(0.0, 0.0, 1.0);
 	
-    /* draw front face */
-    glBegin(GL_QUAD_STRIP);
-    for (i=0;i<=teeth;i++) {
+	/* draw front face */
+	glBegin(GL_QUAD_STRIP);
+	for (i=0;i<=teeth;i++) {
 		angle = (float)(i * 2.0*pi / teeth);
 		glVertex3f((float)(r0*cos(angle)), (float)(r0*sin(angle)), (float)(width*0.5));
 		glVertex3f((float)(r1*cos(angle)), (float)(r1*sin(angle)), (float)(width*0.5));
 		glVertex3f((float)(r0*cos(angle)), (float)(r0*sin(angle)), (float)(width*0.5));
 		glVertex3f((float)(r1*cos(angle+3*da)), (float)(r1*sin(angle+3*da)), (float)(width*0.5));
-    }
-    glEnd();
+	}
+	glEnd();
 	
-    /* draw front sides of teeth */
-    glBegin(GL_QUADS);
-    da = (float)(2.0*pi / teeth / 4.0);
-    for (i=0;i<teeth;i++) {
+	/* draw front sides of teeth */
+	glBegin(GL_QUADS);
+	da = (float)(2.0*pi / teeth / 4.0);
+	for (i=0;i<teeth;i++) {
 		angle = (float)(i * 2.0*pi / teeth);
 		glVertex3f((float)(r1*cos(angle)), (float)(r1*sin(angle)), (float)(width*0.5));
 		glVertex3f((float)(r2*cos(angle+da)), (float)(r2*sin(angle+da)), (float)(width*0.5));
 		glVertex3f((float)(r2*cos(angle+2*da)), (float)(r2*sin(angle+2*da)), (float)(width*0.5));
 		glVertex3f((float)(r1*cos(angle+3*da)), (float)(r1*sin(angle+3*da)), (float)(width*0.5));
-    }
-    glEnd();
+	}
+	glEnd();
 	
-    glNormal3f(0.0, 0.0, -1.0);
+	glNormal3f(0.0, 0.0, -1.0);
 	
 	/* draw back face */
-    glBegin(GL_QUAD_STRIP);
-    for (i=0;i<=teeth;i++) {
+	glBegin(GL_QUAD_STRIP);
+	for (i=0;i<=teeth;i++) {
 		angle = (float)(i * 2.0*pi / teeth);
 		glVertex3f((float)(r1*cos(angle)), (float)(r1*sin(angle)), (float)(-width*0.5));
 		glVertex3f((float)(r0*cos(angle)), (float)(r0*sin(angle)), (float)(-width*0.5));
 		glVertex3f((float)(r1*cos(angle+3*da)), (float)(r1*sin(angle+3*da)), (float)(-width*0.5));
 		glVertex3f((float)(r0*cos(angle)), (float)(r0*sin(angle)), (float)(-width*0.5));
-    }
-    glEnd();
+	}
+	glEnd();
 	
-    /* draw back sides of teeth */
-    glBegin(GL_QUADS);
-    da = (float)(2.0*pi / teeth / 4.0);
-    for (i=0;i<teeth;i++) {
+	/* draw back sides of teeth */
+	glBegin(GL_QUADS);
+	da = (float)(2.0*pi / teeth / 4.0);
+	for (i=0;i<teeth;i++) {
 		angle = (float)(i * 2.0*pi / teeth);
 		glVertex3f((float)(r1*cos(angle+3*da)), (float)(r1*sin(angle+3*da)), (float)(-width*0.5));
 		glVertex3f((float)(r2*cos(angle+2*da)), (float)(r2*sin(angle+2*da)), (float)(-width*0.5));
 		glVertex3f((float)(r2*cos(angle+da)), (float)(r2*sin(angle+da)), (float)(-width*0.5));
 		glVertex3f((float)(r1*cos(angle)), (float)(r1*sin(angle)), (float)(-width*0.5));
-    }
-    glEnd();
+	}
+	glEnd();
 	
-    /* draw outward faces of teeth */
-    glBegin(GL_QUAD_STRIP);
-    for (i=0;i<teeth;i++) {
+	/* draw outward faces of teeth */
+	glBegin(GL_QUAD_STRIP);
+	for (i=0;i<teeth;i++) {
 		angle = (float)(i * 2.0*pi / teeth);
 		glVertex3f((float)(r1*cos(angle)), (float)(r1*sin(angle)), (float)(width*0.5));
 		glVertex3f((float)(r1*cos(angle)), (float)(r1*sin(angle)), (float)(-width*0.5));
@@ -168,22 +168,22 @@
 		glVertex3f((float)(r1*cos(angle+3*da)), (float)(r1*sin(angle+3*da)), (float)(width*0.5));
 		glVertex3f((float)(r1*cos(angle+3*da)), (float)(r1*sin(angle+3*da)), (float)(-width*0.5));
 		glNormal3f((float)(cos(angle)), (float)(sin(angle)), 0.0);
-    }
-    glVertex3f((float)(r1*cos(0.0)), (float)(r1*sin(0.0)), (float)(width*0.5));
-    glVertex3f((float)(r1*cos(0.0)), (float)(r1*sin(0.0)), (float)(-width*0.5));
-    glEnd();
+	}
+	glVertex3f((float)(r1*cos(0.0)), (float)(r1*sin(0.0)), (float)(width*0.5));
+	glVertex3f((float)(r1*cos(0.0)), (float)(r1*sin(0.0)), (float)(-width*0.5));
+	glEnd();
 	
-    glShadeModel(GL_SMOOTH);
+	glShadeModel(GL_SMOOTH);
 	
-    /* draw inside radius cylinder */
-    glBegin(GL_QUAD_STRIP);
-    for (i=0;i<=teeth;i++) {
+	/* draw inside radius cylinder */
+	glBegin(GL_QUAD_STRIP);
+	for (i=0;i<=teeth;i++) {
 		angle = (float)(i * 2.0*pi / teeth);
 		glNormal3f((float)(-cos(angle)), (float)(-sin(angle)), 0.0);
 		glVertex3f((float)(r0*cos(angle)), (float)(r0*sin(angle)), (float)(-width*0.5));
 		glVertex3f((float)(r0*cos(angle)), (float)(r0*sin(angle)), (float)(width*0.5));
-    }
-    glEnd();
+	}
+	glEnd();
 }
 
 

Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna.c	2011-04-30 13:58:31 UTC (rev 36395)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c	2011-04-30 14:39:39 UTC (rev 36396)
@@ -1192,8 +1192,8 @@
 			/*
 			PyErr_Format(PyExc_AttributeError,
 			             "RNA Error: Current value \"%d\" matches no enum", val);
+			ret= NULL;
 			*/
-			ret= NULL;
 		}
 	}
 




More information about the Bf-blender-cvs mailing list