Commit Graph

192 Commits

Author SHA1 Message Date
99ded01b64 Sequencer: undefine SEQ_BEGIN/SEQ_END (see comment) 2014-11-10 19:39:59 +01:00
8ba33a69c8 Cleanup: rename draw_markers_time -> ED_markers_draw 2014-10-28 19:03:13 +01:00
36da579d12 Markers: show the area that handles marker events 2014-10-28 18:51:28 +01:00
25d6479ffb Correct recent commit 2014-10-16 23:22:48 +02:00
59b4ea5c69 Sequencer: draw metastrip range while editing 2014-10-16 12:02:12 +02:00
3b2f6dbf98 Sequencer: Add gaussian blur effect
Currently this gaussian blur implementation accumulates values in the
square kernel rather that doing X direction and then Y direction because
of the lack of using multiple-staged filters.

Once we can we'll implement a way to apply filter as multiple stages we
can optimize hell of a lot in here.

Another thing we can do is to use SSE2 instructions here.
2014-07-19 22:17:22 +06:00
f37c971878 Code cleanup: use ED_gpencil_ prefix for grease pencil 2014-06-14 02:54:17 +10:00
eed0c4d062 Fix T40158: Playback with 100% proxies is very slow
Context was creating with the wrong resolution.
2014-05-13 16:15:19 +02:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
43d695e82e Code cleanup: view2d api naming 2014-04-21 18:47:17 +10:00
3e3efae7e9 Viewport Text Drawing: replace single allocs with a memarena
- pass label strlen since in many cases its already known.
- use single linked list for cached text drawing.
- add BLI_link_utils.h for single linked list macros.

own tests give approx 22% overall speedup.
2014-04-17 16:04:28 +10:00
a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
9767ff8916 Code cleanup: use true/false in sequencer functions 2014-03-20 15:46:38 +06:00
39eb314cb9 UI: Refactor timecode functions into BLI_timecode
- deduplicate timecode_simple_string from image.c
- replace V2D_UNIT_SECONDSSEQ with V2D_UNIT_SECONDS
- avoid possible buffer overflow bugs (sprintf -> BLI_snprintf)
- remove option not to use timecode and split into 2 functions

Patch D227 by Andrew Buttery with own refactoring.
2014-01-29 20:44:01 +11:00
f6624b84cf Send sequencer render context as const pointer rather than as value
No functional changes just creepy to send rather huge structure by value.
2014-01-19 00:18:36 +06:00
8aaf4aaae8 Sequencer: prevent unknown scopes from crashing 2014-01-08 15:40:55 +11:00
51c6ecac52 Fix T38004: size of Waveform, Vectorscope and Histogram is incorrect in VSE
Made it so scopes image buffer is displayed without any additional scale
applied on them,

Further tweaks are possible here, but that i'd consider a TODO.
2014-01-02 17:57:01 +06:00
709041ed0b Threaded object update and EvaluationContext
Summary:
Made objects update happening from multiple threads. It is a task-based
scheduling system which uses current dependency graph for spawning new
tasks. This means threading happens on object level, but the system is
flexible enough for higher granularity.

Technical details:

- Uses task scheduler which was recently committed to trunk
  (that one which Brecht ported from Cycles).

- Added two utility functions to dependency graph:
  * DAG_threaded_update_begin, which is called to  initialize threaded
    objects update. It will also schedule root DAG node to the queue,
    hence starting evaluation process.

    Initialization will calculate how much parents are to be evaluation
    before current DAG node can be scheduled. This value is used by task
    threads for faster detecting which nodes might be scheduled.

  * DAG_threaded_update_handle_node_updated which is  called from task
    thread function when node was fully handled.

	This function decreases num_pending_parents of node children and
	schedules children with zero valency.

    As it might have become clear, task thread receives DAG nodes and
    decides which callback to call for it.

    Currently only BKE_object_handle_update is called for object nodes.

    In the future it'll call node->callback() from Ali's new DAG.

- This required adding some workarounds to the render pipeline.
  Mainly to stop using get_object_dm() from modifiers' apply callback.
  Such a call was only a workaround for dependency graph glitch when
  rendering scene with, say, boolean modifiers before displaying
  this scene.

  Such change moves workaround from one place to another, so overall
  hackentropy remains the same.

