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) {
|
light_instances_.remove_if([&](auto item) {
|
||||||
bool res = !available_objects.contains(item.key.GetName());
|
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) {
|
if (res) {
|
||||||
item.value.transforms.clear();
|
item.value.transforms.clear();
|
||||||
update_light_instance(item.value);
|
update_light_instance(item.value);
|
||||||
@ -353,6 +358,9 @@ void InstancerData::write_instances()
|
|||||||
scene_delegate_->depsgraph, scene_delegate_->scene, (Object *)id);
|
scene_delegate_->depsgraph, scene_delegate_->scene, (Object *)id);
|
||||||
LISTBASE_FOREACH (DupliObject *, dupli, lb) {
|
LISTBASE_FOREACH (DupliObject *, dupli, lb) {
|
||||||
Object *ob = dupli->ob;
|
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)) {
|
if (!is_supported(ob) || !is_instance_visible(ob)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user