[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40479] branches/bmesh/blender: svn merge ^/trunk/blender -r40372:40379

Campbell Barton ideasman42 at gmail.com
Fri Sep 23 08:18:03 CEST 2011


Revision: 40479
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40479
Author:   campbellbarton
Date:     2011-09-23 06:18:03 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
svn merge ^/trunk/blender -r40372:40379

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40372

Modified Paths:
--------------
    branches/bmesh/blender/doc/python_api/sphinx_doc_gen.py
    branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c
    branches/bmesh/blender/source/blender/blenkernel/intern/material.c
    branches/bmesh/blender/source/blender/blenkernel/intern/subsurf_ccg.c
    branches/bmesh/blender/source/blender/editors/armature/editarmature.c
    branches/bmesh/blender/source/blender/editors/sound/sound_ops.c
    branches/bmesh/blender/source/blender/editors/space_view3d/drawmesh.c
    branches/bmesh/blender/source/blender/editors/space_view3d/view3d_select.c
    branches/bmesh/blender/source/blender/nodes/composite/node_composite_util.h
    branches/bmesh/blender/source/blender/render/intern/source/rendercore.c

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/release/
    branches/bmesh/blender/source/blender/editors/space_outliner/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:39992-40372
   + /trunk/blender:39992-40379

Modified: branches/bmesh/blender/doc/python_api/sphinx_doc_gen.py
===================================================================
--- branches/bmesh/blender/doc/python_api/sphinx_doc_gen.py	2011-09-23 05:59:37 UTC (rev 40478)
+++ branches/bmesh/blender/doc/python_api/sphinx_doc_gen.py	2011-09-23 06:18:03 UTC (rev 40479)
@@ -1036,8 +1036,12 @@
     fw("copyright = u'Blender Foundation'\n")
     fw("version = '%s - API'\n" % version_string)
     fw("release = '%s - API'\n" % version_string)
-    fw("html_theme = 'blender-org'\n")
-    fw("html_theme_path = ['../']\n")
+
+    # until we get a theme for 'Naiad'
+    if 0:
+        fw("html_theme = 'blender-org'\n")
+        fw("html_theme_path = ['../']\n")
+
     fw("html_favicon = 'favicon.ico'\n")
     # not helpful since the source us generated, adds to upload size.
     fw("html_copy_source = False\n")


Property changes on: branches/bmesh/blender/release
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender/release:31524-40372
   + /trunk/blender/release:31524-40379

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c	2011-09-23 05:59:37 UTC (rev 40478)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c	2011-09-23 06:18:03 UTC (rev 40479)
@@ -1095,7 +1095,7 @@
 	DMVertexAttribs attribs;
 	MVert *mvert = cddm->mvert;
 	MFace *mface = cddm->mface;
-	MTFace *tf = dm->getTessFaceDataArray(dm, CD_MTFACE);
+	/* MTFace *tf = dm->getTessFaceDataArray(dm, CD_MTFACE); */ /* UNUSED */
 	float (*nors)[3] = dm->getTessFaceDataArray(dm, CD_NORMAL);
 	int a, b, dodraw, matnr, new_matnr;
 	int orig, *index = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/material.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/material.c	2011-09-23 05:59:37 UTC (rev 40478)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/material.c	2011-09-23 06:18:03 UTC (rev 40479)
@@ -37,6 +37,7 @@
 
 #include <string.h>
 #include <math.h>
+#include <stddef.h>
 
 #include "MEM_guardedalloc.h"
 
@@ -1480,7 +1481,7 @@
 
 /*********************** texface to material convert functions **********************/
 /* encode all the TF information into a single int */
-int encode_tfaceflag(MTFace *tf, int convertall)
+static int encode_tfaceflag(MTFace *tf, int convertall)
 {
 	/* calculate the flag */
 	int flag = tf->mode;
@@ -1507,7 +1508,7 @@
 }
 
 /* set the material options based in the tface flag */
-void decode_tfaceflag(Material *ma, int flag, int convertall)
+static void decode_tfaceflag(Material *ma, int flag, int convertall)
 {
 	int alphablend;	
 	GameSettings *game= &ma->game;
@@ -1544,7 +1545,7 @@
 }
 
 /* boolean check to see if the mesh needs a material */
