Hydra code cleanup #81

Merged
Bogdan Nagirniak merged 7 commits from hydra-code-cleanup into hydra-render 2023-08-01 21:35:28 +02:00
2 changed files with 7 additions and 8 deletions
Showing only changes of commit 435f332055 - Show all commits

View File

@ -1283,7 +1283,6 @@ class HydraRenderEngine(RenderEngine):
# Final render. # Final render.
def update(self, data, depsgraph): def update(self, data, depsgraph):
import _bpy_hydra import _bpy_hydra
import bpy
engine_type = 'PREVIEW' if self.is_preview else 'FINAL' engine_type = 'PREVIEW' if self.is_preview else 'FINAL'
if not self.engine_ptr: if not self.engine_ptr:
@ -1294,7 +1293,7 @@ class HydraRenderEngine(RenderEngine):
for key, val in self.get_sync_settings(engine_type).items(): for key, val in self.get_sync_settings(engine_type).items():
_bpy_hydra.engine_set_sync_setting(self.engine_ptr, key, val) _bpy_hydra.engine_set_sync_setting(self.engine_ptr, key, val)
_bpy_hydra.engine_update(self.engine_ptr, depsgraph, bpy.context) _bpy_hydra.engine_update(self.engine_ptr, depsgraph, None)
for key, val in self.get_render_settings('PREVIEW' if self.is_preview else 'FINAL').items(): for key, val in self.get_render_settings('PREVIEW' if self.is_preview else 'FINAL').items():
_bpy_hydra.engine_set_render_setting(self.engine_ptr, key, val) _bpy_hydra.engine_set_render_setting(self.engine_ptr, key, val)
@ -1304,7 +1303,7 @@ class HydraRenderEngine(RenderEngine):
return return
import _bpy_hydra import _bpy_hydra
_bpy_hydra.engine_render(self.engine_ptr, depsgraph) _bpy_hydra.engine_render(self.engine_ptr)
# Viewport render. # Viewport render.
def view_update(self, context, depsgraph): def view_update(self, context, depsgraph):
@ -1327,4 +1326,4 @@ class HydraRenderEngine(RenderEngine):
return return
import _bpy_hydra import _bpy_hydra
_bpy_hydra.engine_view_draw(self.engine_ptr, depsgraph, context) _bpy_hydra.engine_view_draw(self.engine_ptr, context)

View File

@ -92,8 +92,8 @@ static PyObject *engine_update_func(PyObject * /*self*/, PyObject *args)
static PyObject *engine_render_func(PyObject * /*self*/, PyObject *args) static PyObject *engine_render_func(PyObject * /*self*/, PyObject *args)
{ {
PyObject *pyengine, *pydepsgraph; PyObject *pyengine;
if (!PyArg_ParseTuple(args, "OO", &pyengine, &pydepsgraph)) { if (!PyArg_ParseTuple(args, "O", &pyengine)) {
Py_RETURN_NONE; Py_RETURN_NONE;
} }
@ -111,8 +111,8 @@ static PyObject *engine_render_func(PyObject * /*self*/, PyObject *args)
static PyObject *engine_view_draw_func(PyObject * /*self*/, PyObject *args) static PyObject *engine_view_draw_func(PyObject * /*self*/, PyObject *args)
{ {
PyObject *pyengine, *pydepsgraph, *pycontext; PyObject *pyengine, *pycontext;
if (!PyArg_ParseTuple(args, "OOO", &pyengine, &pydepsgraph, &pycontext)) { if (!PyArg_ParseTuple(args, "OO", &pyengine, &pycontext)) {
Py_RETURN_NONE; Py_RETURN_NONE;
} }