[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39347] branches/cycles: Cycles: clean up some unnecessary changes compared to trunk.

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Aug 12 20:29:21 CEST 2011


Revision: 39347
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39347
Author:   blendix
Date:     2011-08-12 18:29:21 +0000 (Fri, 12 Aug 2011)
Log Message:
-----------
Cycles: clean up some unnecessary changes compared to trunk.

Modified Paths:
--------------
    branches/cycles/intern/CMakeLists.txt
    branches/cycles/source/blender/blenkernel/intern/material.c
    branches/cycles/source/blender/blenkernel/intern/object.c
    branches/cycles/source/blender/blenkernel/intern/world.c
    branches/cycles/source/blender/editors/include/ED_uvedit.h
    branches/cycles/source/blender/editors/screen/screen_edit.c
    branches/cycles/source/blender/editors/space_node/node_ops.c
    branches/cycles/source/blender/editors/space_view3d/drawmesh.c
    branches/cycles/source/blender/editors/space_view3d/space_view3d.c
    branches/cycles/source/blender/makesrna/intern/rna_access.c
    branches/cycles/source/blender/modifiers/intern/MOD_subsurf.c
    branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c
    branches/cycles/source/blender/render/CMakeLists.txt
    branches/cycles/source/creator/CMakeLists.txt

Modified: branches/cycles/intern/CMakeLists.txt
===================================================================
--- branches/cycles/intern/CMakeLists.txt	2011-08-12 18:27:48 UTC (rev 39346)
+++ branches/cycles/intern/CMakeLists.txt	2011-08-12 18:29:21 UTC (rev 39347)
@@ -58,4 +58,3 @@
 if(WITH_IK_ITASC)
 	add_subdirectory(itasc)
 endif()
-

Modified: branches/cycles/source/blender/blenkernel/intern/material.c
===================================================================
--- branches/cycles/source/blender/blenkernel/intern/material.c	2011-08-12 18:27:48 UTC (rev 39346)
+++ branches/cycles/source/blender/blenkernel/intern/material.c	2011-08-12 18:29:21 UTC (rev 39347)
@@ -653,10 +653,6 @@
 	return NULL;
 }
 
-/*Image *give_mesh_face_image(Object *ob, int face)
-{
-}*/
-
 /* GS reads the memory pointed at in a specific ordering. There are,
  * however two definitions for it. I have jotted them down here, both,
  * but I think the first one is actually used. The thing is that

Modified: branches/cycles/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/cycles/source/blender/blenkernel/intern/object.c	2011-08-12 18:27:48 UTC (rev 39346)
+++ branches/cycles/source/blender/blenkernel/intern/object.c	2011-08-12 18:29:21 UTC (rev 39347)
@@ -860,7 +860,7 @@
 
 	for(a=0; a<MAX_MTEX; a++) {
 		if(lan->mtex[a]) {
-			lan->mtex[a]= MEM_mallocN(sizeof(MTex), "copy_lamp");
+			lan->mtex[a]= MEM_mallocN(sizeof(MTex), "copylamptex");
 			memcpy(lan->mtex[a], la->mtex[a], sizeof(MTex));
 			id_us_plus((ID *)lan->mtex[a]->tex);
 		}

Modified: branches/cycles/source/blender/blenkernel/intern/world.c
===================================================================
--- branches/cycles/source/blender/blenkernel/intern/world.c	2011-08-12 18:27:48 UTC (rev 39346)
+++ branches/cycles/source/blender/blenkernel/intern/world.c	2011-08-12 18:29:21 UTC (rev 39347)
@@ -137,7 +137,7 @@
 	
 	if(wrld->preview)
 		wrldn->preview = BKE_previewimg_copy(wrld->preview);
-	
+
 	return wrldn;
 }
 

Modified: branches/cycles/source/blender/editors/include/ED_uvedit.h
===================================================================
--- branches/cycles/source/blender/editors/include/ED_uvedit.h	2011-08-12 18:27:48 UTC (rev 39346)
+++ branches/cycles/source/blender/editors/include/ED_uvedit.h	2011-08-12 18:29:21 UTC (rev 39347)
@@ -35,6 +35,7 @@
 struct ARegionType;
 struct EditFace;
 struct Image;
+struct Main;
 struct ImageUser;
 struct MTFace;
 struct Object;

Modified: branches/cycles/source/blender/editors/screen/screen_edit.c
===================================================================
--- branches/cycles/source/blender/editors/screen/screen_edit.c	2011-08-12 18:27:48 UTC (rev 39346)
+++ branches/cycles/source/blender/editors/screen/screen_edit.c	2011-08-12 18:29:21 UTC (rev 39347)
@@ -671,9 +671,9 @@
 	/* test for collapsed areas. This could happen in some blender version... */
 	/* ton: removed option now, it needs Context... */
 	
