forked from blender/blender
Implement Viewport render with material preview #56
@ -118,16 +118,17 @@ void WorldData::init()
|
||||
}
|
||||
else {
|
||||
if (scene_delegate_->view3d && !scene_delegate_->shading_settings.use_scene_world) {
|
||||
StudioLight *sl = BKE_studiolight_find(scene_delegate_->view3d->shading.lookdev_light,
|
||||
STUDIOLIGHT_ORIENTATIONS_MATERIAL_MODE);
|
||||
StudioLight *sl = BKE_studiolight_find(
|
||||
scene_delegate_->shading_settings.studiolight_name.c_str(),
|
||||
STUDIOLIGHT_ORIENTATIONS_MATERIAL_MODE);
|
||||
if (sl != NULL && sl->flag & STUDIOLIGHT_TYPE_WORLD) {
|
||||
texture_file = pxr::SdfAssetPath(sl->filepath, sl->filepath);
|
||||
transform *= pxr::GfMatrix4d(
|
||||
pxr::GfRotation(pxr::GfVec3d(0.0, 0.0, -1.0),
|
||||
RAD2DEGF(scene_delegate_->view3d->shading.studiolight_rot_z)),
|
||||
RAD2DEGF(scene_delegate_->shading_settings.studiolight_rotation)),
|
||||
pxr::GfVec3d());
|
||||
/* coefficient to follow Cycles result */
|
||||
intensity = scene_delegate_->view3d->shading.studiolight_intensity / 2;
|
||||
intensity = scene_delegate_->shading_settings.studiolight_intensity / 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user