[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21336] branches/soc-2009-chingachgook/ source/blender/collada: Small fix - now import per-face materials should work properly.

Chingiz Dyussenov chingiz.ds at gmail.com
Fri Jul 3 09:54:55 CEST 2009


Revision: 21336
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21336
Author:   chingachgook
Date:     2009-07-03 09:54:55 +0200 (Fri, 03 Jul 2009)

Log Message:
-----------
Small fix - now import per-face materials should work properly.

Modified Paths:
--------------
    branches/soc-2009-chingachgook/source/blender/collada/DocumentExporter.cpp
    branches/soc-2009-chingachgook/source/blender/collada/DocumentImporter.cpp

Modified: branches/soc-2009-chingachgook/source/blender/collada/DocumentExporter.cpp
===================================================================
--- branches/soc-2009-chingachgook/source/blender/collada/DocumentExporter.cpp	2009-07-03 04:48:44 UTC (rev 21335)
+++ branches/soc-2009-chingachgook/source/blender/collada/DocumentExporter.cpp	2009-07-03 07:54:55 UTC (rev 21336)
@@ -548,7 +548,7 @@
 		node.start();
 
 		node.addTranslate(ob->loc[0], ob->loc[1], ob->loc[2]);
-
+		
 		// when animation time comes, replace a single <rotate> with 3, one for each axis
 		float quat[4];
 		float axis[3];
@@ -575,7 +575,7 @@
 				COLLADASW::InstanceMaterial im(matid, COLLADASW::URI
 											   (COLLADABU::Utils::EMPTY_STRING,
 												matid));
-
+				
 				// create <bind_vertex_input> for each uv layer
 				Mesh *me = (Mesh*)ob->data;
 				int totlayer = CustomData_number_of_layers(&me->fdata, CD_MTFACE);

Modified: branches/soc-2009-chingachgook/source/blender/collada/DocumentImporter.cpp
===================================================================
--- branches/soc-2009-chingachgook/source/blender/collada/DocumentImporter.cpp	2009-07-03 04:48:44 UTC (rev 21335)
+++ branches/soc-2009-chingachgook/source/blender/collada/DocumentImporter.cpp	2009-07-03 07:54:55 UTC (rev 21336)
@@ -360,6 +360,7 @@
 						int l = 0;
 						while (l++ < prim.totface) {
 							prim.mface->mat_nr = k;
+							prim.mface++;
 						}
 					}
 				}





More information about the Bf-blender-cvs mailing list