Added support for linked objects from libraries which can have names that

are already defined locally, probably does not work fully yet.
Added extra 'threads' parameter as requested by Lynx3d.

Optimized drawing of rendered tiles, so that the entire image doesn't have
to be redrawn every time a tile is complete.
The blender code that handles this part was not yet complete and could only
draw (sets of) scanlines. I extended the renderwin_progress() function in
renderwin.c to handle a given subrectangle.
This code needs review!
For the limited test I did it seems to work at least...
This commit is contained in:
2006-06-06 01:57:07 +00:00
parent 4467c26337
commit f832e30669
3 changed files with 50 additions and 25 deletions

View File

@@ -1177,7 +1177,11 @@ void yafrayFileRender_t::writeObject(Object* obj, const vector<VlakRen*> &VLR_li
xmlfile << ostr.str();
ostr.str("");
ostr << "<object name=\"" << obj->id.name << "\"";
// if objects are externally linked from a library, they could have a name that is already
// defined locally, so to prevent name clashes, prefix name with 'lib'
string obname(obj->id.name);
if (obj->id.flag & (LIB_EXTERN|LIB_INDIRECT))obname = "lib_" + obname;
ostr << "<object name=\"" << obname << "\"";
// Yafray still needs default shader name in object def.,
// since we write a shader with every face, simply use the material of the first face.
// If this is an empty string, assume default material.