From 9a1217e55980f9b0a501fbe03ab2ea559638392d Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 7 Aug 2008 15:04:25 +0000 Subject: soc-2008-mxcurioni: first version of lib3ds code. It does NOT work yet and has to be debugged. It can be activate in app_blender/api.cpp by replacing the FRS_scene_3ds_export call in FRS_prepare, by FRS_load_mesh. All of the reference to the original Material class were renamed to FrsMaterial to resolve a name collision with Blender. To keep the window context necessary to draw the strokes after RE_Database_FromScene has been called, the display_clear function is used. --- .../freestyle/intern/view_map/ViewMapIO.cpp | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'source/blender/freestyle/intern/view_map/ViewMapIO.cpp') diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp index e42a0df0422..f99a574766b 100755 --- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp @@ -91,7 +91,7 @@ namespace ViewMapIO { inline - int load(istream& in, Material& m) { + int load(istream& in, FrsMaterial& m) { float tmp_array[4]; int i; @@ -149,13 +149,13 @@ namespace ViewMapIO { // -> Material READ(size); - vector materials; - Material m; + vector frs_materials; + FrsMaterial m; for(i=0; isshape()->setMaterials(materials); + vs->sshape()->setFrsMaterials(frs_materials); @@ -252,7 +252,7 @@ namespace ViewMapIO { // Material READ(matindex); - fesmooth->setMaterialIndex(matindex); + fesmooth->setFrsMaterialIndex(matindex); }else{ // aNormal load(in, v); @@ -264,9 +264,9 @@ namespace ViewMapIO { // Materials READ(matindex); - fesharp->setaMaterialIndex(matindex); + fesharp->setaFrsMaterialIndex(matindex); READ(matindex); - fesharp->setbMaterialIndex(matindex); + fesharp->setbFrsMaterialIndex(matindex); } unsigned tmp; @@ -569,7 +569,7 @@ namespace ViewMapIO { inline - int save(ostream& out, const Material& m) { + int save(ostream& out, const FrsMaterial& m) { unsigned i; @@ -622,10 +622,10 @@ namespace ViewMapIO { // Not necessary (only used during view map computatiom) // -> Material - unsigned size = vs->sshape()->materials().size(); + unsigned size = vs->sshape()->frs_materials().size(); WRITE(size); for(unsigned i=0; isshape()->material(i)); + save(out, vs->sshape()->frs_material(i)); // -> VerticesList (List) tmp = vs->sshape()->getVertexList().size(); @@ -704,7 +704,7 @@ namespace ViewMapIO { // normal save(out, fesmooth->normal()); // material - index = fesmooth->materialIndex(); + index = fesmooth->frs_materialIndex(); WRITE(index); }else{ // aNormal @@ -712,10 +712,10 @@ namespace ViewMapIO { // bNormal save(out, fesharp->normalB()); // aMaterial - index = fesharp->aMaterialIndex(); + index = fesharp->aFrsMaterialIndex(); WRITE(index); // bMaterial - index = fesharp->bMaterialIndex(); + index = fesharp->bFrsMaterialIndex(); WRITE(index); } -- cgit v1.2.3