- Make dupliverts inside a dupligroup render and draw as instances.
- Possible fix for a dupli render memory leak, but i'm not sure.
This commit is contained in:
@@ -4067,10 +4067,10 @@ static int allow_render_object(Object *ob, int nolamps, int onlyselected, Object
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int allow_render_dupli_instance(Render *re, Object *ob, Object *obd)
|
||||
static int allow_render_dupli_instance(Render *re, DupliObject *dob, Object *obd)
|
||||
{
|
||||
return (render_object_type(obd->type) &&
|
||||
(!(ob->transflag & OB_DUPLIGROUP)) &&
|
||||
(!(dob->type == OB_DUPLIGROUP)) &&
|
||||
!(re->r.mode & R_RADIO));
|
||||
}
|
||||
|
||||
@@ -4127,7 +4127,7 @@ static void database_init_objects(Render *re, unsigned int lay, int nolamps, int
|
||||
if(!allow_render_object(obd, nolamps, onlyselected, actob))
|
||||
continue;
|
||||
|
||||
if(allow_render_dupli_instance(re, ob, obd)) {
|
||||
if(allow_render_dupli_instance(re, dob, obd)) {
|
||||
ParticleSystem *psys;
|
||||
int psysindex;
|
||||
float imat[4][4], mat[4][4];
|
||||
|
||||
@@ -822,14 +822,11 @@ void free_renderdata_tables(Render *re)
|
||||
re->totinstance= 0;
|
||||
re->instancetable.first= re->instancetable.last= NULL;
|
||||
}
|
||||
else {
|
||||
BLI_freelistN(&re->instancetable);
|
||||
|
||||
if(re->objecthash) {
|
||||
BLI_ghash_free(re->objecthash, NULL, NULL);
|
||||
re->objecthash= NULL;
|
||||
}
|
||||
}
|
||||
if(re->objecthash) {
|
||||
BLI_ghash_free(re->objecthash, NULL, NULL);
|
||||
re->objecthash= NULL;
|
||||
}
|
||||
|
||||
if(re->sortedhalos) {
|
||||
MEM_freeN(re->sortedhalos);
|
||||
@@ -843,6 +840,7 @@ void free_renderdata_tables(Render *re)
|
||||
|
||||
BLI_freelistN(&re->customdata_names);
|
||||
BLI_freelistN(&re->objecttable);
|
||||
BLI_freelistN(&re->instancetable);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
Reference in New Issue
Block a user