- Added paradigm of EvaluaitonContext. Currently it's more like just a
  more reliable replacement for G.is_rendering which fails in some
  circumstances.

  Future idea of this context is to also store all the local data needed
  for objects evaluation such as local time, Copy-on-Write data and so.

  There're two types of EvaluationContext:

  * Context used for viewport updated and owned by Main. In the future
    this context might be easily moved to Window or Screen to allo
    per-window/per-screen local time.

  * Context used by render engines to evaluate objects for render purposes.
    Render engine is an owner of this context.

  This context is passed to all object update routines.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

CC: lukastoenne

Differential Revision: https://developer.blender.org/D94
2013-12-26 17:24:42 +06:00
5a91df3271 Implement GPU-side dither
Summary:
Uses some magic pseudo-random which is actually a
texture coordinate hashing function.

TODOs:
- Dither noise is the same for all the frames.
- It's different from Floyd's dither we've been
  using before.
- Currently CPU and GPU dithering used different
  implementation. Ideally we need to use the same
  dither in CPU.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D58
2013-12-13 12:36:45 +06:00
d7983e3638 Option to overlay mask over the footage
Currently supports only two modes:
- Show alpha channel of the mask
- Multiply footage by the mask, which will give
  you final-looking combined image.

TODO: Currently rasterization happens on every
      redraw, need to cache rasterized mask
      somewhere to make redraw more realtime.
2013-10-12 14:09:05 +00:00
fc2dbc20ff Fix #36800: closing render window during render crashes, the operator would be
cancelled before the job, causing invalid access to op->reports in the job thread.
2013-09-23 19:35:21 +00:00
d4b8a6cb85 Code cleanup: use boolean instead of int for colormanagement 2013-09-05 17:13:43 +00:00
7db1d6556d code cleanup: add break statements in switch ()'s, (even at the last case). 2013-07-21 08:16:37 +00:00
1c15beb6b2 remove NULL checks on fixed size arrays, also was calling BLI_testextensie_glob every time in the file selector with a blank string. 2013-07-13 14:16:59 +00:00
28dd9c6a40 Fix #35767: transforming nodes in the node editor changed the wireframe color
of the active object in the 3D view. This was due to sharing a global G.moving
flag to indicate that transform is active, now it's only set per transform data
type so different editors don't influence each other.
2013-06-24 22:41:37 +00:00
7ce0ea00a0 code cleanup: remove unused struct 2013-06-02 02:25:40 +00:00
ac2fa65dd9 style cleanup 2013-05-18 11:37:49 +00:00
f314ff02bd Fix #35390: sequencer end frame of preview range was not drawing correct. 2013-05-18 10:24:38 +00:00
bbec4c94f9 Fix for #35390 fix: sequencer scene start/end still did not display when they are equal. 2013-05-17 16:37:47 +00:00
88d1067f58 code cleanup: use BM_elem_flag_test rather then accessing 'ele->head.hflag' 2013-05-17 12:43:58 +00:00
79fc2ac845 Fix #35390: the verticel lines indicating scene start and end frame in the
sequencer now draw such that a strip that spans this time is contained just
between these lines.
2013-05-17 09:47:05 +00:00
cabe929b2a Changes to image draw method options
It's now default to 2D textures, and no AUTO mode at this
moment, since detecting which method is the best not so
simple.

Image drawing could manually be switched to GLSL for tests
and feedback, but for default GLSL is not so much great.

Reason of this is huge images, where operations like panning
becomes dead slow comparing GLSL vs. 2D texture.
2013-04-29 15:50:12 +00:00
f5e022a0a0 Solve possible uninitialized variables usage in sequencer draw function 2013-04-27 18:21:16 +00:00
f716eb17e2 Some color space issues in sequencer:
Sequencer was always trying to do GLSL color space
conversion, not respecting user settings at all.

This failed a lot when RGB curves a used in color
management settings.

Now sequencer will fallback if GLSL can not be used
and will also respect user settings (however, draw
pixels are not supported, sequencer always uses 2D
textures).
2013-04-27 15:01:17 +00:00
d87b40d95d Fixes for color management:
- Sequencer preview was clamping float buffers
- ACES color space wasn't correct, was noticeable when
  applying display processor from linear space to display.
- Extended sRGB LUT to sRGBf from nuke-default config.
  Makes sequencer behave much better in sRGB space.
