forked from blender/blender
MaterialX: make caching image in MaterialX independent from bf_usd
project
#31
@ -140,12 +140,13 @@ NODE_SHADER_MATERIALX_BEGIN
|
|||||||
}
|
}
|
||||||
|
|
||||||
NodeTexEnvironment *tex_env = static_cast<NodeTexEnvironment *>(node_->storage);
|
NodeTexEnvironment *tex_env = static_cast<NodeTexEnvironment *>(node_->storage);
|
||||||
Scene *scene = DEG_get_input_scene(depsgraph_);
|
|
||||||
Main *bmain = DEG_get_bmain(depsgraph_);
|
|
||||||
|
|
||||||
std::string image_path = export_image_fn_ ?
|
std::string image_path = image->id.name;
|
||||||
export_image_fn_(bmain, scene, image, &tex_env->iuser) :
|
if (export_image_fn_) {
|
||||||
image->id.name;
|
Scene *scene = DEG_get_input_scene(depsgraph_);
|
||||||
|
Main *bmain = DEG_get_bmain(depsgraph_);
|
||||||
|
image_path = export_image_fn_(bmain, scene, image, &tex_env->iuser);
|
||||||
|
}
|
||||||
|
|
||||||
NodeItem vector = get_input_link("Vector", NodeItem::Type::Vector2);
|
NodeItem vector = get_input_link("Vector", NodeItem::Type::Vector2);
|
||||||
if (!vector) {
|
if (!vector) {
|
||||||
|
@ -189,12 +189,13 @@ NODE_SHADER_MATERIALX_BEGIN
|
|||||||
Image *image = (Image *)node_->id;
|
Image *image = (Image *)node_->id;
|
||||||
if (image) {
|
if (image) {
|
||||||
NodeTexImage *tex_image = static_cast<NodeTexImage *>(node_->storage);
|
NodeTexImage *tex_image = static_cast<NodeTexImage *>(node_->storage);
|
||||||
Scene *scene = DEG_get_input_scene(depsgraph_);
|
|
||||||
Main *bmain = DEG_get_bmain(depsgraph_);
|
|
||||||
|
|
||||||
std::string image_path = export_image_fn_ ?
|
std::string image_path = image->id.name;
|
||||||
export_image_fn_(bmain, scene, image, &tex_image->iuser) :
|
if (export_image_fn_) {
|
||||||
image->id.name;
|
Scene *scene = DEG_get_input_scene(depsgraph_);
|
||||||
|
Main *bmain = DEG_get_bmain(depsgraph_);
|
||||||
|
image_path = export_image_fn_(bmain, scene, image, &tex_image->iuser);
|
||||||
|
}
|
||||||
|
|
||||||
NodeItem vector = get_input_link("Vector", NodeItem::Type::Vector2);
|
NodeItem vector = get_input_link("Vector", NodeItem::Type::Vector2);
|
||||||
if (!vector) {
|
if (!vector) {
|
||||||
|
Loading…
Reference in New Issue
Block a user