Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-08-07 19:04:25 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-08-07 19:04:25 +0400
commit9a1217e55980f9b0a501fbe03ab2ea559638392d (patch)
tree28b4c5bcf547d2d9f63d7d687ff6f43064cc0dc5 /source/blender/freestyle/intern/view_map/ViewMapIO.cpp
parent1baf09110b2c3bd4a6eea128b61ca9a0017f81dd (diff)
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.
Diffstat (limited to 'source/blender/freestyle/intern/view_map/ViewMapIO.cpp')
-rwxr-xr-xsource/blender/freestyle/intern/view_map/ViewMapIO.cpp28
1 files changed, 14 insertions, 14 deletions
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<Material> materials;
- Material m;
+ vector<FrsMaterial> frs_materials;
+ FrsMaterial m;
for(i=0; i<size; ++i){
load(in, m);
- materials.push_back(m);
+ frs_materials.push_back(m);
}
- vs->sshape()->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; i<size; ++i)
- save(out, vs->sshape()->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);
}