2013-04-26 18:56:15 +00:00
ac224a64f4 Fix #34941: Space.draw_handler_add now supports PRE_VIEW and POST_VIEW callbacks
for more editors: timeline, graph, action, NLA, sequencer, image, clip.
2013-04-10 16:59:55 +00:00
c1b704a11a Use GLSL display for compositor backdrop and sequencer preview
Now only background images remained to be ported. Plus implement
GLSL for dithering and RGB curves.
2013-04-04 12:20:13 +00:00
726dedafbc More Histogram fixes:
Sequencer histogram was calculating still badly, now it uses a per-color
component counter to calculate the levels (instead of counter for all)
2013-04-02 17:12:21 +00:00
58530a5aff Usability fix, for color grading.
The Scopes and Histogram (Image editor, Sequencer) were not updating on
changes in color or display settings. 

- Missing notifiers for refreshing
- Missing code to draw correct for managed byte buffers.
2013-04-02 12:41:11 +00:00
3657f3d938 Draw checker backdrop for sequencer when in RGBA mode 2013-04-01 09:15:37 +00:00
166cdf8b5a Bug fix - own collection.
- Scopes in Sequencer were not drawing OK (drawing code assumed alpha)
- Histogram in Sequencer now uses same formula to quantify R G B as the
  other histogram in Blender (per channel).

I seriously thought of dropping this, and add the same sidebar here as we
have for Image window. However, what stops me is that current code is
very optimized, and has OMP hints.

Will check instead on cleaner drawing here now.
2013-03-26 17:49:57 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
3d7867d7f0 Added RGBA|RGB channels toggle to sequencer preview
Main purpose of this is to be more compatible with older
versions of blender (before alpha cleanup) where sequencer
used to display premultiplied image on an straight opengl
viewport.

Now sequencer preview would behave closer to image editor
However adding Alpha and R|G|B displays is not so simple
because sequencer is using 2D textures. Would be nice to
implement this options as well, but this is not so much
important IMO.

This hall fix
- #34453: VSE: Subtract function does not work properly

TODO: Make RGBA display default for our startup.blend
2013-02-27 10:26:58 +00:00
f6f33515ac Fix #33822: Compositor gets stuck if a sequencer window is also visible
Issue was caused by a fix for rendered sequencer preview mode, which
will likely conflict with compositor job. Made it so compositor job
will be killed when sequencer uses rendered preview.
2013-01-10 16:11:12 +00:00
0c1d1e6c30 Alpha-over images on a black background when in RGB display mode
This is actually a bit arbitrary decision and mainly it preserves
compatibility with how images were displaying in previous releases.

In fact, we actually would need to think about configurable backdrop
color and blending mode to be used for display in RGB mode.
2013-01-08 15:34:33 +00:00
1f70a30bd7 Fix #33735: sequencer crash when using rendered preview
Issue was caused by preview job starting just moment before
sequencer starts rendering. This lead to threading conflicts
since renderer itself is not thread-safe.

Now all preview jobs would be killed before sequencer starts
rendering stack when final render for preview is enabled.
2013-01-07 14:25:29 +00:00
fe006c0426 don't draw the sequencer grease pencil panel when in the channel view or scopes.
also don't draw grease pencil over scopes.
2012-12-17 04:44:39 +00:00
f9ec10688a fix [#33501] Grease pencil in OpenGL render
With the view3d 'Render Only' option, grease pencil wouldn't draw, but for OpenGL render it did.

Since grease pencil can be very useful in opengl renders, enable grease pencil drawing with 'Render Only' option in the viewport,
and add a checkbox in the grease pencil header not to draw (unchecking each layer is annoying and applies to all spaces).
2012-12-17 02:34:53 +00:00
b91cf60962 Fix #33330: Proxies are not built in Sequencer if preview is visible
Was own regression when was solving conflict between sequencer preview
and compositor jobs. Made it so now only compositor jobs are being
killed from sequencer preview.
2012-11-28 09:36:23 +00:00
e1d1cc0680 Fix #33253: VSE preview doesn't display compositor
There were two issues in scene strip rendering:

- It will skip rendering if scene doesn't have camera but uses compositor
- G.is_break will cancel preview rendering

Also removed Use Sequencer from scene's strip settings, it's not supported.
2012-11-21 09:36:36 +00:00