74 switch (render_size) {
90 switch (render_size) {
109 if (proxy ==
nullptr) {
138 char suffix[24] = {
'\0'};
142 if (proxy ==
nullptr) {
162 if (
ed->proxy_dir[0] == 0) {
163 STRNCPY(dirpath,
"//BL_proxy");
196 if (strip->
data->
proxy ==
nullptr || !context->use_proxies) {
202 (size_flags & psize) != 0;
210 context->preview_render_size);
221 if (proxy->
anim ==
nullptr) {
223 context->scene, strip, timeline_frame, psize, filepath, context->view_id) == 0)
233 if (proxy->
anim ==
nullptr) {
247 context->scene, strip, timeline_frame, psize, filepath, context->view_id) == 0)
269 int proxy_render_size,
270 const bool overwrite)
273 ImBuf *ibuf_tmp, *ibuf;
274 Scene *scene = context->scene;
292 int rectx = (proxy_render_size * ibuf_tmp->
x) / 100;
293 int recty = (proxy_render_size * ibuf_tmp->
y) / 100;
295 if (ibuf_tmp->
x != rectx || ibuf_tmp->
y != recty) {
358 prefix_vars->
prefix[0] =
'\0';
359 prefix_vars->
ext =
nullptr;
368 if (prefix_vars->
prefix[0] ==
'\0') {
394 switch (strip->
type) {
428 return (required_proxies & built_proxies) != required_proxies;
437 bool build_only_on_bad_performance)
456 for (
i = 0;
i < num_files;
i++) {
481 context->bmain = bmain;
483 context->scene = scene;
484 context->orig_seq = strip;
486 context->strip = strip_new;
488 context->view_id =
i;
501 build_only_on_bad_performance);
503 if (!context->proxy_builder) {
518 const bool overwrite = context->overwrite;
520 Strip *strip = context->strip;
521 Scene *scene = context->scene;
522 Main *bmain = context->bmain;
526 if (context->proxy_builder) {
528 &worker_status->
stop,
560 render_context.
view_id = context->view_id;
571 render_context.
rectx,
572 render_context.
recty);
592 if (worker_status->
stop ||
G.is_break) {
600 if (context->proxy_builder) {
MovieReader * openanim(const char *filepath, int ibuf_flags, int streamindex, bool keep_original_colorspace, char colorspace[IMA_MAX_SPACE])
const char * BKE_main_blendfile_path_from_global()
void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height)
int BKE_scene_multiview_num_views_get(const RenderData *rd)
void BKE_scene_multiview_view_prefix_get(Scene *scene, const char *filepath, char *r_prefix, const char **r_ext)
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int BLI_access(const char *filepath, int mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BLI_file_ensure_parent_dir_exists(const char *filepath) ATTR_NONNULL(1)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
LinkData * BLI_genericNodeN(void *data)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int round_fl_to_int(float a)
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
#define BLI_path_join(...)
#define SNPRINTF(dst, format,...)
char * STRNCPY(char(&dst)[N], const char *src)
size_t BLI_snprintf(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
Compatibility-like things for windows.
const char * dirname(char *path)
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
@ SEQ_EDIT_PROXY_DIR_STORAGE
@ SEQ_STORAGE_PROXY_CUSTOM_FILE
@ SEQ_STORAGE_PROXY_CUSTOM_DIR
@ SEQ_PROXY_SKIP_EXISTING
eSpaceSeq_Proxy_RenderSize
@ SEQ_RENDER_SIZE_PROXY_25
@ SEQ_RENDER_SIZE_PROXY_75
@ SEQ_RENDER_SIZE_PROXY_50
@ SEQ_RENDER_SIZE_PROXY_100
ImBuf * IMB_load_image_from_filepath(const char *filepath, const int flags, char r_colorspace[IM_MAX_SPACE]=nullptr)
void IMB_freeImBuf(ImBuf *ibuf)
ImBuf * IMB_scale_into_new(const ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
bool IMB_save_image(ImBuf *ibuf, const char *filepath, const int flags)
Read Guarded memory(de)allocation.
BPy_StructRNA * depsgraph
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void MOV_set_custom_proxy_dir(MovieReader *anim, const char *dir)
MovieProxyBuilder * MOV_proxy_builder_start(MovieReader *anim, IMB_Timecode_Type tcs_in_use, int proxy_sizes_in_use, int quality, const bool overwrite, blender::Set< std::string > *processed_paths, bool build_only_on_bad_performance)
void MOV_proxy_builder_process(MovieProxyBuilder *context, bool *stop, bool *do_update, float *progress)
void MOV_close_proxies(MovieReader *anim)
int MOV_get_existing_proxies(const MovieReader *anim)
int MOV_calc_frame_index_with_timecode(MovieReader *anim, IMB_Timecode_Type tc, int position)
void MOV_proxy_builder_finish(MovieProxyBuilder *context, const bool stop)
void MOV_close(MovieReader *anim)
void MOV_get_filename(const MovieReader *anim, char *filename, int filename_maxncpy)
ImBuf * MOV_decode_frame(MovieReader *anim, int position, IMB_Timecode_Type tc, IMB_Proxy_Size preview_size)
void relations_strip_free_anim(Strip *strip)
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
void proxy_rebuild(IndexBuildContext *context, wmJobWorkerStatus *worker_status)
void intra_frame_cache_set_cur_frame(Scene *scene, float frame, int view_id, int width, int height)
void seq_imbuf_assign_spaces(const Scene *scene, ImBuf *ibuf)
IMB_Proxy_Size rendersize_to_proxysize(eSpaceSeq_Proxy_RenderSize render_size)
float give_frame_index(const Scene *scene, const Strip *strip, float timeline_frame)
static void seq_proxy_build_frame(const RenderData *context, SeqRenderState *state, Strip *strip, int timeline_frame, int proxy_render_size, const bool overwrite)
static int seq_proxy_context_count(Strip *strip, Scene *scene)
Editing * editing_get(const Scene *scene)
StripProxy * seq_strip_proxy_alloc()
ImBuf * seq_proxy_fetch(const RenderData *context, Strip *strip, int timeline_frame)
int time_left_handle_frame_get(const Scene *, const Strip *strip)
void seq_free_strip_recurse(Scene *scene, Strip *strip, const bool do_id_user)
void strip_open_anim_file(Scene *scene, Strip *strip, bool openfile)
bool proxy_rebuild_context(Main *bmain, Depsgraph *depsgraph, Scene *scene, Strip *strip, blender::Set< std::string > *processed_paths, ListBase *queue, bool build_only_on_bad_performance)
void proxy_set(Strip *strip, bool value)
void seq_proxy_index_dir_set(MovieReader *anim, const char *base_dir)
static bool seq_proxy_multiview_context_invalid(Strip *strip, Scene *scene, const int view_id, MultiViewPrefixVars *prefix_vars)
void render_new_render_data(Main *bmain, Depsgraph *depsgraph, Scene *scene, int rectx, int recty, eSpaceSeq_Proxy_RenderSize preview_render_size, Render *render, RenderData *r_context)
static bool seq_proxy_get_filepath(Scene *scene, Strip *strip, int timeline_frame, eSpaceSeq_Proxy_RenderSize render_size, char *filepath, const int view_id)
void proxy_rebuild_finish(IndexBuildContext *context, bool stop)
void free_strip_proxy(Strip *strip)
static bool seq_proxy_need_rebuild(Strip *strip, MovieReader *anim)
float rendersize_to_scale_factor(eSpaceSeq_Proxy_RenderSize render_size)
Strip * strip_duplicate_recursive(Main *bmain, const Scene *scene_src, Scene *scene_dst, ListBase *new_seq_list, Strip *strip, const StripDuplicate dupe_flag)
bool seq_proxy_get_custom_file_filepath(Strip *strip, char *filepath, const int view_id)
bool can_use_proxy(const RenderData *context, const Strip *strip, IMB_Proxy_Size psize)
ImBuf * seq_render_strip(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame)
StripElem * render_give_stripelem(const Scene *scene, const Strip *strip, int timeline_frame)
void seq_multiview_name(Scene *scene, const int view_id, const char *prefix, const char *ext, char *r_path, size_t r_size)
ImBufFloatBuffer float_buffer
ImbFormatOptions foptions
struct MovieReader * anim
ColorManagedColorspaceSettings colorspace_settings
struct MovieReader * anim
MovieProxyBuilder * proxy_builder