Blender
V3.3
|
#include <cmath>
#include <cstddef>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_bitmap.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_math_color_blend.h"
#include "BLI_task.h"
#include "BLI_task.hh"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "DNA_camera_types.h"
#include "DNA_action_types.h"
#include "DNA_anim_types.h"
#include "DNA_curve_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_anim_data.h"
#include "BKE_camera.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_image_format.h"
#include "BKE_image_save.h"
#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_writeavi.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "DRW_engine.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_gpencil.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_view3d_offscreen.h"
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "RE_pipeline.h"
#include "BLT_translation.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "SEQ_render.h"
#include "GPU_framebuffer.h"
#include "GPU_matrix.h"
#include "render_intern.hh"
Go to the source code of this file.
Classes | |
struct | OGLRender |
struct | WriteTaskData |
Macros | |
#define | MAX_SCHEDULED_FRAMES 8 |
#define MAX_SCHEDULED_FRAMES 8 |
Definition at line 86 of file render_opengl.cc.
|
static |
Definition at line 457 of file render_opengl.cc.
Collect the frame numbers for which selected objects have keys in the animation data. The frames ares stored in OGLRender.render_frames.
Note that this follows all pointers to ID blocks, only filtering on ID type, so it will pick up keys from pointers in custom properties as well.
Definition at line 675 of file render_opengl.cc.
References bGPdata::adt, BKE_animdata_from_id(), BKE_library_foreach_ID_link(), BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, C, CTX_DATA_BEGIN, CTX_DATA_END, gather_frames_to_render_for_adt(), gather_frames_to_render_for_id(), IDWALK_RECURSE, PEFRA, PSFRA, OGLRender::render_frames, scene, and OGLRender::scene.
Referenced by screen_opengl_render_init().
|
static |
Definition at line 526 of file render_opengl.cc.
References AnimData::action, bGPdata::adt, BKE_fcurve_bezt_binarysearch_index(), BLI_assert, BLI_BITMAP_ENABLE, bAction::curves, LISTBASE_FOREACH, PEFRA, PSFRA, OGLRender::render_frames, round_fl_to_int(), scene, OGLRender::scene, and BezTriple::vec.
Referenced by gather_frames_to_render(), and gather_frames_to_render_for_id().
|
static |
Definition at line 563 of file render_opengl.cc.
References BLI_BITMAP_ENABLE, bGPdata::layers, LISTBASE_FOREACH, PEFRA, PSFRA, OGLRender::render_frames, scene, and OGLRender::scene.
Referenced by gather_frames_to_render_for_id().
|
static |
Definition at line 584 of file render_opengl.cc.
References bGPdata::adt, BKE_animdata_from_id(), LibraryIDLinkCallbackData::cb_flag, gather_frames_to_render_for_adt(), gather_frames_to_render_for_grease_pencil(), GS, id, ID_AC, ID_AR, ID_BR, ID_CA, ID_CF, ID_CU_LEGACY, ID_CV, ID_GD, ID_GR, ID_IM, ID_IP, ID_KE, ID_LA, ID_LI, ID_LP, ID_LS, ID_LT, ID_MA, ID_MB, ID_MC, ID_ME, ID_MSK, ID_NT, ID_OB, ID_PA, ID_PAL, ID_PC, LibraryIDLinkCallbackData::id_pointer, ID_PT, ID_SCE, ID_SCR, LibraryIDLinkCallbackData::id_self, ID_SIM, ID_SO, ID_SPK, ID_TE, ID_TXT, ID_VF, ID_VO, ID_WM, ID_WO, ID_WS, IDWALK_CB_LOOPBACK, IDWALK_RET_NOP, IDWALK_RET_STOP_RECURSION, ID::name, and LibraryIDLinkCallbackData::user_data.
Referenced by gather_frames_to_render().
void RENDER_OT_opengl | ( | wmOperatorType * | ot | ) |
Definition at line 1335 of file render_opengl.cc.
References wmOperatorType::cancel, wmOperatorType::description, ED_operator_screenactive(), wmOperatorType::exec, wmOperatorType::get_description, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, ot, wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), screen_opengl_render_cancel(), screen_opengl_render_description(), screen_opengl_render_exec(), screen_opengl_render_invoke(), screen_opengl_render_modal(), and wmOperatorType::srna.
Referenced by ED_operatortypes_render().
|
static |
Definition at line 1107 of file render_opengl.cc.
References BLI_condition_wait(), BLI_mutex_lock(), BLI_mutex_unlock(), BLI_task_pool_push(), MAX_SCHEDULED_FRAMES, OGLRender::num_scheduled_frames, OGLRender::pool_ok, RE_FreeRenderResult(), WriteTaskData::rr, scene, OGLRender::scene, OGLRender::task_condition, OGLRender::task_mutex, OGLRender::task_pool, WriteTaskData::tmp_scene, and write_result_func().
Referenced by screen_opengl_render_anim_step().
Definition at line 154 of file render_opengl.cc.
References View3D::camera, RegionView3D::persp, Scene::r, R_MULTIVIEW, OGLRender::rv3d, RV3D_CAMOB, RenderData::scemode, OGLRender::scene, and OGLRender::v3d.
Referenced by screen_opengl_views_setup().
|
static |
Definition at line 962 of file render_opengl.cc.
References BKE_imtype_is_movie(), BKE_movie_handle_get(), BKE_report(), BKE_scene_multiview_num_videos_get(), BKE_scene_multiview_videos_dimensions_get(), BKE_scene_multiview_view_id_suffix_get(), C, RenderData::cfra, OGLRender::cfrao, bMovieHandle::context_create, wmOperator::customdata, DEG_get_evaluated_scene(), OGLRender::depsgraph, height, RenderData::im_format, ImageFormatData::imtype, MEM_mallocN, OGLRender::mh, OGLRender::movie_ctx_arr, OGLRender::nfra, PRVRANGEON, PSFRA, Scene::r, OGLRender::reports, wmOperator::reports, RPT_ERROR, scene, OGLRender::scene, screen_opengl_render_end(), OGLRender::sizex, OGLRender::sizey, bMovieHandle::start_movie, OGLRender::totvideos, and width.
Referenced by screen_opengl_render_exec(), and screen_opengl_render_invoke().
|
static |
Definition at line 1127 of file render_opengl.cc.
References BKE_image_path_from_imformat(), BKE_imtype_is_movie(), BKE_main_blendfile_path(), BKE_reportf(), BKE_scene_camera_switch_update(), BKE_scene_graph_update_for_newframe(), BLI_BITMAP_TEST_BOOL, BLI_exists(), BLI_spin_lock(), BLI_spin_unlock(), OGLRender::bmain, C, Scene::camera, View3D::camera, RenderData::cfra, wmOperator::customdata, depsgraph, OGLRender::depsgraph, FILE_MAX, RenderData::frame_step, RenderData::im_format, ImageFormatData::imtype, is_movie(), RenderData::mode, OGLRender::nfra, PEFRA, RegionView3D::persp, RenderData::pic, PSFRA, Scene::r, R_EXTENSION, R_NO_OVERWRITE, OGLRender::re, RE_AcquireResultRead(), RE_DuplicateRenderResult(), RE_ReleaseResult(), OGLRender::render_frames, wmOperator::reports, OGLRender::reports_lock, RPT_INFO, OGLRender::rv3d, RV3D_CAMOB, RenderData::scemode, scene, OGLRender::scene, View3D::scenelock, schedule_write_result(), screen_opengl_render_apply(), screen_opengl_render_end(), OGLRender::v3d, OGLRender::win, and WM_cursor_time().
Referenced by screen_opengl_render_exec(), and screen_opengl_render_modal().
Definition at line 470 of file render_opengl.cc.
References BKE_image_acquire_ibuf(), BKE_image_partial_update_mark_full_update(), BKE_image_release_ibuf(), BLI_assert, OGLRender::bmain, C, RenderData::cfra, SpaceSeq::chanshown, blender::compositor::context, OGLRender::depsgraph, ListBase::first, IB_DISPLAY_BUFFER_INVALID, OGLRender::ibufs_arr, OGLRender::ima, OGLRender::is_sequencer, OGLRender::iuser, lock, RenderView::name, RenderView::next, OGLRender::ofs, Scene::r, OGLRender::re, RE_AcquireResultRead(), RE_ReleaseResult(), RE_SetActiveRenderView(), scene, OGLRender::scene, screen_opengl_render_doit(), screen_opengl_render_write(), OGLRender::seq_data, SEQ_render_give_ibuf(), SEQ_render_new_render_data(), SEQ_RENDER_SIZE_SCENE, OGLRender::sizex, OGLRender::sizey, OGLRender::sseq, ImBuf::userflags, OGLRender::view_id, RenderResult::views, OGLRender::views_len, and OGLRender::write_still.
Referenced by screen_opengl_render_anim_step(), screen_opengl_render_exec(), and screen_opengl_render_modal().
|
static |
Definition at line 956 of file render_opengl.cc.
References C, wmOperator::customdata, and screen_opengl_render_end().
Referenced by RENDER_OT_opengl().
|
static |
Definition at line 1318 of file render_opengl.cc.
References BLI_strdup(), ptr, RNA_boolean_get(), and TIP_.
Referenced by RENDER_OT_opengl().
|
static |
Definition at line 279 of file render_opengl.cc.
References RenderData::alphamode, BKE_camera_multiview_render(), BKE_image_stamp_buf(), blend_color_mix_byte(), BLI_assert, C, Scene::camera, View3D::camera, camera, RenderData::cfra, CTX_data_ensure_evaluated_depsgraph(), depsgraph, DRW_opengl_context_disable(), DRW_opengl_context_enable(), ED_annotation_draw_ex(), ED_view3d_draw_offscreen_imbuf(), ED_view3d_draw_offscreen_imbuf_simple(), SpaceSeq::flag, G, G_FLAG_RENDER_VIEWPORT, SpaceSeq::gpd, GPU_clear_color(), GPU_clear_depth(), GPU_DATA_UBYTE, GPU_matrix_reset(), GPU_matrix_translate_2f(), GPU_offscreen_bind(), GPU_offscreen_read_pixels(), GPU_offscreen_unbind(), IB_rect, IB_rectfloat, OGLRender::ibufs_arr, IMB_allocImBuf(), IMB_dupImBuf(), IMB_freeImBuf(), imb_freerectfloatImBuf(), IMB_rect_from_float(), OGLRender::is_sequencer, MEM_freeN, MEM_mallocN, OB_SOLID, OGLRender::ofs, usdtokens::out(), RegionView3D::persp, Scene::r, R_ADDSKY, R_ALPHAPREMUL, R_STAMP_ALL, R_STAMP_DRAW, OGLRender::re, RE_GetActiveRenderView(), RE_render_result_rect_from_ibuf(), RE_RenderViewGetById(), ImBuf::rect, RenderView::rect32, ImBuf::rect_float, RenderResult::rectx, RenderResult::recty, OGLRender::region, OGLRender::rv3d, RV3D_CAMOB, scene, OGLRender::scene, OGLRender::seq_data, SEQ_PREVIEW_SHOW_GPENCIL, View3D::shading, OGLRender::sizex, OGLRender::sizey, SPACE_SEQ, OGLRender::sseq, RenderData::stamp, View3DShading::type, OGLRender::v3d, V3D_OFSDRAW_SHOW_ANNOTATION, OGLRender::view_id, wmOrtho2(), ImBuf::x, RenderData::xsch, ImBuf::y, and RenderData::ysch.
Referenced by screen_opengl_render_apply().
Definition at line 878 of file render_opengl.cc.
References BKE_imtype_is_movie(), BKE_scene_graph_update_for_newframe(), BLI_condition_end(), BLI_condition_wait(), BLI_mutex_end(), BLI_mutex_lock(), BLI_mutex_unlock(), BLI_spin_end(), BLI_task_pool_free(), BLI_task_pool_work_and_wait(), C, RenderData::cfra, OGLRender::cfrao, bMovieHandle::context_free, CTX_wm_area_set(), CTX_wm_region_set(), Scene::customdata_mask_modal, depsgraph, OGLRender::depsgraph, DRW_opengl_context_disable(), DRW_opengl_context_enable(), bMovieHandle::end_movie, GPU_offscreen_free(), OGLRender::ibufs_arr, RenderData::im_format, ImageFormatData::imtype, OGLRender::is_animation, OGLRender::is_sequencer, MEM_freeN, MEM_SAFE_FREE, OGLRender::mh, OGLRender::movie_ctx_arr, NC_SCENE, ND_RENDER_RESULT, OGLRender::num_scheduled_frames, OGLRender::ofs, PIL_check_seconds_timer(), OGLRender::prevar, OGLRender::prevsa, Scene::r, OGLRender::render_frames, OGLRender::reports_lock, scene, OGLRender::scene, OGLRender::seq_data, OGLRender::task_condition, OGLRender::task_mutex, OGLRender::task_pool, OGLRender::timer, OGLRender::totvideos, OGLRender::win, OGLRender::wm, WM_cursor_modal_restore(), WM_event_add_notifier(), and WM_event_remove_timer().
Referenced by screen_opengl_render_anim_init(), screen_opengl_render_anim_step(), screen_opengl_render_cancel(), screen_opengl_render_exec(), and screen_opengl_render_modal().
|
static |
Definition at line 1285 of file render_opengl.cc.
References C, CTX_data_scene(), wmOperator::customdata, NC_SCENE, ND_RENDER_RESULT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, ret, RNA_boolean_get(), screen_opengl_render_anim_init(), screen_opengl_render_anim_step(), screen_opengl_render_apply(), screen_opengl_render_end(), screen_opengl_render_init(), and WM_event_add_notifier().
Referenced by RENDER_OT_opengl().
|
static |
Definition at line 702 of file render_opengl.cc.
References BKE_image_backup_render(), BKE_image_ensure_viewer(), BKE_image_signal(), BKE_imtype_is_movie(), BKE_render_resolution(), BKE_report(), BKE_reportf(), BKE_scene_multiview_num_views_get(), BLI_condition_init(), BLI_mutex_init(), BLI_spin_init(), BLI_task_pool_create(), BLI_task_pool_create_background_serial(), OGLRender::bmain, C, Scene::camera, RenderData::cfra, OGLRender::cfrao, OGLRender::color_depth, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_screen(), CTX_wm_space_seq(), CTX_wm_window(), CTX_wm_workspace(), wmOperator::customdata, Scene::customdata_mask, Scene::customdata_mask_modal, CustomData_MeshMasks_update(), OGLRender::depsgraph, ImageFormatData::depth, DRW_opengl_context_disable(), DRW_opengl_context_enable(), ED_view3d_context_activate(), ED_view3d_context_user_region(), ED_view3d_datamask(), G, gather_frames_to_render(), GPU_offscreen_create(), GPU_RGBA16F, OGLRender::ibufs_arr, RenderData::im_format, OGLRender::ima, IMA_SIGNAL_FREE, IMA_TYPE_R_RESULT, ImageFormatData::imtype, OGLRender::is_animation, OGLRender::is_sequencer, OGLRender::iuser, MEM_callocN, OGLRender::mh, OGLRender::movie_ctx_arr, OGLRender::num_scheduled_frames, OGLRender::ofs, PIL_check_seconds_timer(), OGLRender::pool_ok, OGLRender::prevar, OGLRender::prevsa, wmOperator::ptr, Scene::r, R_IMF_CHAN_DEPTH_32, OGLRender::re, RE_InitState(), RE_NewSceneRender(), OGLRender::region, ARegion::regiondata, wmOperator::reports, OGLRender::reports_lock, RNA_boolean_get(), RNA_boolean_set(), RPT_ERROR, OGLRender::rv3d, scene, OGLRender::scene, ImageUser::scene, screen_opengl_views_setup(), OGLRender::seq_data, OGLRender::sizex, OGLRender::sizey, OGLRender::sseq, OGLRender::task_condition, OGLRender::task_mutex, OGLRender::task_pool, TASK_PRIORITY_HIGH, OGLRender::totvideos, OGLRender::v3d, OGLRender::view_layer, Scene::view_layers, OGLRender::views_len, OGLRender::win, OGLRender::wm, WM_JOB_TYPE_RENDER, WM_jobs_kill_all_except(), WM_jobs_test(), OGLRender::workspace, and OGLRender::write_still.
Referenced by screen_opengl_render_exec(), and screen_opengl_render_invoke().
|
static |
Definition at line 1257 of file render_opengl.cc.
References C, CTX_wm_window(), wmOperator::customdata, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, render_view_open(), wmOperator::reports, RNA_boolean_get(), screen_opengl_render_anim_init(), screen_opengl_render_init(), OGLRender::timer, TIMER, OGLRender::win, OGLRender::wm, WM_event_add_modal_handler(), WM_event_add_timer(), and wmEvent::xy.
Referenced by RENDER_OT_opengl().
|
static |
Definition at line 1215 of file render_opengl.cc.
References ATTR_FALLTHROUGH, C, wmOperator::customdata, wmEvent::customdata, EVT_ESCKEY, NC_SCENE, ND_RENDER_RESULT, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, OGLRender::pool_ok, wmOperator::ptr, ret, RNA_boolean_get(), OGLRender::scene, screen_opengl_render_anim_step(), screen_opengl_render_apply(), screen_opengl_render_end(), OGLRender::timer, TIMER, wmEvent::type, and WM_event_add_notifier().
Referenced by RENDER_OT_opengl().
Definition at line 425 of file render_opengl.cc.
References BKE_image_path_from_imformat(), BKE_image_render_write(), BKE_main_blendfile_path(), BKE_render_result_stamp_info(), OGLRender::bmain, Scene::camera, RenderData::cfra, FILE_MAX, RenderData::im_format, RenderData::pic, Scene::r, R_EXTENSION, OGLRender::re, RE_AcquireResultRead(), RE_ReleaseResultImage(), OGLRender::reports, RenderData::scemode, scene, and OGLRender::scene.
Referenced by screen_opengl_render_apply().
Definition at line 168 of file render_opengl.cc.
References BKE_camera_multiview_render(), BKE_render_result_stamp_info(), BKE_scene_multiview_is_render_view_active(), BKE_scene_multiview_is_stereo3d(), BLI_addtail(), BLI_findstring(), BLI_remlink(), BLI_strncpy(), Scene::camera, View3D::camera, camera, ListBase::first, ImageUser::flag, IMA_SHOW_STEREO, OGLRender::iuser, ListBase::last, MEM_freeN, SceneRenderView::name, RenderView::name, SceneRenderView::next, RenderView::next, RenderView::prev, Scene::r, OGLRender::re, RE_AcquireResultWrite(), RE_ReleaseResult(), RE_SetOverrideCamera(), RenderView::rect32, RenderView::rectf, RenderView::rectz, OGLRender::scene, screen_opengl_is_multiview(), OGLRender::v3d, V3D_CAMERA_SCENE, RenderData::views, and RenderResult::views.
Referenced by screen_opengl_render_init().
|
static |
Definition at line 1022 of file render_opengl.cc.
References BKE_image_path_from_imformat(), BKE_image_render_write(), BKE_imtype_is_movie(), BKE_main_blendfile_path(), BKE_render_result_stamp_info(), BKE_report(), BKE_reportf(), BKE_reports_init(), BLI_condition_notify_all(), BLI_mutex_lock(), BLI_mutex_unlock(), BLI_spin_lock(), BLI_spin_unlock(), BLI_task_pool_user_data(), OGLRender::bmain, Scene::camera, RenderData::cfra, FILE_MAX, ListBase::first, ReportList::flag, RenderData::im_format, ImageFormatData::imtype, is_movie(), ReportList::list, OGLRender::mh, OGLRender::movie_ctx_arr, Report::next, OGLRender::num_scheduled_frames, RenderData::pic, blender::compositor::pool, OGLRender::pool_ok, PRVRANGEON, Scene::r, R_EXTENSION, RE_FreeRenderResult(), RE_WriteRenderViewsMovie(), OGLRender::reports, OGLRender::reports_lock, RPT_ERROR, RPT_PRINT, WriteTaskData::rr, RenderData::scemode, scene, OGLRender::task_condition, OGLRender::task_mutex, WriteTaskData::tmp_scene, and OGLRender::totvideos.
Referenced by write_result_func().
Definition at line 1098 of file render_opengl.cc.
References blender::threading::isolate_task(), blender::compositor::pool, and write_result().
Referenced by schedule_write_result().