Reload texture in newer versions of Cycles

In previous versions you can make something like

scene->image_manager->device_update(scene->device, scene, p);
scene->image_manager->need_update = true;
scene->image_manager->tag_reload_image(hdrpath, environmentTexture->builtin_data,     environmentTexture->interpolation, ccl::ExtensionType::EXTENSION_REPEAT, false);

but unfortunately, tag_reload_image is no longer available neither builtin_data, also in the past you were able to call environmentTexture->image_manager but it is no longer there.

Any tips on this? Thank you in advance.

2 Likes

This code got lost because it’s not used by the Blender integration anymore.

You could try adding such a function back, probably it’s just a matter of setting need_load to true on the image.