Blender V2.61 - r43446
|
#include <math.h>
#include <string.h>
#include <stddef.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_threads.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "DNA_scene_types.h"
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_multires.h"
#include "BKE_report.h"
#include "BKE_sequencer.h"
#include "BKE_screen.h"
#include "BKE_scene.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_screen.h"
#include "ED_object.h"
#include "RE_pipeline.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "wm_window.h"
#include "render_intern.h"
Go to the source code of this file.
Classes | |
struct | RenderJob |
Typedefs | |
typedef struct RenderJob | RenderJob |
Functions | |
void | image_buffer_rect_update (Scene *scene, RenderResult *rr, ImBuf *ibuf, volatile rcti *renrect) |
static void | screen_render_scene_layer_set (wmOperator *op, Main *mainp, Scene **scene, SceneRenderLayer **srl) |
static int | screen_render_exec (bContext *C, wmOperator *op) |
static void | render_freejob (void *rjv) |
static void | make_renderinfo_string (RenderStats *rs, Scene *scene, char *str) |
static void | image_renderinfo_cb (void *rjv, RenderStats *rs) |
static void | render_progress_update (void *rjv, float progress) |
static void | image_rect_update (void *rjv, RenderResult *rr, volatile rcti *renrect) |
static void | render_startjob (void *rjv, short *stop, short *do_update, float *progress) |
static void | render_endjob (void *rjv) |
static int | render_breakjob (void *rjv) |
static void | render_drawlock (void *UNUSED(rjv), int lock) |
static int | screen_render_modal (bContext *C, wmOperator *UNUSED(op), wmEvent *event) |
static int | screen_render_invoke (bContext *C, wmOperator *op, wmEvent *event) |
void | RENDER_OT_render (wmOperatorType *ot) |
Definition in file render_internal.c.
void image_buffer_rect_update | ( | Scene * | scene, |
RenderResult * | rr, | ||
ImBuf * | ibuf, | ||
volatile rcti * | renrect | ||
) |
Definition at line 77 of file render_internal.c.
References RenderData::color_mgt_flag, RenderResult::crop, ImBuf::dither, IB_PROFILE_LINEAR_RGB, IB_PROFILE_SRGB, imb_addrectImBuf(), IMB_buffer_byte_from_float(), NULL, Scene::r, R_COLOR_MANAGEMENT, R_COLOR_MANAGEMENT_PREDIVIDE, ImBuf::rect, RenderResult::rect32, RenderLayer::rectf, RenderResult::rectf, RenderResult::rectx, RenderResult::recty, RenderResult::renlay, RenderResult::tilerect, ImBuf::x, rcti::xmax, rcti::xmin, ImBuf::y, rcti::ymax, and rcti::ymin.
static void image_rect_update | ( | void * | rjv, |
RenderResult * | rr, | ||
volatile rcti * | renrect | ||
) | [static] |
Definition at line 359 of file render_internal.c.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), RenderJob::do_update, RenderJob::image, image_buffer_rect_update(), RenderJob::iuser, Image::last_render_slot, Image::render_slot, and RenderJob::scene.
Referenced by screen_render_invoke().
static void image_renderinfo_cb | ( | void * | rjv, |
RenderStats * | rs | ||
) | [static] |
Definition at line 325 of file render_internal.c.
References RenderJob::do_update, IMA_MAX_RENDER_TEXT, make_renderinfo_string(), MEM_callocN(), NULL, RenderJob::re, RE_AcquireResultRead(), RE_ReleaseResult(), RenderJob::scene, and RenderResult::text.
Referenced by screen_render_invoke().
static void make_renderinfo_string | ( | RenderStats * | rs, |
Scene * | scene, | ||
char * | str | ||
) | [static] |
Definition at line 271 of file render_internal.c.
References BLI_timestr(), RenderData::cfra, RenderStats::curblur, RenderStats::curfield, RenderStats::curfsa, G, G_DEBUG, IMA_MAX_RENDER_TEXT, RenderStats::infostr, RenderStats::lastframetime, Scene::lay, MEM_get_mapped_memory_in_use(), MEM_get_memory_in_use(), MEM_get_peak_memory(), mem_in_use, mmap_in_use, Scene::r, R_SINGLE_LAYER, RenderData::scemode, RenderStats::statstr, str, RenderStats::totface, RenderStats::tothalo, RenderStats::totlamp, RenderStats::totstrand, and RenderStats::totvert.
Referenced by image_renderinfo_cb().
static int render_breakjob | ( | void * | rjv | ) | [static] |
Definition at line 430 of file render_internal.c.
References G, and RenderJob::stop.
Referenced by screen_render_invoke().
static void render_drawlock | ( | void * | UNUSEDrjv, |
int | lock | ||
) | [static] |
Definition at line 443 of file render_internal.c.
References BKE_spacedata_draw_locks().
Referenced by screen_render_invoke().
static void render_endjob | ( | void * | rjv | ) | [static] |
Definition at line 398 of file render_internal.c.
References ED_update_for_newframe(), free_main(), G, Scene::id, RenderJob::main, NA_EDITED, NC_NODE, NC_WINDOW, Scene::nodetree, nodeUpdateID(), ntreeCompositClearTags(), NULL, Scene::r, R_NO_FRAME_UPDATE, RenderJob::re, RE_InitRenderCB(), RenderData::scemode, RenderJob::scene, wmWindow::screen, RenderJob::srl, RenderJob::win, and WM_main_add_notifier().
Referenced by screen_render_invoke().
static void render_freejob | ( | void * | rjv | ) | [static] |
Definition at line 263 of file render_internal.c.
References MEM_freeN().
Referenced by screen_render_invoke().
void RENDER_OT_render | ( | wmOperatorType * | ot | ) |
Definition at line 600 of file render_internal.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::invoke, MAX_ID_NAME, wmOperatorType::modal, wmOperatorType::name, RE_MAXNAME, RNA_def_boolean(), RNA_def_string(), screen_render_exec(), screen_render_invoke(), screen_render_modal(), and wmOperatorType::srna.
Referenced by ED_operatortypes_render().
static void render_progress_update | ( | void * | rjv, |
float | progress | ||
) | [static] |
Definition at line 347 of file render_internal.c.
References RenderJob::do_update, and RenderJob::progress.
Referenced by screen_render_invoke().
static void render_startjob | ( | void * | rjv, |
short * | stop, | ||
short * | do_update, | ||
float * | progress | ||
) | [static] |
Definition at line 380 of file render_internal.c.
References RenderJob::anim, RenderJob::camera_override, RenderData::cfra, RenderJob::do_update, RenderData::efra, RenderData::frame_step, RenderJob::lay, RenderJob::main, NULL, RenderJob::progress, Scene::r, RenderJob::re, RE_BlenderAnim(), RE_BlenderFrame(), RE_SetReports(), RenderJob::reports, RenderJob::scene, RenderData::sfra, RenderJob::srl, RenderJob::stop, and RenderJob::write_still.
Referenced by screen_render_invoke().
static int screen_render_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 192 of file render_internal.c.
References BKE_image_backup_render(), BKE_image_signal(), BKE_image_verify_viewer(), BKE_imtype_is_movie(), BKE_report(), blender_test_break(), RenderData::cfra, CTX_data_main(), CTX_data_scene(), CTX_wm_screen(), CTX_wm_view3d(), ED_update_for_newframe(), RenderData::efra, RenderData::frame_step, G, Scene::id, RenderData::im_format, IMA_SIGNAL_FREE, IMA_TYPE_R_RESULT, ImageFormatData::imtype, View3D::lay, Scene::lay, ID::name, NC_SCENE, ND_RENDER_RESULT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, Scene::r, RE_BlenderAnim(), RE_BlenderFrame(), RE_NewRender(), RE_SetReports(), RE_test_break_cb(), wmOperator::reports, RNA_boolean_get(), RPT_ERROR, screen_render_scene_layer_set(), seq_stripelem_cache_cleanup(), RenderData::sfra, V3D_CAMERA_LOCAL, and WM_event_add_notifier().
Referenced by RENDER_OT_render().
static int screen_render_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 467 of file render_internal.c.
References RenderJob::anim, bScreen::animtimer, BKE_image_backup_render(), BKE_image_signal(), BKE_image_verify_viewer(), BKE_imtype_is_movie(), BKE_report(), BKE_undo_get_main(), RenderJob::camera_override, CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), CTX_wm_manager(), CTX_wm_screen(), CTX_wm_view3d(), CTX_wm_window(), ED_object_exit_editmode(), ED_screen_animation_play(), G, Scene::id, RenderData::im_format, IMA_SIGNAL_FREE, IMA_TYPE_R_RESULT, RenderJob::image, image_rect_update(), image_renderinfo_cb(), ImageFormatData::imtype, RenderJob::iuser, Scene::lay, View3D::lay, RenderJob::lay, RenderJob::main, MEM_callocN(), multires_force_render_update(), ID::name, Object::name, NC_SCENE, ND_RENDER_RESULT, NULL, ImageUser::ok, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, Scene::r, RenderJob::re, RE_display_draw_cb(), RE_draw_lock_cb(), RE_is_rendering_allowed(), RE_NewRender(), RE_progress_cb(), RE_seq_render_active(), RE_stats_draw_cb(), RE_test_break_cb(), render_breakjob(), render_drawlock(), render_endjob(), render_freejob(), render_progress_update(), render_startjob(), render_view_open(), RenderJob::reports, wmOperator::reports, RNA_boolean_get(), RNA_struct_property_is_set(), RPT_ERROR, ImageUser::scene, RenderJob::scene, screen_render_scene_layer_set(), seq_stripelem_cache_cleanup(), RenderJob::srl, V3D_CAMERA_LOCAL, RenderJob::win, WM_cursor_wait(), WM_event_add_modal_handler(), WM_event_add_notifier(), WM_JOB_EXCL_RENDER, WM_JOB_PRIORITY, WM_JOB_PROGRESS, WM_JOB_SUSPEND, WM_jobs_callbacks(), WM_jobs_customdata(), WM_jobs_get(), WM_jobs_start(), WM_jobs_stop_all(), WM_jobs_test(), WM_jobs_timer(), RenderJob::write_still, wmEvent::x, and wmEvent::y.
Referenced by RENDER_OT_render().
static int screen_render_modal | ( | bContext * | C, |
wmOperator * | UNUSEDop, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 450 of file render_internal.c.
References CTX_data_scene(), CTX_wm_manager(), ESCKEY, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmEvent::type, and WM_jobs_test().
Referenced by RENDER_OT_render().
static void screen_render_scene_layer_set | ( | wmOperator * | op, |
Main * | mainp, | ||
Scene ** | scene, | ||
SceneRenderLayer ** | srl | ||
) | [static] |
Definition at line 160 of file render_internal.c.
References BLI_findstring(), RenderData::cfra, MAX_ID_NAME, wmOperator::ptr, Scene::r, RE_MAXNAME, RNA_string_get(), RNA_struct_property_is_set(), Main::scene, and scene_camera_switch_update().
Referenced by screen_render_exec(), and screen_render_invoke().