BLEN-367: Fix code style #14

Merged
Bogdan Nagirniak merged 11 commits from BLEN-367 into hydra-render 2023-03-15 09:42:17 +01:00
2 changed files with 12 additions and 10 deletions
Showing only changes of commit 560b742b9a - Show all commits

View File

@ -224,10 +224,11 @@ static PyObject *engine_render_func(PyObject * /*self*/, PyObject *args)
Depsgraph *depsgraph = (Depsgraph *)PyLong_AsVoidPtr(pydepsgraph); Depsgraph *depsgraph = (Depsgraph *)PyLong_AsVoidPtr(pydepsgraph);
/* Allow Blender to execute other Python scripts. */ /* Allow Blender to execute other Python scripts. */
Py_BEGIN_ALLOW_THREADS engine->render(depsgraph); Py_BEGIN_ALLOW_THREADS;
Py_END_ALLOW_THREADS engine->render(depsgraph);
Py_END_ALLOW_THREADS;
Py_RETURN_NONE; Py_RETURN_NONE;
} }
static PyObject *engine_view_draw_func(PyObject * /*self*/, PyObject *args) static PyObject *engine_view_draw_func(PyObject * /*self*/, PyObject *args)
@ -242,10 +243,11 @@ static PyObject *engine_view_draw_func(PyObject * /*self*/, PyObject *args)
bContext *context = (bContext *)PyLong_AsVoidPtr(pycontext); bContext *context = (bContext *)PyLong_AsVoidPtr(pycontext);
/* Allow Blender to execute other Python scripts. */ /* Allow Blender to execute other Python scripts. */
Py_BEGIN_ALLOW_THREADS engine->render(depsgraph, context); Py_BEGIN_ALLOW_THREADS;
Py_END_ALLOW_THREADS engine->render(depsgraph, context);
Py_END_ALLOW_THREADS;
Py_RETURN_NONE; Py_RETURN_NONE;
} }
static PyMethodDef methods[] = { static PyMethodDef methods[] = {

View File

@ -267,10 +267,10 @@ void ViewportEngine::render(Depsgraph *depsgraph, bContext *context)
pxr::GfCamera gfCamera = view_settings.gf_camera(); pxr::GfCamera gfCamera = view_settings.gf_camera();
free_camera_delegate->SetCamera(gfCamera); free_camera_delegate->SetCamera(gfCamera);
render_task_delegate->set_camera_and_viewport(free_camera_delegate->GetCameraId(), render_task_delegate->set_camera_and_viewport(free_camera_delegate->GetCameraId(),
pxr::GfVec4d(view_settings.border[0], pxr::GfVec4d(view_settings.border[0],
view_settings.border[1], view_settings.border[1],
view_settings.border[2], view_settings.border[2],
view_settings.border[3])); view_settings.border[3]));
if (simple_light_task_delegate) { if (simple_light_task_delegate) {
simple_light_task_delegate->set_camera_path(free_camera_delegate->GetCameraId()); simple_light_task_delegate->set_camera_path(free_camera_delegate->GetCameraId());
} }