forked from blender/blender
Add IBL support #29
@ -95,9 +95,11 @@ void WorldData::init()
|
|||||||
if (color_input_node->type == SH_NODE_TEX_IMAGE) {
|
if (color_input_node->type == SH_NODE_TEX_IMAGE) {
|
||||||
NodeTexImage *tex = static_cast<NodeTexImage *>(color_input_node->storage);
|
NodeTexImage *tex = static_cast<NodeTexImage *>(color_input_node->storage);
|
||||||
Image *image = (Image *)color_input_node->id;
|
Image *image = (Image *)color_input_node->id;
|
||||||
std::string image_path = cache_or_get_image_file(image, scene_delegate_, &tex->iuser);
|
if (image) {
|
||||||
if (!image_path.empty()) {
|
std::string image_path = cache_or_get_image_file(image, scene_delegate_, &tex->iuser);
|
||||||
data_[pxr::HdLightTokens->textureFile] = pxr::SdfAssetPath(image_path, image_path);
|
if (!image_path.empty()) {
|
||||||
|
data_[pxr::HdLightTokens->textureFile] = pxr::SdfAssetPath(image_path, image_path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user