Bugfix, testing venom's lab .blends

Using LightGroups override for material doesn't work for preview
renders. Code didn't correctly return correct light listbase then,
crashing Blender on preview render.
This commit is contained in:
2009-06-25 12:32:55 +00:00
parent 434a994f30
commit 8cda8abefe

View File

@@ -61,12 +61,14 @@ extern struct Render R;
static ListBase *get_lights(ShadeInput *shi)
{
if(R.r.scemode & R_PREVIEWBUTS)
return &R.lights;
if(shi->light_override)
return &shi->light_override->gobject;
else if(shi->mat && shi->mat->group)
if(shi->mat && shi->mat->group)
return &shi->mat->group->gobject;
else
return &R.lights;
return &R.lights;
}
#if 0