Caching generated image leads to infinite loop in preview render #53

Merged
Bogdan Nagirniak merged 12 commits from BLEN-409 into hydra-render 2023-06-13 18:39:39 +02:00
3 changed files with 7 additions and 11 deletions
Showing only changes of commit 0c07e52b59 - Show all commits

View File

@ -16,8 +16,8 @@
#include "final_engine.h"
#include "preview_engine.h"
#include "viewport_engine.h"
#include "scene_delegate/image.h"
#include "viewport_engine.h"
namespace blender::render::hydra {
@ -269,7 +269,7 @@ static PyObject *engine_set_render_setting_func(PyObject * /*self*/, PyObject *a
static PyObject *cache_image_func(PyObject * /*self*/, PyObject *args)
{
PyObject *pycontext, *pyscene ,*pyimage;
PyObject *pycontext, *pyscene, *pyimage;
if (!PyArg_ParseTuple(args, "OOO", &pycontext, &pyscene, &pyimage)) {
Py_RETURN_NONE;
}

View File

@ -5,8 +5,8 @@
#include "BKE_appdir.h"
#include "BKE_image.h"
#include "BKE_image_save.h"
#include "BKE_image_format.h"
#include "BKE_image_save.h"
#include "BLI_fileops.h"
#include "BLI_path_util.h"
@ -17,10 +17,8 @@
namespace blender::render::hydra {
std::string cache_image_file(Image *image,
bContext *context, Scene *scene,
ImageUser *iuser,
bool check_exist)
std::string cache_image_file(
Image *image, bContext *context, Scene *scene, ImageUser *iuser, bool check_exist)
{
std::string file_path(FILE_MAX, 0);
Main *main = CTX_data_main(context);

View File

@ -10,10 +10,8 @@ namespace blender::render::hydra {
class BlenderSceneDelegate;
std::string cache_image_file(Image *image,
bContext *context, Scene *scene,
ImageUser *iuser,
bool check_exist);
std::string cache_image_file(
Image *image, bContext *context, Scene *scene, ImageUser *iuser, bool check_exist);
std::string cache_or_get_image_file(Image *image,
BlenderSceneDelegate *scene_delegate,