forked from blender/blender
Implement Viewport render with material preview #56
@ -118,16 +118,17 @@ void WorldData::init()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (scene_delegate_->view3d && !scene_delegate_->shading_settings.use_scene_world) {
|
if (scene_delegate_->view3d && !scene_delegate_->shading_settings.use_scene_world) {
|
||||||
BogdanNagirniak marked this conversation as resolved
Outdated
|
|||||||
StudioLight *sl = BKE_studiolight_find(scene_delegate_->view3d->shading.lookdev_light,
|
StudioLight *sl = BKE_studiolight_find(
|
||||||
STUDIOLIGHT_ORIENTATIONS_MATERIAL_MODE);
|
scene_delegate_->shading_settings.studiolight_name.c_str(),
|
||||||
|
STUDIOLIGHT_ORIENTATIONS_MATERIAL_MODE);
|
||||||
if (sl != NULL && sl->flag & STUDIOLIGHT_TYPE_WORLD) {
|
if (sl != NULL && sl->flag & STUDIOLIGHT_TYPE_WORLD) {
|
||||||
texture_file = pxr::SdfAssetPath(sl->filepath, sl->filepath);
|
texture_file = pxr::SdfAssetPath(sl->filepath, sl->filepath);
|
||||||
transform *= pxr::GfMatrix4d(
|
transform *= pxr::GfMatrix4d(
|
||||||
pxr::GfRotation(pxr::GfVec3d(0.0, 0.0, -1.0),
|
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());
|
pxr::GfVec3d());
|
||||||
/* coefficient to follow Cycles result */
|
/* 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
thif
if
can be removed