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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user