forked from blender/blender
Implement Viewport render with material preview #56
@ -591,9 +591,7 @@ void BlenderSceneDelegate::remove_unused_objects()
|
||||
/* Remove unused objects */
|
||||
objects_.remove_if([&](auto item) {
|
||||
bool ret = !available_objects.contains(item.key.GetName());
|
||||
if (!shading_settings.use_scene_lights &&
|
||||
((Object *)item.value->id)->type == OB_LAMP)
|
||||
{
|
||||
if (!shading_settings.use_scene_lights && ((Object *)item.value->id)->type == OB_LAMP) {
|
||||
ret = true;
|
||||
}
|
||||
if (ret) {
|
||||
|
@ -44,7 +44,8 @@ class BlenderSceneDelegate : public pxr::HdSceneDelegate {
|
||||
float studiolight_rotation;
|
||||
float studiolight_intensity;
|
||||
|
||||
bool operator==(const ShadingSettings& other) {
|
||||
bool operator==(const ShadingSettings &other)
|
||||
{
|
||||
return use_scene_lights == other.use_scene_lights &&
|
||||
use_scene_world == other.use_scene_world &&
|
||||
studiolight_name == other.studiolight_name &&
|
||||
|
@ -358,9 +358,7 @@ void InstancerData::write_instances()
|
||||
scene_delegate_->depsgraph, scene_delegate_->scene, (Object *)id);
|
||||
LISTBASE_FOREACH (DupliObject *, dupli, lb) {
|
||||
Object *ob = dupli->ob;
|
||||
if (!scene_delegate_->shading_settings.use_scene_lights &&
|
||||
ob->type == OB_LAMP)
|
||||
{
|
||||
if (!scene_delegate_->shading_settings.use_scene_lights && ob->type == OB_LAMP) {
|
||||
continue;
|
||||
}
|
||||
if (!is_supported(ob) || !is_instance_visible(ob)) {
|
||||
|
Loading…
Reference in New Issue
Block a user