forked from blender/blender
Implement Viewport render with material preview #56
@ -272,6 +272,11 @@ void InstancerData::check_remove(Set<std::string> &available_objects)
|
||||
|
||||
light_instances_.remove_if([&](auto item) {
|
||||
bool res = !available_objects.contains(item.key.GetName());
|
||||
if (!V3D_USES_SCENE_LIGHTS(scene_delegate_->view3d) &&
|
||||
BogdanNagirniak marked this conversation as resolved
Outdated
|
||||
((Object *)item.value.data->id)->type == OB_LAMP)
|
||||
{
|
||||
res = true;
|
||||
}
|
||||
if (res) {
|
||||
item.value.transforms.clear();
|
||||
update_light_instance(item.value);
|
||||
@ -353,6 +358,9 @@ void InstancerData::write_instances()
|
||||
scene_delegate_->depsgraph, scene_delegate_->scene, (Object *)id);
|
||||
LISTBASE_FOREACH (DupliObject *, dupli, lb) {
|
||||
Object *ob = dupli->ob;
|
||||
if (!V3D_USES_SCENE_LIGHTS(scene_delegate_->view3d) && ob->type == OB_LAMP) {
|
||||
return;
|
||||
BogdanNagirniak marked this conversation as resolved
Outdated
Bogdan Nagirniak
commented
`if (ob->type == OB_LAMP && !scene_delegate_->shading_settings.use_scene_lights)`
|
||||
}
|
||||
if (!is_supported(ob) || !is_instance_visible(ob)) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user
use
scene_delegate_->shading_settings.use_scene_lights
lights shouldn't be in available_objects, this can be reverted