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) &&
|
||||
((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;
|
||||
}
|
||||
if (!is_supported(ob) || !is_instance_visible(ob)) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user