-	/* make each window at least HEADERY high */
+	/* make each window at least ED_area_headersize() high */
 	for(sa= sc->areabase.first; sa; sa= sa->next) {
-		int headery= HEADERY+1;
+		int headery= ED_area_headersize()+1;
 		
 		if(sa->v1->vec.y+headery > sa->v2->vec.y) {
 			/* lower edge */

Modified: branches/cycles/source/blender/editors/space_node/node_ops.c
===================================================================
--- branches/cycles/source/blender/editors/space_node/node_ops.c	2011-08-12 18:27:48 UTC (rev 39346)
+++ branches/cycles/source/blender/editors/space_node/node_ops.c	2011-08-12 18:29:21 UTC (rev 39347)
@@ -195,5 +195,6 @@
 	WM_keymap_add_item(keymap, "NODE_OT_read_fullsamplelayers", RKEY, KM_PRESS, KM_SHIFT, 0);
 	WM_keymap_add_item(keymap, "NODE_OT_render_changed", ZKEY, KM_PRESS, 0, 0);
 	
+	
 	transform_keymap_for_space(keyconf, keymap, SPACE_NODE);
 }

Modified: branches/cycles/source/blender/editors/space_view3d/drawmesh.c
===================================================================
--- branches/cycles/source/blender/editors/space_view3d/drawmesh.c	2011-08-12 18:27:48 UTC (rev 39346)
+++ branches/cycles/source/blender/editors/space_view3d/drawmesh.c	2011-08-12 18:29:21 UTC (rev 39347)
@@ -131,7 +131,7 @@
 	MEdge *med = &me->medge[index];
 	uintptr_t flags = (intptr_t) BLI_edgehash_lookup(data->eh, med->v1, med->v2);
 
-	if(me->drawflag & ME_DRAWEDGES){ 
+	if(me->drawflag & ME_DRAWEDGES) { 
 		if(me->drawflag & ME_HIDDENEDGES)
 			return 1;
 		else
@@ -223,7 +223,7 @@
 	static int c_litmatnr;
 	static int c_badtex;
 
-	if(clearcache) {
+	if (clearcache) {
 		c_textured= c_lit= c_doublesided= -1;
 		c_texface= (MTFace*) -1;
 		c_litob= (Object*) -1;
@@ -231,7 +231,7 @@
 		c_badtex= 0;
 	}
 
-	if(texface) {
+	if (texface) {
 		lit = lit && (lit==-1 || texface->mode&TF_LIGHT);
 		textured = textured && (texface->mode&TF_TEX);
 		doublesided = texface->mode&TF_TWOSIDE;
@@ -239,15 +239,15 @@
 		textured = 0;
 	}
 
-	if(doublesided!=c_doublesided) {
-		if(doublesided) glDisable(GL_CULL_FACE);
+	if (doublesided!=c_doublesided) {
+		if (doublesided) glDisable(GL_CULL_FACE);
 		else glEnable(GL_CULL_FACE);
 
 		c_doublesided= doublesided;
 	}
 
-	if(textured!=c_textured || texface!=c_texface) {
-		if(textured ) {
+	if (textured!=c_textured || texface!=c_texface) {
+		if (textured ) {
 			c_badtex= !GPU_set_tpage(texface, !(litob->mode & OB_MODE_TEXTURE_PAINT));
 		} else {
 			GPU_set_tpage(NULL, 0);
@@ -257,9 +257,9 @@
 		c_texface= texface;
 	}
 
-	if(c_badtex) lit= 0;
-	if(lit!=c_lit || litob!=c_litob || litmatnr!=c_litmatnr) {
-		if(lit) {
+	if (c_badtex) lit= 0;
+	if (lit!=c_lit || litob!=c_litob || litmatnr!=c_litmatnr) {
+		if (lit) {
 			Material *ma= give_current_material_or_def(litob, litmatnr+1);
 			float spec[4];
 
@@ -353,16 +353,16 @@
 
 static int draw_tface__set_draw_legacy(MTFace *tface, MCol *mcol, int matnr)
 {
-	if(tface && (tface->mode&TF_INVISIBLE)) return 0;
+	if (tface && (tface->mode&TF_INVISIBLE)) return 0;
 
-	if(tface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE)) {
+	if (tface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE)) {
 		glColor3ub(0xFF, 0x00, 0xFF);
 		return 2; /* Don't set color */
-	} else if(tface && tface->mode&TF_OBCOL) {
+	} else if (tface && tface->mode&TF_OBCOL) {
 		glColor3ubv(Gtexdraw.obcol);
 		return 2; /* Don't set color */
-	} else if(!mcol) {
-		if(tface) glColor3f(1.0, 1.0, 1.0);
+	} else if (!mcol) {
+		if (tface) glColor3f(1.0, 1.0, 1.0);
 		else {
 			Material *ma= give_current_material(Gtexdraw.ob, matnr+1);
 			if(ma) {
@@ -381,13 +381,13 @@
 }
 static int draw_tface__set_draw(MTFace *tface, MCol *mcol, int matnr)
 {
-	if(tface && (tface->mode&TF_INVISIBLE)) return 0;
+	if (tface && (tface->mode&TF_INVISIBLE)) return 0;
 
-	if(tface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE)) {
+	if (tface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE)) {
 		return 2; /* Don't set color */
-	} else if(tface && tface->mode&TF_OBCOL) {
+	} else if (tface && tface->mode&TF_OBCOL) {
 		return 2; /* Don't set color */
-	} else if(!mcol) {
+	} else if (!mcol) {
 		return 1; /* Don't set color */
 	} else {
 		return 1; /* Set color from mcol */
@@ -405,7 +405,7 @@
 
 	finalCol = MEM_mallocN(sizeof(MCol)*4*dm->getNumFaces(dm),"add_tface_color_layer");
 	for(i=0;i<dm->getNumFaces(dm);i++) {
-		if(tface && (tface->mode&TF_INVISIBLE)) {
+		if (tface && (tface->mode&TF_INVISIBLE)) {
 			if( mcol )
 				memcpy(&finalCol[i*4],&mcol[i*4],sizeof(MCol)*4);
 			else
@@ -415,20 +415,20 @@
 					finalCol[i*4+j].r = 255;
 				}
 		}
-		else if(tface && mface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, mface[i].mat_nr, TF_TWOSIDE)) {
+		else if (tface && mface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, mface[i].mat_nr, TF_TWOSIDE)) {
 			for(j=0;j<4;j++) {
 				finalCol[i*4+j].b = 255;
 				finalCol[i*4+j].g = 0;
 				finalCol[i*4+j].r = 255;
 			}
-		} else if(tface && tface->mode&TF_OBCOL) {
+		} else if (tface && tface->mode&TF_OBCOL) {
 			for(j=0;j<4;j++) {
 				finalCol[i*4+j].r = FTOCHAR(Gtexdraw.obcol[0]);
 				finalCol[i*4+j].g = FTOCHAR(Gtexdraw.obcol[1]);
 				finalCol[i*4+j].b = FTOCHAR(Gtexdraw.obcol[2]);
 			}
-		} else if(!mcol) {
-			if(tface) {
+		} else if (!mcol) {
+			if (tface) {
 				for(j=0;j<4;j++) {
 					finalCol[i*4+j].b = 255;
 					finalCol[i*4+j].g = 255;
@@ -474,7 +474,7 @@
 	MFace *mface = &me->mface[index];
 	MCol *mcol = (me->mcol)? &me->mcol[index]: NULL;
 	const int matnr = mface->mat_nr;
-	if(mface->flag & ME_HIDE) return 0;
+	if (mface->flag & ME_HIDE) return 0;
 	return draw_tface__set_draw(tface, mcol, matnr);
 }
 
@@ -486,7 +486,7 @@
 	MCol *mcol;
 	int matnr;
 
-	if(efa->h)
+	if (efa->h)
 		return 0;
 
 	tface = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
@@ -500,7 +500,7 @@
 {
 	Mesh *me = (Mesh*)userData;
 
-	if(	(me->mface && me->mface[index].flag & ME_HIDE) ||
+	if (	(me->mface && me->mface[index].flag & ME_HIDE) ||
 			(me->mtface && (me->mtface[index].mode & TF_INVISIBLE))
 	) {
 		return 0;
@@ -539,7 +539,7 @@
 		int matnr= mf->mat_nr;
 		int mf_smooth= mf->flag & ME_SMOOTH;
 
-		if(!(mf->flag&ME_HIDE) && !(mode&TF_INVISIBLE) && (mode&TF_BMFONT)) {
+		if (!(mf->flag&ME_HIDE) && !(mode&TF_INVISIBLE) && (mode&TF_BMFONT)) {
 			float v1[3], v2[3], v3[3], v4[3];
 			char string[MAX_PROPSTRING];
 			int characters, i, glattrib= -1, badtex= 0;
@@ -556,8 +556,8 @@
 			}
 			else {
 				badtex = set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE);
-				if(badtex) {
-					if(mcol) mcol+=4;
+				if (badtex) {
+					if (mcol) mcol+=4;
 					continue;
 				}
 			}
@@ -565,7 +565,7 @@
 			ddm->getVertCo(ddm, mf->v1, v1);
 			ddm->getVertCo(ddm, mf->v2, v2);
 			ddm->getVertCo(ddm, mf->v3, v3);
-			if(mf->v4) ddm->getVertCo(ddm, mf->v4, v4);
+			if (mf->v4) ddm->getVertCo(ddm, mf->v4, v4);
 
 			// The BM_FONT handling is in the gpu module, shared with the
 			// game engine, was duplicated previously
@@ -576,7 +576,7 @@
 			if(!BKE_image_get_ibuf(tface->tpage, NULL))
 				characters = 0;
 
-			if(!mf_smooth) {
+			if (!mf_smooth) {
 				float nor[3];
 
 				normal_tri_v3( nor,v1, v2, v3);
@@ -587,7 +587,7 @@

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list