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:
authorAlfredo de Greef <eeshlo@yahoo.com>2005-05-10 06:00:13 +0400
committerAlfredo de Greef <eeshlo@yahoo.com>2005-05-10 06:00:13 +0400
commit0c3f0556770ba1ef599400546beec62577904b35 (patch)
tree4d7182f0c837e8347c6d3113f6fbf93109169049 /source/blender/yafray
parent3676fb1b3fa6362d1c713b5d50c429828e921223 (diff)
Forgot part of the vertexcolor endian fix in xml export code.
Fixed an as of yet unreported bug, linked data objects which have materials linked to object instead of data have to be exported as normal, they cannot be instanciated, otherwise they will all share the same material.
Diffstat (limited to 'source/blender/yafray')
-rwxr-xr-xsource/blender/yafray/intern/export_File.cpp24
-rw-r--r--source/blender/yafray/intern/export_Plugin.cpp2
2 files changed, 11 insertions, 15 deletions
diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp
index 948b2a210af..f259a2b903f 100755
--- a/source/blender/yafray/intern/export_File.cpp
+++ b/source/blender/yafray/intern/export_File.cpp
@@ -1055,7 +1055,7 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
// or flat shaded, the smooth flag of the first face is used to determine
// the shading for the whole mesh
if (face0->flag & ME_SMOOTH)
- xmlfile << "\t<mesh autosmooth=\"90\" has_orco=\"" << has_orco << "\" >\n";
+ xmlfile << "\t<mesh autosmooth=\"180\" has_orco=\"" << has_orco << "\" >\n";
else
xmlfile << "\t<mesh autosmooth=\"0.1\" has_orco=\"" << has_orco << "\" >\n"; //0 shows artefacts
}
@@ -1226,19 +1226,15 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
}
if ((EXPORT_VCOL) && (vlr->vcol)) {
// vertex colors
- float vr, vg, vb;
- vr = ((vlr->vcol[ui1] >> 24) & 255)/255.0;
- vg = ((vlr->vcol[ui1] >> 16) & 255)/255.0;
- vb = ((vlr->vcol[ui1] >> 8) & 255)/255.0;
- ostr << " vcol_a_r=\"" << vr << "\" vcol_a_g=\"" << vg << "\" vcol_a_b=\"" << vb << "\"";
- vr = ((vlr->vcol[ui2] >> 24) & 255)/255.0;
- vg = ((vlr->vcol[ui2] >> 16) & 255)/255.0;
- vb = ((vlr->vcol[ui2] >> 8) & 255)/255.0;
- ostr << " vcol_b_r=\"" << vr << "\" vcol_b_g=\"" << vg << "\" vcol_b_b=\"" << vb << "\"";
- vr = ((vlr->vcol[ui3] >> 24) & 255)/255.0;
- vg = ((vlr->vcol[ui3] >> 16) & 255)/255.0;
- vb = ((vlr->vcol[ui3] >> 8) & 255)/255.0;
- ostr << " vcol_c_r=\"" << vr << "\" vcol_c_g=\"" << vg << "\" vcol_c_b=\"" << vb << "\"";
+ unsigned char* pt = reinterpret_cast<unsigned char*>(&vlr->vcol[ui1]);
+ ostr << " vcol_a_r=\"" << (float)pt[3]/255.f << "\" vcol_a_g=\"" << (float)pt[2]/255.f
+ << "\" vcol_a_b=\"" << (float)pt[1]/255.f << "\"";
+ pt = reinterpret_cast<unsigned char*>(&vlr->vcol[ui2]);
+ ostr << " vcol_b_r=\"" << (float)pt[3]/255.f << "\" vcol_b_g=\"" << (float)pt[2]/255.f
+ << "\" vcol_b_b=\"" << (float)pt[1]/255.f << "\"";
+ pt = reinterpret_cast<unsigned char*>(&vlr->vcol[ui3]);
+ ostr << " vcol_c_r=\"" << (float)pt[3]/255.f << "\" vcol_c_g=\"" << (float)pt[2]/255.f
+ << "\" vcol_c_b=\"" << (float)pt[1]/255.f << "\"";
}
ostr << " shader_name=\"" << fmatname << "\" />\n";
diff --git a/source/blender/yafray/intern/export_Plugin.cpp b/source/blender/yafray/intern/export_Plugin.cpp
index 6654059f875..9de22ffc12c 100644
--- a/source/blender/yafray/intern/export_Plugin.cpp
+++ b/source/blender/yafray/intern/export_Plugin.cpp
@@ -1193,7 +1193,7 @@ void yafrayPluginRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_
if (no_auto) {
// no per face smooth flag in yafray, if AutoSmooth not used,
// use smooth flag of the first face instead
- if (face0->flag & ME_SMOOTH) sm_angle=90;
+ if (face0->flag & ME_SMOOTH) sm_angle=180;
}
vector<yafray::point3d_t> verts;
vector<yafray::CFLOAT> vcol;