diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-27 16:08:35 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-27 16:08:35 +0300 |
commit | 408515810e99d40a6dd53c3d50f1e4be7eb52c87 (patch) | |
tree | 0aaf16e6011b472bb3b12d92c996268b58ec3080 /source/blender/blenkernel/intern | |
parent | 3bd6c8bfa256793170a21130d398c16da1192473 (diff) | |
parent | 9b42b3e11462e96bf24970971ab181122c6b33df (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 17 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/tracking_auto.c | 16 |
2 files changed, 22 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index a83eba145c9..ced94af26d2 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3303,11 +3303,18 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq if ((sequencer_view3d_cb && do_seq_gl && camera) && is_thread_main) { char err_out[256] = "unknown"; - int width = (scene->r.xsch * scene->r.size) / 100; - int height = (scene->r.ysch * scene->r.size) / 100; + const int width = (scene->r.xsch * scene->r.size) / 100; + const int height = (scene->r.ysch * scene->r.size) / 100; const bool use_background = (scene->r.alphamode == R_ADDSKY); const char *viewname = BKE_scene_multiview_render_view_name_get(&scene->r, context->view_id); + unsigned int draw_flags = SEQ_OFSDRAW_NONE; + draw_flags |= (use_gpencil) ? SEQ_OFSDRAW_USE_GPENCIL : 0; + draw_flags |= (use_background) ? SEQ_OFSDRAW_USE_BACKGROUND : 0; + draw_flags |= (context->gpu_full_samples) ? SEQ_OFSDRAW_USE_FULL_SAMPLE : 0; + draw_flags |= (context->scene->r.seq_flag & R_SEQ_SOLID_TEX) ? SEQ_OFSDRAW_USE_SOLID_TEX : 0; + draw_flags |= (context->scene->r.seq_flag & R_SEQ_CAMERA_DOF) ? SEQ_OFSDRAW_USE_CAMERA_DOF : 0; + /* for old scene this can be uninitialized, * should probably be added to do_versions at some point if the functionality stays */ if (context->scene->r.seq_prev_type == 0) @@ -3319,10 +3326,8 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq ibuf = sequencer_view3d_cb( /* set for OpenGL render (NULL when scrubbing) */ context->eval_ctx, scene, view_layer, camera, width, height, IB_rect, - context->scene->r.seq_prev_type, - (context->scene->r.seq_flag & R_SEQ_SOLID_TEX) != 0, - use_gpencil, use_background, scene->r.alphamode, - context->gpu_samples, context->gpu_full_samples, viewname, + draw_flags, context->scene->r.seq_prev_type, + scene->r.alphamode, context->gpu_samples, viewname, context->gpu_fx, context->gpu_offscreen, err_out); if (ibuf == NULL) { fprintf(stderr, "seq_render_scene_strip failed to get opengl buffer: %s\n", err_out); diff --git a/source/blender/blenkernel/intern/tracking_auto.c b/source/blender/blenkernel/intern/tracking_auto.c index 50451b90581..4ff4a129768 100644 --- a/source/blender/blenkernel/intern/tracking_auto.c +++ b/source/blender/blenkernel/intern/tracking_auto.c @@ -449,8 +449,10 @@ static void autotrack_context_step_cb(void *userdata, int track) options->failed_frame = frame + frame_delta; } - /* Note: Atomic is probably not actually needed here, I doubt we could get any other result than a true bool anyway. - * But for sake of consistency, and since it costs nothing... */ + /* Note: Atomic is probably not actually needed here, I doubt we could get + * any other result than a true bool anyway. + * But for sake of consistency, and since it costs nothing... + */ atomic_fetch_and_or_uint8((uint8_t *)&context->step_ok, true); } @@ -459,7 +461,10 @@ bool BKE_autotrack_context_step(AutoTrackContext *context) const int frame_delta = context->backwards ? -1 : 1; context->step_ok = false; - BLI_task_parallel_range(0, context->num_tracks, context, autotrack_context_step_cb, context->num_tracks > 1); + BLI_task_parallel_range(0, context->num_tracks, + context, + autotrack_context_step_cb, + context->num_tracks > 1); /* Advance the frame. */ BLI_spin_lock(&context->spin_lock); @@ -567,8 +572,9 @@ void BKE_autotrack_context_finish(AutoTrackContext *context) if ((plane_track->flag & PLANE_TRACK_AUTOKEY) == 0) { int track; for (track = 0; track < context->num_tracks; ++track) { - if (BKE_tracking_plane_track_has_point_track(plane_track, - context->options[track].track)) + if (BKE_tracking_plane_track_has_point_track( + plane_track, + context->options[track].track)) { BKE_tracking_track_plane_from_existing_motion( plane_track, |