diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 988abd45c18..34ae4ba2b59 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -3033,16 +3033,28 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view) ob= base->object; /* OB_DONE means the object itself got duplicated, so was already converted */ - if(ob->flag & OB_DONE); + if (ob->flag & OB_DONE) { + /* yafray: for some reason this part was removed, but yafray really needs it... + Dupliverts objects are treated as instances of an original 'sourceobject', + which needs to be included in the renderlist here. + exception: lamps, lattices, armatures & camera's */ + if ((re->r.renderer==R_YAFRAY) && ((ob->type!=OB_LATTICE) && (ob->type!=OB_ARMATURE) && + (ob->type!=OB_LAMP) && (ob->type!=OB_CAMERA))) + { + printf("Duplivert object %s, adding to renderlist\n", ob->id.name); + ob->flag &= ~OB_DONE; + init_render_object(re, ob, NULL, 0, 0); + ob->flag |= OB_DONE; + } + } else if( (base->lay & lay) || (ob->type==OB_LAMP && (base->lay & re->scene->lay)) ) { if(ob->transflag & OB_DUPLI) { /* exception: mballs! */ - /* yafray: Include at least one copy of a dupliframe object for yafray in the renderlist. - mballs comment above true as well for yafray, they are not included, only all other object types */ + /* yafray: except for mballs, include at least one copy of a dupliframe object in the renderlist. */ if (re->r.renderer==R_YAFRAY) { if ((ob->type!=OB_MBALL) && ((ob->transflag & OB_DUPLIFRAMES)!=0)) { - printf("Object %s has OB_DUPLIFRAMES set, adding to renderlist\n", ob->id.name); + printf("Dupliframe Object %s, adding to renderlist\n", ob->id.name); init_render_object(re, ob, NULL, 0, 0); } } @@ -3067,16 +3079,22 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view) Mat4CpyMat4(obd->obmat, dob->mat); if(obd->type!=OB_MBALL) { - /* yafray: special handling of duplivert objects for yafray: - only the matrix is stored, together with the source object name. - Since the original object is needed as well, it is included in the renderlist (see above) - NOT done for lamps, these need to be included as normal lamps separately - correction: also ignore lattices, armatures and cameras (....) */ - if ((obd->type!=OB_LATTICE) && (obd->type!=OB_ARMATURE) && - (obd->type!=OB_LAMP) && (obd->type!=OB_CAMERA) && (re->r.renderer==R_YAFRAY)) - { - printf("Adding dupli matrix for object %s\n", obd->id.name); - YAF_addDupliMtx(obd); + /* yafray: special case handling of duplivert/dupligroup objects. + Only one copy included in renderlist(see above), all others treated as instance of that. + So only need to store name and matrix. Exception are lamps. lattices, armatures and camera's */ + if (re->r.renderer==R_YAFRAY) { + /* dupligroup obs are included directly */ + if (obd->flag & OB_FROMGROUP) { + printf("Dupligroup object %s, adding to renderlist\n", obd->id.name); + init_render_object(re, obd, ob, dob->index, 0); + } + else if ((obd->type!=OB_LATTICE) && (obd->type!=OB_ARMATURE) && + (obd->type!=OB_LAMP) && (obd->type!=OB_CAMERA)) + { + printf("Adding dupli matrix for object %s\n", obd->id.name); + YAF_addDupliMtx(obd); + } + else init_render_object(re, obd, ob, dob->index, 0); } else init_render_object(re, obd, ob, dob->index, 0); } @@ -3087,21 +3105,22 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view) } } else { - /* yafray: if there are linked data objects (except lamps, empties or armatures), - yafray only needs to know about one, the rest can be instanciated. - The dupliMtx list is used for this purpose. - Exception: objects which have object linked materials, these cannot be instanciated. */ + /* yafray: linked data objects treated similarly to dupliverts, + If object not known yet (not in renderlist), include in the renderlist, + otherwise treat as instance of it, so only name and matrix are stored + Exception: objects which have materials linked to object instead of mesh */ if ((re->r.renderer==R_YAFRAY) && (ob->colbits==0)) { /* Special case, parent object dupli's: ignore if object itself is lamp or parent is lattice or empty */ if (ob->parent) { if ((ob->type!=OB_LAMP) && (ob->parent->type!=OB_EMPTY) && - (ob->parent->type!=OB_LATTICE) && YAF_objectKnownData(ob)) + (ob->parent->type!=OB_LATTICE) && YAF_objectKnownData(ob)) printf("From parent: Added dupli matrix for linked data object %s\n", ob->id.name); else init_render_object(re, ob, NULL, 0, 0); } - else if ((ob->type!=OB_EMPTY) && (ob->type!=OB_LAMP) && (ob->type!=OB_ARMATURE) && YAF_objectKnownData(ob)) + else if ((ob->type!=OB_EMPTY) && (ob->type!=OB_LAMP) && + (ob->type!=OB_ARMATURE) && YAF_objectKnownData(ob)) printf("Added dupli matrix for linked data object %s\n", ob->id.name); else init_render_object(re, ob, NULL, 0, 0); diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 923ea7860d4..0a2fdd12db1 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1601,6 +1601,9 @@ static void yafrayRender(Render *re) free_render_result(re->result); re->result= new_render_result(re, &re->disprect, 0, RR_USEMEM); + // need this too, for aspect/ortho/etc info + RE_SetCamera(re, re->scene->camera); + // switch must be done before prepareScene() if (!re->r.YFexportxml) YAF_switchFile(); @@ -1611,7 +1614,13 @@ static void yafrayRender(Render *re) RE_Database_FromScene(re, re->scene, 1); printf("Scene conversion done.\n"); + re->i.starttime = PIL_check_seconds_timer(); + YAF_exportScene(re); + + re->i.lastframetime = PIL_check_seconds_timer()- re->i.starttime; + re->stats_draw(&re->i); + RE_Database_Free(re); } diff --git a/source/blender/yafray/intern/export_File.cpp b/source/blender/yafray/intern/export_File.cpp index 070ff9abc01..25e51a1b0bb 100755 --- a/source/blender/yafray/intern/export_File.cpp +++ b/source/blender/yafray/intern/export_File.cpp @@ -157,7 +157,7 @@ bool yafrayFileRender_t::initExport() #ifdef WIN32 // try to create it cout << "Trying to create...\n"; - if (createDir(xmlpath.c_str())==0) dir_failed=true; else dir_failed=false; + if (createDir(const_cast(xmlpath.c_str()))==0) dir_failed=true; else dir_failed=false; #else dir_failed = true; #endif @@ -1048,7 +1048,8 @@ void yafrayFileRender_t::writeMaterialsAndModulators() else if ((mtex->texco & TEXCO_GLOB) || (mtex->texco & TEXCO_OBJECT)) // object mode is also set as global, but the object matrix was specified above with ostr << "\t\t\n"; - else if (mtex->texco & TEXCO_ORCO) + else if ((mtex->texco & TEXCO_ORCO) || (mtex->texco & TEXCO_STRAND)) + // orco flag now used for 'strand'-mapping as well, see mesh code ostr << "\t\t\n"; else if (mtex->texco & TEXCO_WINDOW) ostr << "\t\t\n"; @@ -1217,10 +1218,13 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector &VLR_li // Test the rendermaterial texco flag instead. // update2: bug #3193 it seems it has changed again with the introduction of static 'hair' particles, // now it uses the vert pointer again as an extra test to make sure there are orco coords available - bool EXPORT_ORCO = (((face0mat->texco & TEXCO_ORCO)!=0) && (face0->v1->orco!=NULL)); + int has_orco = 0; + if (face0mat->texco & TEXCO_STRAND) + has_orco = 1; + else + has_orco = (((face0mat->texco & TEXCO_ORCO)!=0) && (face0->v1->orco!=NULL)) ? 2 : 0; - string has_orco = "off"; - if (EXPORT_ORCO) has_orco = "on"; + string has_orco_st = has_orco ? "on" : "off"; // smooth shading if enabled bool no_auto = true; //in case non-mesh, or mesh has no autosmooth @@ -1229,7 +1233,7 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector &VLR_li if (mesh->flag & ME_AUTOSMOOTH) { no_auto = false; ostr.str(""); - ostr << "\tsmoothresh << "\" has_orco=\"" << has_orco << "\" >\n"; + ostr << "\tsmoothresh << "\" has_orco=\"" << has_orco_st << "\" >\n"; xmlfile << ostr.str(); } } @@ -1239,9 +1243,9 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector &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\n"; + xmlfile << "\t\n"; else - xmlfile << "\t\n"; //0 shows artefacts + xmlfile << "\t\n"; //0 shows artefacts } // now all vertices @@ -1271,13 +1275,19 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector &VLR_li MTC_cp3Float(ver->co, tvec); MTC_Mat4MulVecfl(imat, tvec); ostr << "\t\t\t

\n"; - if (EXPORT_ORCO) { + << "\" y=\"" << tvec[1] + << "\" z=\"" << tvec[2] << "\" />\n"; + // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping + if (has_orco==1) { + ostr << "\t\t\t

accum + << "\" y=\"" << ver->accum + << "\" z=\"" << ver->accum << "\" />\n"; + } + else if (has_orco==2) { orco = ver->orco; ostr << "\t\t\t

\n"; + << "\" y=\"" << orco[1] + << "\" z=\"" << orco[2] << "\" />\n"; } } if (vert_idx.find(vlr->v2)==vert_idx.end()) { @@ -1286,13 +1296,19 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector &VLR_li MTC_cp3Float(ver->co, tvec); MTC_Mat4MulVecfl(imat, tvec); ostr << "\t\t\t

\n"; - if (EXPORT_ORCO) { + << "\" y=\"" << tvec[1] + << "\" z=\"" << tvec[2] << "\" />\n"; + // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping + if (has_orco==1) { + ostr << "\t\t\t

accum + << "\" y=\"" << ver->accum + << "\" z=\"" << ver->accum << "\" />\n"; + } + else if (has_orco==2) { orco = ver->orco; ostr << "\t\t\t

\n"; + << "\" y=\"" << orco[1] + << "\" z=\"" << orco[2] << "\" />\n"; } } if (vert_idx.find(vlr->v3)==vert_idx.end()) { @@ -1301,13 +1317,19 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector &VLR_li MTC_cp3Float(ver->co, tvec); MTC_Mat4MulVecfl(imat, tvec); ostr << "\t\t\t

\n"; - if (EXPORT_ORCO) { + << "\" y=\"" << tvec[1] + << "\" z=\"" << tvec[2] << "\" />\n"; + // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping + if (has_orco==1) { + ostr << "\t\t\t

accum + << "\" y=\"" << ver->accum + << "\" z=\"" << ver->accum << "\" />\n"; + } + else if (has_orco==2) { orco = ver->orco; ostr << "\t\t\t

\n"; + << "\" y=\"" << orco[1] + << "\" z=\"" << orco[2] << "\" />\n"; } } if ((vlr->v4) && (vert_idx.find(vlr->v4)==vert_idx.end())) { @@ -1316,13 +1338,19 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector &VLR_li MTC_cp3Float(ver->co, tvec); MTC_Mat4MulVecfl(imat, tvec); ostr << "\t\t\t

\n"; - if (EXPORT_ORCO) { + << "\" y=\"" << tvec[1] + << "\" z=\"" << tvec[2] << "\" />\n"; + // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping + if (has_orco==1) { + ostr << "\t\t\t

accum + << "\" y=\"" << ver->accum + << "\" z=\"" << ver->accum << "\" />\n"; + } + else if (has_orco==2) { orco = ver->orco; ostr << "\t\t\t

\n"; + << "\" y=\"" << orco[1] + << "\" z=\"" << orco[2] << "\" />\n"; } } xmlfile << ostr.str(); @@ -1352,7 +1380,7 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector &VLR_li int idx2 = vert_idx.find(vlr->v2)->second; int idx3 = vert_idx.find(vlr->v3)->second; // make sure the indices point to the vertices when orco coords exported - if (EXPORT_ORCO) { idx1*=2; idx2*=2; idx3*=2; } + if (has_orco) { idx1*=2; idx2*=2; idx3*=2; } ostr.str(""); ostr << "\t\t\t &VLR_li TFace* uvc = vlr->tface; // possible uvcoords (v upside down) if (uvc) { ostr << " u_a=\"" << uvc->uv[ui1][0] << "\" v_a=\"" << 1-uvc->uv[ui1][1] << "\"" - << " u_b=\"" << uvc->uv[ui2][0] << "\" v_b=\"" << 1-uvc->uv[ui2][1] << "\"" - << " u_c=\"" << uvc->uv[ui3][0] << "\" v_c=\"" << 1-uvc->uv[ui3][1] << "\""; + << " u_b=\"" << uvc->uv[ui2][0] << "\" v_b=\"" << 1-uvc->uv[ui2][1] << "\"" + << " u_c=\"" << uvc->uv[ui3][0] << "\" v_c=\"" << 1-uvc->uv[ui3][1] << "\""; } // since Blender seems to need vcols when uvs are used, for yafray only export when the material actually uses vcols @@ -1377,13 +1405,13 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector &VLR_li // vertex colors unsigned char* pt = reinterpret_cast(&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 << "\""; + << "\" vcol_a_b=\"" << (float)pt[1]/255.f << "\""; pt = reinterpret_cast(&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 << "\""; + << "\" vcol_b_b=\"" << (float)pt[1]/255.f << "\""; pt = reinterpret_cast(&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 << "\""; + << "\" vcol_c_b=\"" << (float)pt[1]/255.f << "\""; } ostr << " shader_name=\"" << fmatname << "\" />\n"; @@ -1394,7 +1422,7 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector &VLR_li idx3 = vert_idx.find(vlr->v1)->second; // make sure the indices point to the vertices when orco coords exported - if (EXPORT_ORCO) { idx1*=2; idx2*=2; idx3*=2; } + if (has_orco) { idx1*=2; idx2*=2; idx3*=2; } ostr << "\t\t\t &VLR_li if (uvc) { ostr << " u_a=\"" << uvc->uv[ui1][0] << "\" v_a=\"" << 1-uvc->uv[ui1][1] << "\"" - << " u_b=\"" << uvc->uv[ui2][0] << "\" v_b=\"" << 1-uvc->uv[ui2][1] << "\"" - << " u_c=\"" << uvc->uv[ui3][0] << "\" v_c=\"" << 1-uvc->uv[ui3][1] << "\""; + << " u_b=\"" << uvc->uv[ui2][0] << "\" v_b=\"" << 1-uvc->uv[ui2][1] << "\"" + << " u_c=\"" << uvc->uv[ui3][0] << "\" v_c=\"" << 1-uvc->uv[ui3][1] << "\""; } if ((EXPORT_VCOL) && (vlr->vcol)) { // vertex colors unsigned char* pt = reinterpret_cast(&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 << "\""; + << "\" vcol_a_b=\"" << (float)pt[1]/255.f << "\""; pt = reinterpret_cast(&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 << "\""; + << "\" vcol_b_b=\"" << (float)pt[1]/255.f << "\""; pt = reinterpret_cast(&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 << "\""; + << "\" 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 a82101b24be..8392e32833e 100644 --- a/source/blender/yafray/intern/export_Plugin.cpp +++ b/source/blender/yafray/intern/export_Plugin.cpp @@ -966,7 +966,8 @@ void yafrayPluginRender_t::writeMaterialsAndModulators() // object mode is also set as global, but the object matrix // was specified above with params["texco"] = yafray::parameter_t("global"); - else if (mtex->texco & TEXCO_ORCO) + else if ((mtex->texco & TEXCO_ORCO) || (mtex->texco & TEXCO_STRAND)) + // orco flag now used for 'strand'-mapping as well, see mesh code params["texco"] = yafray::parameter_t("orco"); else if (mtex->texco & TEXCO_WINDOW) params["texco"] = yafray::parameter_t("window"); @@ -1138,7 +1139,7 @@ void yafrayPluginRender_t::genVcol(vector &vcol, VlakRen *vlr, b void yafrayPluginRender_t::genFace(vector &faces,vector &shaders,vector &faceshader, vector &uvcoords,vector &vcol, map &vert_idx,VlakRen *vlr, - bool has_orco,bool has_uv) + int has_orco,bool has_uv) { Material* fmat = vlr->mat; bool EXPORT_VCOL = ((fmat->mode & (MA_VERTEXCOL|MA_VERTEXCOLP))!=0); @@ -1184,7 +1185,7 @@ void yafrayPluginRender_t::genFace(vector &faces,vector &shaders,ve void yafrayPluginRender_t::genCompleFace(vector &faces,/*vector &shaders,*/vector &faceshader, vector &uvcoords,vector &vcol, map &vert_idx,VlakRen *vlr, - bool has_orco,bool has_uv) + int has_orco,bool has_uv) { Material* fmat = vlr->mat; bool EXPORT_VCOL = ((fmat->mode & (MA_VERTEXCOL|MA_VERTEXCOLP))!=0); @@ -1206,7 +1207,7 @@ void yafrayPluginRender_t::genCompleFace(vector &faces,/*vector &sh } void yafrayPluginRender_t::genVertices(vector &verts, int &vidx, - map &vert_idx, VlakRen* vlr, bool has_orco, Object* obj) + map &vert_idx, VlakRen* vlr, int has_orco, Object* obj) { VertRen* ver; float tvec[3]; // for back2world transform @@ -1224,7 +1225,11 @@ void yafrayPluginRender_t::genVertices(vector &verts, int &vi MTC_cp3Float(ver->co, tvec); MTC_Mat4MulVecfl(imat, tvec); verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2])); - if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2])); + // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping + if (has_orco==1) + verts.push_back(yafray::point3d_t(ver->accum)); + else if (has_orco==2) + verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2])); } if (vert_idx.find(vlr->v2)==vert_idx.end()) { @@ -1233,7 +1238,11 @@ void yafrayPluginRender_t::genVertices(vector &verts, int &vi MTC_cp3Float(ver->co, tvec); MTC_Mat4MulVecfl(imat, tvec); verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2])); - if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2])); + // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping + if (has_orco==1) + verts.push_back(yafray::point3d_t(ver->accum)); + else if (has_orco==2) + verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2])); } if (vert_idx.find(vlr->v3)==vert_idx.end()) { @@ -1242,7 +1251,11 @@ void yafrayPluginRender_t::genVertices(vector &verts, int &vi MTC_cp3Float(ver->co, tvec); MTC_Mat4MulVecfl(imat, tvec); verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2])); - if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2])); + // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping + if (has_orco==1) + verts.push_back(yafray::point3d_t(ver->accum)); + else if (has_orco==2) + verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2])); } if ((vlr->v4) && (vert_idx.find(vlr->v4)==vert_idx.end())) { @@ -1251,7 +1264,11 @@ void yafrayPluginRender_t::genVertices(vector &verts, int &vi MTC_cp3Float(ver->co, tvec); MTC_Mat4MulVecfl(imat, tvec); verts.push_back(yafray::point3d_t(tvec[0], tvec[1], tvec[2])); - if (has_orco) verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2])); + // has_orco now an int, if 1 -> strand mapping, if 2 -> normal orco mapping + if (has_orco==1) + verts.push_back(yafray::point3d_t(ver->accum)); + else if (has_orco==2) + verts.push_back(yafray::point3d_t(ver->orco[0], ver->orco[1], ver->orco[2])); } } @@ -1284,7 +1301,11 @@ void yafrayPluginRender_t::writeObject(Object* obj, const vector &VLR_ // Test the rendermaterial texco flag instead. // update2: bug #3193 it seems it has changed again with the introduction of static 'hair' particles, // now it uses the vert pointer again as an extra test to make sure there are orco coords available - bool has_orco = (((face0mat->texco & TEXCO_ORCO)!=0) && (face0->v1->orco!=NULL)); + int has_orco = 0; + if (face0mat->texco & TEXCO_STRAND) + has_orco = 1; + else + has_orco = (((face0mat->texco & TEXCO_ORCO)!=0) && (face0->v1->orco!=NULL)) ? 2 : 0; bool no_auto = true; //in case non-mesh, or mesh has no autosmooth float sm_angle = 0.1f; @@ -1883,8 +1904,9 @@ bool blenderYafrayOutput_t::putPixel(int x, int y, const yafray::color_t &c, float* zbuf = rres.rectz + px; if (zbuf) zbuf[x] = depth; - out = (out+1) & 4095; - if (out==0) { + out++; + // draw on completion of bucket & end of pass + if (((out & 4095)==0) || ((out % (re->rectx*re->recty))==0)) { re->result->renlay = render_get_active_layer(re, re->result); /* XXX second arg is rcti *rect, allows to indicate sub-rect in image to draw */ re->display_draw(re->result, NULL); diff --git a/source/blender/yafray/intern/export_Plugin.h b/source/blender/yafray/intern/export_Plugin.h index 14b24599e81..28e71596d50 100644 --- a/source/blender/yafray/intern/export_Plugin.h +++ b/source/blender/yafray/intern/export_Plugin.h @@ -53,13 +53,13 @@ class yafrayPluginRender_t : public yafrayRender_t void genFace(std::vector &faces,std::vector &shaders,std::vector &faceshader, std::vector &uvcoords,std::vector &vcol, std::map &vert_idx,VlakRen *vlr, - bool has_orco,bool has_uv); + int has_orco,bool has_uv); void genCompleFace(std::vector &faces,/*std::vector &shaders,*/std::vector &faceshader, std::vector &uvcoords,std::vector &vcol, std::map &vert_idx,VlakRen *vlr, - bool has_orco,bool has_uv); + int has_orco,bool has_uv); void genVertices(std::vector &verts, int &vidx, - std::map &vert_idx, VlakRen* vlr, bool has_orco, Object* obj); + std::map &vert_idx, VlakRen* vlr, int has_orco, Object* obj); }; class blenderYafrayOutput_t : public yafray::colorOutput_t diff --git a/source/blender/yafray/intern/yafexternal.h b/source/blender/yafray/intern/yafexternal.h index 7353748a1ad..7130bd55466 100644 --- a/source/blender/yafray/intern/yafexternal.h +++ b/source/blender/yafray/intern/yafexternal.h @@ -17,6 +17,7 @@ class point3d_t { public: point3d_t() { x = y = z = 0; } + point3d_t(PFLOAT ix) { x = y = z = ix; } point3d_t(PFLOAT ix, PFLOAT iy, PFLOAT iz=0) { x=ix; y=iy; z=iz; } point3d_t(const point3d_t &s) { x=s.x; y=s.y; z=s.z; } void set(PFLOAT ix, PFLOAT iy, PFLOAT iz=0) { x=ix; y=iy; z=iz; }