forked from blender/blender
Implement Viewport render with material preview #56
@ -426,8 +426,7 @@ void BlenderSceneDelegate::check_updates()
|
||||
bool do_update_visibility = false;
|
||||
bool do_update_world = false;
|
||||
|
||||
if (set_world_shading_settings(view3d))
|
||||
{
|
||||
if (set_world_shading_settings(view3d)) {
|
||||
do_update_world = true;
|
||||
}
|
||||
|
||||
@ -672,8 +671,7 @@ bool BlenderSceneDelegate::set_light_shading_settings(View3D const *view3d)
|
||||
{
|
||||
bool ret = false;
|
||||
if (view3d) {
|
||||
if (shading_settings.use_scene_lights != V3D_USES_SCENE_LIGHTS(view3d))
|
||||
{
|
||||
if (shading_settings.use_scene_lights != V3D_USES_SCENE_LIGHTS(view3d)) {
|
||||
shading_settings.use_scene_lights = V3D_USES_SCENE_LIGHTS(view3d);
|
||||
ret = true;
|
||||
}
|
||||
@ -688,14 +686,12 @@ bool BlenderSceneDelegate::set_world_shading_settings(View3D const *view3d)
|
||||
if (shading_settings.shading_flag != view3d->shading.flag ||
|
||||
shading_settings.lookdev_light != view3d->shading.lookdev_light ||
|
||||
shading_settings.rotation != view3d->shading.studiolight_rot_z ||
|
||||
shading_settings.intensity != view3d->shading.studiolight_intensity
|
||||
)
|
||||
shading_settings.intensity != view3d->shading.studiolight_intensity)
|
||||
{
|
||||
shading_settings.shading_flag = view3d->shading.flag;
|
||||
shading_settings.lookdev_light = view3d->shading.lookdev_light;
|
||||
shading_settings.rotation = view3d->shading.studiolight_rot_z;
|
||||
shading_settings.intensity = view3d->shading.studiolight_intensity;
|
||||
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user