-int check_tfaceneedmaterial(int flag)
+static int check_tfaceneedmaterial(int flag)
 {
 	// check if the flags we have are not deprecated != than default material options
 	// also if only flags are visible and collision see if all objects using this mesh have this option in physics
@@ -1575,7 +1576,7 @@
 
 /* return number of digits of an integer */
 // XXX to be optmized or replaced by an equivalent blender internal function
-int integer_getdigits(int number)
+static int integer_getdigits(int number)
 {
 	int i=0;
 	if (number == 0) return 1;
@@ -1587,7 +1588,7 @@
 	return i;
 }
 
-void calculate_tface_materialname(char *matname, char *newname, int flag)
+static void calculate_tface_materialname(char *matname, char *newname, int flag)
 {
 	// if flag has only light and collision and material matches those values
 	// you can do strcpy(name, mat_name);
@@ -1599,7 +1600,7 @@
 }
 
 /* returns -1 if no match */
-int mesh_getmaterialnumber(Mesh *me, Material *ma) {
+static int mesh_getmaterialnumber(Mesh *me, Material *ma) {
 	int a;
 
 	for (a=0; a<me->totcol; a++)
@@ -1610,7 +1611,7 @@
 }
 
 /* append material */
-int mesh_addmaterial(Mesh *me, Material *ma)
+static int mesh_addmaterial(Mesh *me, Material *ma)
 {
 	material_append_id(&me->id, NULL);
 	me->mat[me->totcol-1]= ma;
@@ -1620,18 +1621,8 @@
 	return me->totcol-1;
 }
 
-Material *materialbyname(Main *main, char *name)
+static void set_facetexture_flags(Material *ma, Image *image)
 {
-	Material *mat = NULL;
-	for (mat=main->mat.first;mat;mat=mat->id.next) {
-		if (strcmp(mat->id.name, name)==0)
-			return mat; 
-	}
-	return NULL;
-}
-
-void set_facetexture_flags(Material *ma, Image *image)
-{
 	if(image) {
 		ma->mode |= MA_FACETEXTURE;
 		/* we could check if the texture has alpha, but then more meshes sharing the same
@@ -1642,17 +1633,17 @@
 }
 
 /* returns material number */
-int convert_tfacenomaterial(Main *main, Mesh *me, MTFace *tf, int flag)
+static int convert_tfacenomaterial(Main *main, Mesh *me, MTFace *tf, int flag)
 {
 	Material *ma;
-	char name[MAX_ID_NAME];
+	char idname[MAX_ID_NAME];
 	int mat_nr= -1;
 	
 	/* new material, the name uses the flag*/
-	sprintf(name, "MAMaterial.TF.%0*d", integer_getdigits(flag), flag);
+	sprintf(idname, "MAMaterial.TF.%0*d", integer_getdigits(flag), flag);
 	
-	if ((ma=materialbyname(main, name))) {
-		mat_nr = mesh_getmaterialnumber(me, ma);
+	if ((ma= BLI_findstring(&main->mat, idname+2, offsetof(ID, name)+2))) {
+		mat_nr= mesh_getmaterialnumber(me, ma);
 		/* assign the material to the mesh */
 		if(mat_nr == -1) mat_nr= mesh_addmaterial(me, ma);
 
@@ -1661,10 +1652,10 @@
 	}
 	/* create a new material */
 	else {
-		ma=add_material(name+2);
+		ma= add_material(idname+2);
 
 		if(ma){
-			printf("TexFace Convert: Material \"%s\" created.\n", name+2);
+			printf("TexFace Convert: Material \"%s\" created.\n", idname+2);
 			mat_nr= mesh_addmaterial(me, ma);
 			
 			/* if needed set "Face Textures [Alpha]" Material options */
@@ -1677,7 +1668,7 @@
 			ma->game.flag = -flag;
 			id_us_min((ID *)ma);	
 		}
-		else printf("Error: Unable to create Material \"%s\" for Mesh \"%s\".", name+2, me->id.name+2);
+		else printf("Error: Unable to create Material \"%s\" for Mesh \"%s\".", idname+2, me->id.name+2);
 	}
 
 	/* set as converted, no need to go bad to this face */
@@ -1686,7 +1677,7 @@
 }
 
 /* Function to fully convert materials */
-void convert_tfacematerial(Main *main, Material *ma)
+static void convert_tfacematerial(Main *main, Material *ma)
 {
 	Mesh *me;
 	Material *mat_new;
@@ -1695,7 +1686,7 @@
 	int flag, index;
 	int a, mat_nr;
 	CustomDataLayer *cdl;
-	char name[MAX_ID_NAME];
+	char idname[MAX_ID_NAME];
 
 	for(me=main->mesh.first; me; me=me->id.next){
 		/* check if this mesh uses this material */
@@ -1719,9 +1710,9 @@
 			flag = encode_tfaceflag(tf, 1);
 
 			/* the name of the new material */
-			calculate_tface_materialname(ma->id.name, (char *)&name, flag);
+			calculate_tface_materialname(ma->id.name, (char *)&idname, flag);
 
-			if ((mat_new=materialbyname(main, name))) {
+			if ((mat_new= BLI_findstring(&main->mat, idname+2, offsetof(ID, name)+2))) {
 				/* material already existent, see if the mesh has it */
 				mat_nr = mesh_getmaterialnumber(me, mat_new);
 				/* material is not in the mesh, add it */
@@ -1732,14 +1723,14 @@
 				mat_new=copy_material(ma);
 				if(mat_new){
 					/* rename the material*/
-					strcpy(mat_new->id.name, name);
+					strcpy(mat_new->id.name, idname);
 					id_us_min((ID *)mat_new);	
 
 					mat_nr= mesh_addmaterial(me, mat_new);
 					decode_tfaceflag(mat_new, flag, 1);
 				}
 				else {
-					printf("Error: Unable to create Material \"%s\" for Mesh \"%s.", name+2, me->id.name+2);
+					printf("Error: Unable to create Material \"%s\" for Mesh \"%s.", idname+2, me->id.name+2);
 					mat_nr = mf->mat_nr;
 					continue;
 				}
@@ -1771,18 +1762,17 @@
 	int a;
 	int flag;
 	int index;
-	int nummat;
 
  	/* sometimes mesh has no materials but will need a new one. In those
 	 * cases we need to ignore the mf->mat_nr and only look at the face
-	 * mode because it can be zero as unitialized or the 1st created material
+	 * mode because it can be zero as uninitialized or the 1st created material
 	 */
 	int nomaterialslots;
 
 	/* alert to user to check the console */
 	int nowarning = 1;
 
-	/* mark all the materials to convertion with a flag
+	/* mark all the materials to conversion with a flag
 	 * if there is tface create a complete flag for that storing in flag
 	 * if there is tface and flag > 0: creates a new flag based on this face
 	 * if flags are different set flag to -1  
@@ -1869,7 +1859,7 @@
 						ma->game.flag = -flag;
 						
 						/* some people uses multitexture with TexFace by creating a texture
-						 * channel which not necessarly the tf->tpage image. But the game engine
+						 * channel which not neccessarly the tf->tpage image. But the game engine
 						 * was enabling it. Now it's required to set "Face Texture [Alpha] in the
 						 * material settings. */
 						if(!fileload)

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/subsurf_ccg.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/subsurf_ccg.c	2011-09-23 05:59:37 UTC (rev 40478)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/subsurf_ccg.c	2011-09-23 06:18:03 UTC (rev 40479)
@@ -1594,7 +1594,7 @@
 	CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss);
 	GPUVertexAttribs gattribs;
 	DMVertexAttribs attribs= {{{NULL}}};
-	MTFace *tf = dm->getTessFaceDataArray(dm, CD_MTFACE);
+	/* MTFace *tf = dm->getTessFaceDataArray(dm, CD_MTFACE); */ /* UNUSED */
 	int gridSize = ccgSubSurf_getGridSize(ss);
 	int gridFaces = gridSize - 1;
 	int edgeSize = ccgSubSurf_getEdgeSize(ss);

Modified: branches/bmesh/blender/source/blender/editors/armature/editarmature.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/armature/editarmature.c	2011-09-23 05:59:37 UTC (rev 40478)
+++ branches/bmesh/blender/source/blender/editors/armature/editarmature.c	2011-09-23 06:18:03 UTC (rev 40479)
@@ -4298,7 +4298,7 @@

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list