From 501adfba4228e1338eb74f0dc5706083438dbe4e Mon Sep 17 00:00:00 2001 From: Alejandro Conty Estevez Date: Mon, 12 Jan 2004 16:46:47 +0000 Subject: Yafray panel splitted in two so we can add more settings. Also preliminar square arealight export, not usable yet, will be usefull as soon as photon export is added. --- source/blender/yafray/intern/export_File.cpp | 26 ++++++++++++++++++-------- source/blender/yafray/intern/export_File.h | 1 + source/blender/yafray/intern/yafray_Render.cpp | 3 +++ 3 files changed, 22 insertions(+), 8 deletions(-) (limited to 'source/blender/yafray/intern') diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp index 1c63c424c34..45df2af9579 100755 --- a/source/blender/yafray/intern/export_File.cpp +++ b/source/blender/yafray/intern/export_File.cpp @@ -239,7 +239,7 @@ void yafrayFileRender_t::writeTextures() { for (map >::const_iterator blendtex=used_textures.begin(); blendtex!=used_textures.end();++blendtex) { - Material* matr = blendtex->second.first; + //Material* matr = blendtex->second.first; MTex* mtex = blendtex->second.second; Tex* tex = mtex->tex; switch (tex->type) { @@ -921,7 +921,7 @@ void yafrayFileRender_t::writeAllObjects() writeObject(obj, all_objects[obj], obmat); // all others instances of first - for (int curmtx=16;curmtxsecond.size();curmtx+=16) { // number of 4x4 matrices + for (unsigned int curmtx=16;curmtxsecond.size();curmtx+=16) { // number of 4x4 matrices // new mtx for (int i=0;i<4;i++) @@ -954,6 +954,21 @@ void yafrayFileRender_t::writeAllObjects() } +void yafrayFileRender_t::writeAreaLamp(LampRen* lamp,int num) +{ + if(lamp->area_shape != LA_AREA_SQUARE) return; + float *a=lamp->area[0],*b=lamp->area[1],*c=lamp->area[2],*d=lamp->area[3]; + ostr.str(""); + ostr << "energy <<"\">" <r<<"\" g=\""<g<<"\" b=\""<b<<"\"/>"<"<"<"<"<"<type==LA_AREA) {writeAreaLamp(lamp,i);continue;} // TODO: add decay setting in yafray ostr << "type==LA_LOCAL) @@ -970,12 +986,6 @@ void yafrayFileRender_t::writeLamps() ostr << "spotlight"; else if (lamp->type==LA_SUN) // for now, hemi == sun ostr << "sunlight"; - /* TODO - else if (lamp->type==LA_AREA) { - // new blender area light - ostr << "arealight"; - } - */ else { // possibly unknown type, ignore cout << "Unknown Blender lamp type: " << lamp->type << endl; diff --git a/source/blender/yafray/intern/export_File.h b/source/blender/yafray/intern/export_File.h index 69f47420d8c..144dc35752e 100755 --- a/source/blender/yafray/intern/export_File.h +++ b/source/blender/yafray/intern/export_File.h @@ -20,6 +20,7 @@ class yafrayFileRender_t : public yafrayRender_t virtual void writeObject(Object* obj, const std::vector &VLR_list, const float obmat[4][4]); virtual void writeAllObjects(); + void writeAreaLamp(LampRen* lamp,int num); virtual void writeLamps(); virtual void writeCamera(); virtual void writeHemilight(); diff --git a/source/blender/yafray/intern/yafray_Render.cpp b/source/blender/yafray/intern/yafray_Render.cpp index 8096676f0db..aa031126966 100644 --- a/source/blender/yafray/intern/yafray_Render.cpp +++ b/source/blender/yafray/intern/yafray_Render.cpp @@ -59,7 +59,10 @@ bool yafrayRender_t::exportScene() clearAll(); if(!finishExport()) + { G.afbreek = 1; //stop render and anim if doing so + return false; + } else return true; } -- cgit v1.2.3