Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/gpu/gpu_py_offscreen.c
| Show All 26 Lines | |||||
| */ | */ | ||||
| #include <Python.h> | #include <Python.h> | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BKE_global.h" | |||||
| #include "BKE_library.h" | #include "BKE_library.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_view3d_types.h" | #include "DNA_view3d_types.h" | ||||
| #include "GPU_framebuffer.h" | #include "GPU_framebuffer.h" | ||||
| ▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | |||||
| !(view_layer = PyC_RNA_AsPointer(py_view_layer, "ViewLayer")) || | !(view_layer = PyC_RNA_AsPointer(py_view_layer, "ViewLayer")) || | ||||
| !(v3d = PyC_RNA_AsPointer(py_view3d, "SpaceView3D")) || | !(v3d = PyC_RNA_AsPointer(py_view3d, "SpaceView3D")) || | ||||
| !(ar = PyC_RNA_AsPointer(py_region, "Region")))) { | !(ar = PyC_RNA_AsPointer(py_region, "Region")))) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| BLI_assert(BKE_id_is_in_global_main(&scene->id)); | BLI_assert(BKE_id_is_in_global_main(&scene->id)); | ||||
| depsgraph = BKE_scene_get_depsgraph(G_MAIN, scene, view_layer, true); | depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); | ||||
| rv3d_mats = ED_view3d_mats_rv3d_backup(ar->regiondata); | rv3d_mats = ED_view3d_mats_rv3d_backup(ar->regiondata); | ||||
| GPU_offscreen_bind(self->ofs, true); | GPU_offscreen_bind(self->ofs, true); | ||||
| ED_view3d_draw_offscreen(depsgraph, | ED_view3d_draw_offscreen(depsgraph, | ||||
| scene, | scene, | ||||
| v3d->shading.type, | v3d->shading.type, | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||