diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-13 00:16:53 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-13 00:16:53 +0300 |
commit | bdfe7d89e2f1292644577972c716931b4ce3c6c3 (patch) | |
tree | d00eb50b749cb001e2b08272c91791e66740b05d /source/blender/yafray | |
parent | 78a1c27c4a6abe0ed31ca93ad21910f3df04da56 (diff) | |
parent | 7e4db234cee71ead34ee81a12e27da4bd548eb4b (diff) |
Merge of trunk into blender 2.5:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416
Issues:
* GHOST/X11 had conflicting changes. Some code was added in 2.5, which was
later added in trunk also, but reverted partially, specifically revision
16683. I have left out this reversion in the 2.5 branch since I think it is
needed there.
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683
* Scons had various conflicting changes, I decided to go with trunk version
for everything except priorities and some library renaming.
* In creator.c, there were various fixes and fixes for fixes related to the -w
-W and -p options. In 2.5 -w and -W is not coded yet, and -p is done
differently. Since this is changed so much, and I don't think those fixes
would be needed in 2.5, I've left them out.
* Also in creator.c: there was code for a python bugfix where the screen was not
initialized when running with -P. The code that initializes the screen there
I had to disable, that can't work in 2.5 anymore but left it commented as a
reminder.
Further I had to disable some new function calls. using src/ and python/, as
was done already in this branch, disabled function calls:
* bpath.c: error reporting
* BME_conversions.c: editmesh conversion functions.
* SHD_dynamic: disabled almost completely, there is no python/.
* KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled.
* text.c: clipboard copy call.
* object.c: OB_SUPPORT_MATERIAL.
* DerivedMesh.c and subsurf_ccg, stipple_quarttone.
Still to be done:
* Go over files and functions that were moved to a different location but could
still use changes that were done in trunk.
Diffstat (limited to 'source/blender/yafray')
-rw-r--r-- | source/blender/yafray/intern/export_File.cpp | 21 | ||||
-rw-r--r-- | source/blender/yafray/intern/export_File.h | 2 | ||||
-rw-r--r-- | source/blender/yafray/intern/export_Plugin.cpp | 62 | ||||
-rw-r--r-- | source/blender/yafray/intern/export_Plugin.h | 12 | ||||
-rw-r--r-- | source/blender/yafray/intern/yafray_Render.cpp | 9 | ||||
-rw-r--r-- | source/blender/yafray/intern/yafray_Render.h | 10 |
6 files changed, 64 insertions, 52 deletions
diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp index 40992513c8e..ea700965826 100644 --- a/source/blender/yafray/intern/export_File.cpp +++ b/source/blender/yafray/intern/export_File.cpp @@ -1,6 +1,7 @@ #include "export_File.h" #include <math.h> + #include <cstring> using namespace std; @@ -95,7 +96,7 @@ static void addDrive(string &path) static string unixYafrayPath() { - static char *alternative[]= + static const char *alternative[]= { "/usr/local/bin/", "/usr/bin/", @@ -125,7 +126,7 @@ static void adjustPath(string &path) // if relative, expand to full path char cpath[MAXPATHLEN]; strcpy(cpath, path.c_str()); - BLI_convertstringcode(cpath, G.sce, 0); + BLI_convertstringcode(cpath, G.sce); path = cpath; #ifdef WIN32 // add drive char if not there @@ -880,7 +881,7 @@ void yafrayFileRender_t::writeShader(const string &shader_name, Material* matr, ostr << "\t\t<input value=\"" << shader_name << "_map" << m2 << "\" />\n"; // blendtype, would have been nice if the order would have been the same as for ramps... - const string blendtype[9] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen"}; + const string blendtype[MTEX_NUM_BLENDTYPES] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen", "hue", "sat", "val", "color"}; ostr << "\t\t<mode value=\"" << blendtype[(int)mtex->blendtype] << "\" />\n"; // texture color (for use with MUL and/or no_rgb etc..) @@ -1189,7 +1190,7 @@ void yafrayFileRender_t::writeMaterialsAndModulators() } -void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_list, const float obmat[4][4]) +void yafrayFileRender_t::writeObject(Object* obj, ObjectRen *obr, const vector<VlakRen*> &VLR_list, const float obmat[4][4]) { ostr.str(""); // transform first (not necessarily actual obj->obmat, can be duplivert see below) @@ -1231,7 +1232,6 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li string matname(face0mat->id.name); // use name in imgtex_shader list if 'TexFace' enabled for this material if (face0mat->mode & MA_FACETEXTURE) { - ObjectRen *obr = face0->obr; MTFace* tface = RE_vlakren_get_tface(obr, face0, obr->actmtface, NULL, 0); if (tface) { Image* fimg = (Image*)tface->tpage; @@ -1409,7 +1409,6 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li fci2!=VLR_list.end();++fci2) { VlakRen* vlr = *fci2; - ObjectRen *obr = vlr->obr; Material* fmat = vlr->mat; bool EXPORT_VCOL = ((fmat->mode & (MA_VERTEXCOL|MA_VERTEXCOLP))!=0); string fmatname(fmat->id.name); @@ -1511,13 +1510,13 @@ void yafrayFileRender_t::writeAllObjects() { // first all objects except dupliverts (and main instance object for dups) - for (map<Object*, vector<VlakRen*> >::const_iterator obi=all_objects.begin(); + for (map<Object*, yafrayObjectRen >::const_iterator obi=all_objects.begin(); obi!=all_objects.end(); ++obi) { // skip main duplivert object if in dupliMtx_list, written later Object* obj = obi->first; if (dupliMtx_list.find(string(obj->id.name))!=dupliMtx_list.end()) continue; - writeObject(obj, obi->second, obj->obmat); + writeObject(obj, obi->second.obr, obi->second.faces, obj->obmat); } // Now all duplivert objects (if any) as instances of main object @@ -1537,7 +1536,7 @@ void yafrayFileRender_t::writeAllObjects() // first object written as normal (but with transform of first duplivert) Object* obj = dup_srcob[dupMtx->first]; - writeObject(obj, all_objects[obj], obmat); + writeObject(obj, all_objects[obj].obr, all_objects[obj].faces, obmat); // all others instances of first for (unsigned int curmtx=16;curmtx<dupMtx->second.size();curmtx+=16) { // number of 4x4 matrices @@ -2018,7 +2017,7 @@ bool yafrayFileRender_t::executeYafray(const string &xmlpath) { ostr.str(""); if (re->r.mode & R_BORDER) { - ostr << command_path << "yafray -c " << re->r.YF_numprocs + ostr << command_path << "yafray -c " << re->r.threads << " -r " << (2.f*re->r.border.xmin - 1.f) << ":" << (2.f*re->r.border.xmax - 1.f) << ":" << (2.f*re->r.border.ymin - 1.f) @@ -2026,7 +2025,7 @@ bool yafrayFileRender_t::executeYafray(const string &xmlpath) << " \"" << xmlpath << "\""; } else - ostr << command_path << "yafray -c " << re->r.YF_numprocs << " \"" << xmlpath << "\""; + ostr << command_path << "yafray -c " << re->r.threads << " \"" << xmlpath << "\""; string command = ostr.str(); cout << "COMMAND: " << command << endl; diff --git a/source/blender/yafray/intern/export_File.h b/source/blender/yafray/intern/export_File.h index 5d2e0c53a21..0eb1bfec1ed 100644 --- a/source/blender/yafray/intern/export_File.h +++ b/source/blender/yafray/intern/export_File.h @@ -18,7 +18,7 @@ class yafrayFileRender_t : public yafrayRender_t virtual void writeTextures(); virtual void writeShader(const std::string &shader_name, Material* matr, const std::string &facetexname=""); virtual void writeMaterialsAndModulators(); - virtual void writeObject(Object* obj, const std::vector<VlakRen*> &VLR_list, const float obmat[4][4]); + virtual void writeObject(Object* obj, ObjectRen *obr, const std::vector<VlakRen*> &VLR_list, const float obmat[4][4]); virtual void writeAllObjects(); virtual void writeAreaLamp(LampRen* lamp, int num, float iview[4][4]); virtual void writeLamps(); diff --git a/source/blender/yafray/intern/export_Plugin.cpp b/source/blender/yafray/intern/export_Plugin.cpp index 16ae2d97f62..db9fb7ccc72 100644 --- a/source/blender/yafray/intern/export_Plugin.cpp +++ b/source/blender/yafray/intern/export_Plugin.cpp @@ -1,7 +1,9 @@ #include "export_Plugin.h" #include <math.h> + #include <cstring> + using namespace std; @@ -72,7 +74,7 @@ extern "C" { extern char bprogname[]; } // add drive character if not in path string, using blender executable location as reference static void addDrive(string &path) { - int sp = path.find_first_of(":"); + size_t sp = path.find_first_of(":"); if (sp==-1) { string blpath = bprogname; sp = blpath.find_first_of(":"); @@ -96,9 +98,12 @@ static string YafrayPath() string path=find_path(); return path; #else - static char *alternative[]= + static const char *alternative[]= { "/usr/local/lib/", +#ifdef __x86_64__ + "/usr/lib64/", +#endif "/usr/lib/", NULL }; @@ -119,9 +124,12 @@ static string YafrayPluginPath() #ifdef WIN32 return find_path()+"\\plugins"; #else - static char *alternative[]= + static const char *alternative[]= { "/usr/local/lib/yafray", +#ifdef __x86_64__ + "/usr/lib64/yafray", +#endif "/usr/lib/yafray", NULL }; @@ -163,7 +171,9 @@ bool yafrayPluginRender_t::initExport() corehandle = PIL_dynlib_open((char *)(location + "\\yafraycore.dll").c_str()); if (corehandle==NULL) { - cerr << "Error loading yafray plugin: " << PIL_dynlib_get_error_as_string(corehandle) << endl; + char *err = PIL_dynlib_get_error_as_string(corehandle); + if (err) cerr << "Error loading yafray plugin: " << err << endl; + else cerr << "Error loading yafray plugin: Unknown." << endl; return false; } location += "\\yafrayplugin.dll"; @@ -184,7 +194,7 @@ bool yafrayPluginRender_t::initExport() cerr << "Error loading yafray plugin: " << PIL_dynlib_get_error_as_string(handle) << endl; return false; } - yafrayGate = constructor(re->r.YF_numprocs, YafrayPluginPath()); + yafrayGate = constructor(re->r.threads, YafrayPluginPath()); cout << "YafRay plugin loaded" << endl; plugin_loaded = true; @@ -244,7 +254,7 @@ bool yafrayPluginRender_t::writeRender() params["bias"] = yafray::parameter_t(re->r.YF_raybias); params["clamp_rgb"] = yafray::parameter_t((re->r.YF_clamprgb==0) ? "on" : "off"); // lynx request - params["threads"] = yafray::parameter_t((int)re->r.YF_numprocs); + params["threads"] = yafray::parameter_t((int)re->r.threads); blenderYafrayOutput_t output(re); yafrayGate->render(params, output); cout << "render finished" << endl; @@ -270,7 +280,7 @@ static void adjustPath(string &path) // if relative, expand to full path char cpath[MAXPATHLEN]; strcpy(cpath, path.c_str()); - BLI_convertstringcode(cpath, G.sce, 0); + BLI_convertstringcode(cpath, G.sce); path = cpath; #ifdef WIN32 // add drive char if not there @@ -774,7 +784,7 @@ void yafrayPluginRender_t::writeShader(const string &shader_name, Material* matr mparams["input"] = yafray::parameter_t(shader_name + temp); // blendtype, would have been nice if the order would have been the same as for ramps... - const string blendtype[9] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen"}; + const string blendtype[MTEX_NUM_BLENDTYPES] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen", "hue", "sat", "val", "color"}; mparams["mode"] = yafray::parameter_t(blendtype[(int)mtex->blendtype]); // texture color (for use with MUL and/or no_rgb etc..) @@ -1080,7 +1090,7 @@ void yafrayPluginRender_t::writeMaterialsAndModulators() } -void yafrayPluginRender_t::genUVcoords(vector<yafray::GFLOAT> &uvcoords, VlakRen *vlr, MTFace* uvc, bool comple) +void yafrayPluginRender_t::genUVcoords(vector<yafray::GFLOAT> &uvcoords, ObjectRen *obr, VlakRen *vlr, MTFace* uvc, bool comple) { if (uvc) { @@ -1108,9 +1118,8 @@ void yafrayPluginRender_t::genUVcoords(vector<yafray::GFLOAT> &uvcoords, VlakRen } } -void yafrayPluginRender_t::genVcol(vector<yafray::CFLOAT> &vcol, VlakRen *vlr, bool comple) +void yafrayPluginRender_t::genVcol(vector<yafray::CFLOAT> &vcol, ObjectRen *obr, VlakRen *vlr, bool comple) { - ObjectRen *obr= vlr->obr; MCol *mcol= RE_vlakren_get_mcol(obr, vlr, obr->actmcol, NULL, 0); if (mcol) @@ -1144,10 +1153,9 @@ void yafrayPluginRender_t::genVcol(vector<yafray::CFLOAT> &vcol, VlakRen *vlr, b void yafrayPluginRender_t::genFace(vector<int> &faces,vector<string> &shaders,vector<int> &faceshader, vector<yafray::GFLOAT> &uvcoords,vector<yafray::CFLOAT> &vcol, - map<VertRen*, int> &vert_idx,VlakRen *vlr, + map<VertRen*, int> &vert_idx,ObjectRen *obr,VlakRen *vlr, int has_orco,bool has_uv) { - ObjectRen *obr= vlr->obr; Material* fmat = vlr->mat; bool EXPORT_VCOL = ((fmat->mode & (MA_VERTEXCOL|MA_VERTEXCOLP))!=0); string fmatname(fmat->id.name); @@ -1186,16 +1194,15 @@ void yafrayPluginRender_t::genFace(vector<int> &faces,vector<string> &shaders,ve faces.push_back(idx1); faces.push_back(idx2); faces.push_back(idx3); - if(has_uv) genUVcoords(uvcoords, vlr, uvc); - if (EXPORT_VCOL) genVcol(vcol, vlr); + if(has_uv) genUVcoords(uvcoords, obr, vlr, uvc); + if (EXPORT_VCOL) genVcol(vcol, obr, vlr); } void yafrayPluginRender_t::genCompleFace(vector<int> &faces,/*vector<string> &shaders,*/vector<int> &faceshader, vector<yafray::GFLOAT> &uvcoords,vector<yafray::CFLOAT> &vcol, - map<VertRen*, int> &vert_idx,VlakRen *vlr, + map<VertRen*, int> &vert_idx,ObjectRen *obr,VlakRen *vlr, int has_orco,bool has_uv) { - ObjectRen *obr= vlr->obr; Material* fmat = vlr->mat; bool EXPORT_VCOL = ((fmat->mode & (MA_VERTEXCOL|MA_VERTEXCOLP))!=0); @@ -1211,12 +1218,12 @@ void yafrayPluginRender_t::genCompleFace(vector<int> &faces,/*vector<string> &sh faces.push_back(idx1); faces.push_back(idx2); faces.push_back(idx3); - if (has_uv) genUVcoords(uvcoords, vlr, uvc, true); - if (EXPORT_VCOL) genVcol(vcol, vlr, true); + if (has_uv) genUVcoords(uvcoords, obr, vlr, uvc, true); + if (EXPORT_VCOL) genVcol(vcol, obr, vlr, true); } void yafrayPluginRender_t::genVertices(vector<yafray::point3d_t> &verts, int &vidx, - map<VertRen*, int> &vert_idx, VlakRen* vlr, int has_orco, Object* obj) + map<VertRen*, int> &vert_idx, ObjectRen *obr, VlakRen* vlr, int has_orco, Object* obj) { VertRen* ver; float tvec[3]; // for back2world transform @@ -1281,7 +1288,7 @@ void yafrayPluginRender_t::genVertices(vector<yafray::point3d_t> &verts, int &vi } } -void yafrayPluginRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_list, const float obmat[4][4]) +void yafrayPluginRender_t::writeObject(Object* obj, ObjectRen *obr, const vector<VlakRen*> &VLR_list, const float obmat[4][4]) { float mtr[4*4]; mtr[0*4+0]=obmat[0][0]; mtr[0*4+1]=obmat[1][0]; mtr[0*4+2]=obmat[2][0]; mtr[0*4+3]=obmat[3][0]; @@ -1342,8 +1349,7 @@ void yafrayPluginRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_ fci!=VLR_list.end();++fci) { VlakRen* vlr = *fci; - ObjectRen *obr = vlr->obr; - genVertices(verts, vidx, vert_idx, vlr, has_orco, obj); + genVertices(verts, vidx, vert_idx, obr, vlr, has_orco, obj); if(RE_vlakren_get_tface(obr, vlr, obr->actmtface, NULL, 0)) has_uv=true; } // all faces using the index list created above @@ -1355,9 +1361,9 @@ void yafrayPluginRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_ fci2!=VLR_list.end();++fci2) { VlakRen* vlr = *fci2; - genFace(faces, shaders, faceshader, uvcoords, vcol, vert_idx, vlr, has_orco, has_uv); + genFace(faces, shaders, faceshader, uvcoords, vcol, vert_idx, obr, vlr, has_orco, has_uv); if (vlr->v4) - genCompleFace(faces, faceshader, uvcoords, vcol, vert_idx, vlr, has_orco, has_uv); + genCompleFace(faces, faceshader, uvcoords, vcol, vert_idx, obr, vlr, has_orco, has_uv); } // using the ObjectRen database, contruct a new name if object has a parent. @@ -1388,13 +1394,13 @@ void yafrayPluginRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_ void yafrayPluginRender_t::writeAllObjects() { // first all objects except dupliverts (and main instance object for dups) - for (map<Object*, vector<VlakRen*> >::const_iterator obi=all_objects.begin(); + for (map<Object*, yafrayObjectRen >::const_iterator obi=all_objects.begin(); obi!=all_objects.end(); ++obi) { // skip main duplivert object if in dupliMtx_list, written later Object* obj = obi->first; if (dupliMtx_list.find(string(obj->id.name))!=dupliMtx_list.end()) continue; - writeObject(obj, obi->second, obj->obmat); + writeObject(obj, obi->second.obr, obi->second.faces, obj->obmat); } // Now all duplivert objects (if any) as instances of main object @@ -1412,7 +1418,7 @@ void yafrayPluginRender_t::writeAllObjects() // first object written as normal (but with transform of first duplivert) Object* obj = dup_srcob[dupMtx->first]; - writeObject(obj, all_objects[obj], obmat); + writeObject(obj, all_objects[obj].obr, all_objects[obj].faces, obmat); // all others instances of first for (unsigned int curmtx=16;curmtx<dupMtx->second.size();curmtx+=16) diff --git a/source/blender/yafray/intern/export_Plugin.h b/source/blender/yafray/intern/export_Plugin.h index 1ce4988a260..660271daf96 100644 --- a/source/blender/yafray/intern/export_Plugin.h +++ b/source/blender/yafray/intern/export_Plugin.h @@ -35,7 +35,7 @@ class yafrayPluginRender_t : public yafrayRender_t virtual void writeTextures(); virtual void writeShader(const std::string &shader_name, Material* matr, const std::string &facetexname=""); virtual void writeMaterialsAndModulators(); - virtual void writeObject(Object* obj, + virtual void writeObject(Object* obj, ObjectRen *obr, const std::vector<VlakRen*> &VLR_list, const float obmat[4][4]); virtual void writeAllObjects(); virtual void writeAreaLamp(LampRen* lamp, int num, float iview[4][4]); @@ -48,18 +48,18 @@ class yafrayPluginRender_t : public yafrayRender_t virtual bool initExport(); virtual bool finishExport(); - void genUVcoords(std::vector<yafray::GFLOAT> &uvcoords,VlakRen *vlr,MTFace* uvc, bool comple=false); - void genVcol(std::vector<yafray::CFLOAT> &vcol, VlakRen *vlr, bool comple=false); + void genUVcoords(std::vector<yafray::GFLOAT> &uvcoords,ObjectRen *obr,VlakRen *vlr,MTFace* uvc, bool comple=false); + void genVcol(std::vector<yafray::CFLOAT> &vcol, ObjectRen *obr, VlakRen *vlr, bool comple=false); void genFace(std::vector<int> &faces,std::vector<std::string> &shaders,std::vector<int> &faceshader, std::vector<yafray::GFLOAT> &uvcoords,std::vector<yafray::CFLOAT> &vcol, - std::map<VertRen*, int> &vert_idx,VlakRen *vlr, + std::map<VertRen*, int> &vert_idx,ObjectRen *obr,VlakRen *vlr, int has_orco,bool has_uv); void genCompleFace(std::vector<int> &faces,/*std::vector<std::string> &shaders,*/std::vector<int> &faceshader, std::vector<yafray::GFLOAT> &uvcoords,std::vector<yafray::CFLOAT> &vcol, - std::map<VertRen*, int> &vert_idx,VlakRen *vlr, + std::map<VertRen*, int> &vert_idx,ObjectRen *obr, VlakRen *vlr, int has_orco,bool has_uv); void genVertices(std::vector<yafray::point3d_t> &verts, int &vidx, - std::map<VertRen*, int> &vert_idx, VlakRen* vlr, int has_orco, Object* obj); + std::map<VertRen*, int> &vert_idx, ObjectRen *obr, VlakRen* vlr, int has_orco, Object* obj); }; class blenderYafrayOutput_t : public yafray::colorOutput_t diff --git a/source/blender/yafray/intern/yafray_Render.cpp b/source/blender/yafray/intern/yafray_Render.cpp index 90229575235..01da4683d71 100644 --- a/source/blender/yafray/intern/yafray_Render.cpp +++ b/source/blender/yafray/intern/yafray_Render.cpp @@ -7,6 +7,7 @@ #include "yafray_Render.h" #include <math.h> + #include <cstring> using namespace std; @@ -142,15 +143,15 @@ bool yafrayRender_t::getAllMatTexObs() // Make list of faces per object, ignore <3 vert faces, duplicate vertex sorting done later. // ignore null object pointers. // Also make list of facetexture images (material 'TexFace'). - if (vlr->obr->ob) { + if (obr->ob) { int nv = 0; // number of vertices MTFace *tface; if (vlr->v4) nv=4; else if (vlr->v3) nv=3; if (nv) { - ObjectRen *obr= vlr->obr; renderobs[obr->ob->id.name] = obr->ob; - all_objects[obr->ob].push_back(vlr); + all_objects[obr->ob].obr= obr; + all_objects[obr->ob].faces.push_back(vlr); tface= RE_vlakren_get_tface(obr, vlr, obr->actmtface, NULL, 0); if (tface && tface->tpage) { @@ -185,7 +186,7 @@ bool yafrayRender_t::getAllMatTexObs() // in all_objects with the name given in dupliMtx_list if (!dupliMtx_list.empty()) { - for (map<Object*, vector<VlakRen*> >::const_iterator obn=all_objects.begin(); + for (map<Object*, yafrayObjectRen>::const_iterator obn=all_objects.begin(); obn!=all_objects.end();++obn) { Object* obj = obn->first; diff --git a/source/blender/yafray/intern/yafray_Render.h b/source/blender/yafray/intern/yafray_Render.h index 0debb0009fa..43d2c6c602a 100644 --- a/source/blender/yafray/intern/yafray_Render.h +++ b/source/blender/yafray/intern/yafray_Render.h @@ -52,6 +52,12 @@ extern void error (char *fmt, ...); #include <vector> #include <set> +class yafrayObjectRen { + public: + std::vector<VlakRen*> faces; + ObjectRen *obr; +}; + class yafrayRender_t { public: @@ -72,7 +78,7 @@ class yafrayRender_t bool hasworld; - std::map<Object*, std::vector<VlakRen*> > all_objects; + std::map<Object*, yafrayObjectRen> all_objects; std::map<std::string, Material*> used_materials; std::map<std::string, MTex*> used_textures; std::map<std::string, std::vector<float> > dupliMtx_list; @@ -86,7 +92,7 @@ class yafrayRender_t virtual void writeTextures()=0; virtual void writeShader(const std::string &shader_name, Material* matr, const std::string &facetexname)=0; virtual void writeMaterialsAndModulators()=0; - virtual void writeObject(Object* obj, const std::vector<VlakRen*> &VLR_list, const float obmat[4][4])=0; + virtual void writeObject(Object* obj, ObjectRen *obr, const std::vector<VlakRen*> &VLR_list, const float obmat[4][4])=0; virtual void writeAllObjects()=0; virtual void writeLamps()=0; virtual void writeCamera()=0; |