forked from blender/blender
Hydra code cleanup #81
@ -117,12 +117,13 @@ static PyObject *engine_view_draw_func(PyObject * /*self*/, PyObject *args)
|
||||
}
|
||||
|
||||
ViewportEngine *engine = static_cast<ViewportEngine *>(PyLong_AsVoidPtr(pyengine));
|
||||
bContext *context = pyrna_to_pointer<bContext>(pycontext, &RNA_Context);
|
||||
|
||||
CLOG_INFO(LOG_HYDRA_RENDER, 3, "Engine %p", engine);
|
||||
|
||||
/* Allow Blender to execute other Python scripts. */
|
||||
Py_BEGIN_ALLOW_THREADS;
|
||||
engine->render();
|
||||
engine->render(context);
|
||||
Py_END_ALLOW_THREADS;
|
||||
|
||||
Py_RETURN_NONE;
|
||||
|
@ -287,6 +287,12 @@ void ViewportEngine::render()
|
||||
}
|
||||
}
|
||||
|
||||
void ViewportEngine::render(bContext *context)
|
||||
{
|
||||
context_ = context;
|
||||
render();
|
||||
}
|
||||
|
||||
void ViewportEngine::notify_status(float /*progress*/, const std::string &info,
|
||||
const std::string &status)
|
||||
{
|
||||
|
@ -38,6 +38,7 @@ class ViewportEngine : public Engine {
|
||||
using Engine::Engine;
|
||||
|
||||
void render() override;
|
||||
void render(bContext *context);
|
||||
|
||||
protected:
|
||||
void notify_status(float progress, const std::string &title, const std::string &info) override;
|
||||
|
Loading…
Reference in New Issue
Block a user