Create possibility to provide render settings via BlenderSceneDelegate #41

Merged
Bogdan Nagirniak merged 10 commits from BLEN-349 into hydra-render 2023-05-19 20:19:17 +02:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 5c27803340 - Show all commits

View File

@ -27,6 +27,8 @@ PreviewEngine *PreviewEngine::create(RenderEngine *bl_engine,
instance_->bl_engine_ = bl_engine;
}
instance_->scene_delegate_->clear();
if (BLI_timer_is_registered((uintptr_t)&instance_)) {
/* Unregister timer while PreviewEngine is working */
BLI_timer_unregister((uintptr_t)&instance_);
@ -38,7 +40,6 @@ PreviewEngine *PreviewEngine::create(RenderEngine *bl_engine,
void PreviewEngine::free()
{
instance_->render_delegate_->Stop();
instance_->scene_delegate_->clear();
/* Register timer for schedule free PreviewEngine instance */
BLI_timer_register((uintptr_t)&instance_, free_instance, nullptr, nullptr, LIFETIME, true);

View File

@ -232,7 +232,7 @@ static PyObject *engine_set_sync_setting_func(PyObject * /*self*/, PyObject *arg
Engine *engine = (Engine *)PyLong_AsVoidPtr(pyengine);
engine->set_sync_setting(key, get_setting_val(pyval));
CLOG_INFO(LOG_RENDER_HYDRA, 2, "Engine %016llx: %s", engine, key);
CLOG_INFO(LOG_RENDER_HYDRA, 3, "Engine %016llx: %s", engine, key);
Py_RETURN_NONE;
}
@ -247,7 +247,7 @@ static PyObject *engine_set_render_setting_func(PyObject * /*self*/, PyObject *a
Engine *engine = (Engine *)PyLong_AsVoidPtr(pyengine);
engine->set_render_setting(key, get_setting_val(pyval));
CLOG_INFO(LOG_RENDER_HYDRA, 2, "Engine %016llx: %s", engine, key);
CLOG_INFO(LOG_RENDER_HYDRA, 3, "Engine %016llx: %s", engine, key);
Py_RETURN_NONE;
}