forked from blender/blender
BLEN-367: Fix code style #14
@ -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[] = {
|
||||||
|
@ -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());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user