Commit Graph

77 Commits

Author SHA1 Message Date
Campbell Barton dbeddcdbce style cleanup: also correct incorrect doxy heading 2012-09-26 20:26:31 +00:00
Sergey Sharybin a73dd3476e Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.

This introduces two configurable color spaces:

- Input color space for images and movie clips. This space is used to convert
  images/movies from color space in which file is saved to Blender's linear
  space (for float images, byte images are not internally converted, only input
  space is stored for such images and used later).

  This setting could be found in image/clip data block settings.

- Display color space which defines space in which particular display is working.

  This settings could be found in scene's Color Management panel.

When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.

This conversions are:

- View, which defines tone curve applying before display transformation.
  These are different ways to view the image on the same display device.
  For example it could be used to emulate film view on sRGB display.

- Exposure affects on image exposure before tone map is applied.

- Gamma is post-display gamma correction, could be used to match particular
  display gamma.

- RGB curves are user-defined curves which are applying before display
  transformation, could be used for different purposes.

All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.

This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).

Some technical notes:

- Image buffer's float buffer is now always in linear space, even if it was
  created from 16bit byte images.

- Space of byte buffer is stored in image buffer's rect_colorspace property.

- Profile of image buffer was removed since it's not longer meaningful.

- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
  to support other spaces, but it's quite large project which isn't so
  much important.

- Legacy Color Management option disabled is emulated by using None display.
  It could have some regressions, but there's no clear way to avoid them.

- If OpenColorIO is disabled on build time, it should make blender behaving
  in the same way as previous release with color management enabled.

More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management

--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
Sergey Sharybin 51fafdee0c Sequencer: overlay display type options
Before this overlay would happen only for defined rectangle area,
now it's possible to show current / reference frames only, which
makes it possible to do more real slit view involving even displaying
frames on different monitors.

Still some work need to be done to clean interface up and support
displaying color information for reference shot.
2012-08-12 13:24:29 +00:00
Campbell Barton 7949f0057f generalize mask poll functions and sequencer mask code. 2012-07-24 09:53:29 +00:00
Sergey Sharybin 06b797033a Fix #32002: "Anim Player" button on header doesn't appear 2012-07-03 15:01:54 +00:00
Dan Eicher cae6873bc6 Sequencer Drag & Drop -- disallow dropping on sequences for the current drop_poll functions 2012-06-14 04:57:42 +00:00
Joshua Leung 0df68aacb1 Grease Pencil - Support for Grease Pencil in the Sequence Editor preview/image
space works again

This commit restores the support for using Grease Pencil in the Sequence Editor
image preview region, making it possible to scribble on footage for review
purposes again. Due to internal changes in how the Sequencer handles the image
drawing for this stuff (i.e. it is now fully based on View2D instead of trying
to implement its own little crazy offset+zoom stuff), a lot of the old code for
handling those offsets is no longer needed. Instead, one of the "standard" cases
is now used, and works quite well.

Bugfixes:
* View-space Grease Pencil drawing was done in wrong place (before view2d
restore)
* Grease Pencil entry in RNA had wrong/missing type

Credits:
* DingTo - initial patch/attempt at restoring support
* Aligorith - solved the "offset problems"
2012-06-11 00:21:50 +00:00
Campbell Barton 36db2a2cff initial support for editing masks in the sequencer, currently only draw the mask. 2012-06-07 19:24:49 +00:00
Campbell Barton bdf9e02346 new sequence strip type for masks. 2012-06-07 18:24:36 +00:00
Campbell Barton a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
Thomas Dinges cf0a7e2a4d Sequencer Preview Area:
* Fixed missing update, when changing render resolution.
2012-04-29 22:25:31 +00:00
Thomas Dinges bdce58a42c Code cleanup:
* Remove some non used *_button_register functions, panels are done in python.
* Remove do_node_region_buttons, was not used anymore.

Fix:
* Only show Grease Pencil panel in the Node editor, when there is a valid nodetree.
2012-04-13 00:04:56 +00:00
Campbell Barton 863f7edad6 style cleanup: sequencer 2012-03-29 22:26:11 +00:00
Campbell Barton ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
Campbell Barton 2f348d8b5d style cleanup: mainly for mesh code, also some WM function use. 2012-03-24 02:51:46 +00:00
Campbell Barton 541d239cdc fix for error in r44711, needed to update sequencer callback.
also quiet some warnings.
2012-03-07 19:19:56 +00:00
Campbell Barton a2c182e923 style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide). 2012-03-03 16:31:46 +00:00
Campbell Barton cbd5b492b1 remove use of deprecated struct members
- editmesh smooth & subdivide were using old mirror axis flag still.
- removed colbits from outliner and object code.
- commented some other parts of the code which access deprecated members and aren't called anywhere.
2011-12-04 06:39:35 +00:00
Campbell Barton 4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton 74017cb020 header cleanup and typo's 2011-10-22 01:53:35 +00:00
Campbell Barton 317b649bb2 fix for buffer overrun with BLI_split_dirfile(...), was simple to do since many places don't check for filename lengyj of 79 chars which is the limit for the file selector.
Add max dir and file length args.
2011-10-15 03:56:05 +00:00
Sergey Sharybin 1d48c8db7f Sequencer: switching to preview mode works fine again 2011-09-19 13:12:54 +00:00
Brecht Van Lommel 59a823c48a Code cleanup: remove context from RNA update functions, only one left. 2011-09-05 19:34:27 +00:00
Joerg Mueller a672ab5e73 3D Audio GSoC:
Improved waveform drawing in the sequencer.

* Drawing the waveform of a sequencer strip is now independent from whether the sound is cached or not.
* Improved drawing of the waveform in the sequencer (especially speed!).
* Making it possible to vertically zoom more in the sequencer to better see the waveform for lipsync.
* Fixed a bug which crashed blender on loading a sound file via ffmpeg.
2011-08-09 14:10:32 +00:00
Campbell Barton 170716ca53 use BKE_area_find_region_type in place of inline loops (no functional changes). 2011-05-20 05:27:31 +00:00
Nathan Letwory 95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
Nathan Letwory 5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
Campbell Barton 8b7482892b made most variables which are only used in a single file and not defined in header static for blenlib, blenkernel and editors. 2011-02-14 17:55:27 +00:00
Campbell Barton 8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
Joshua Leung f233f63d97 == Long-Standing 2.5 Todo - Markers fully working again in all
animation editors (DopeSheet, Graph Editor, NLA, Sequencer) ==

=== Usage Notes ===
In animation editors, marker operators will only be considered while
the mouse is hovering near/over the horizontal scrollbar (i.e. where
the markers usually appear). That means, in order to do something to
the markers, just position your cursor in line with the row of
markers, and then use the same hotkeys you'd use in the TimeLine (so,
unlike in 2.4x, no more need to hold down extra modifier keys for this
case). In the TimeLine, nothing changes, so you don't need to worry
about mouse placement there :)

=== Technical Details ===
Since early 2.5 versions, this functionality has been disabled, as the
markers were always getting evaluated first, and hence "swallowing"
all the events before the editor's own keymaps could access them.

In order to get this working again, I've had to give every marker
operator a "wrapper" invoke callback which performs some checking to
ensure that the mouse is close to the markers (vertically) before the
operator will try to be run. This wrapper also makes sure that once
the operator has finished running, that if it didn't manage to do
anything, then the editor's own keymaps get to have a go.

The vertical tolerance used is currently 30 pixels (as was used for
the borderselect operator).

=== Other Assorted Changes ===
* Gave marker operators dependent on having selected markers to
operate on suitable poll() callbacks. These new poll callbacks ensure
that there are selected markers for the operator to operate on,
further cutting down the number of places where markers may override
standard hotkeys (and avoiding calls to the wrappers too)
* Simplified some of the selection code
* Made some formatting tweaks for consistency, and in one case so that
my text editor's function-list display doesn't get confused
2011-01-06 02:35:12 +00:00
Ton Roosendaal 194449d038 Sequencer:
Dropping in image/movie/sound strips was broken; it dropped
things in wrong location (frame 0), and without giving images proper
length.

The file path setting code for the operators here is complex...
2010-12-11 20:01:34 +00:00
Campbell Barton e5fbd93cec editors/space_* build without unused args warnings 2010-10-16 08:03:28 +00:00
Nathan Letwory 7c133760bb Sequencer timeline didn't update on FPS or FPS Base changes in render settings. Missed notifier handling. 2010-09-27 22:01:06 +00:00
Brecht Van Lommel 969c0fd718 Fix #22894: sequencer drag & drop wasn't working anymore. 2010-07-21 17:37:40 +00:00
Campbell Barton b511fbea6d Sequencer display overlay option, this can show a border area from another time to help compare for color grading.
- Okey sets the border in the display.
- Okey resets the frame offset in the sequencer timeline.
- ghost icon in the header can enable/disable.
- frame offset can be relative or absolute (lock icon)

Not very happy that this commit adds a call to BKE_animsys_evaluate_animdata(scene, ...) in do_build_seq_array_recursively()
without this the offset frames dont have fcurves applied.
Though we will need something like this for prefetch frames to work too.
2010-07-08 10:03:29 +00:00
Campbell Barton ebde8a7ccc new notifier for FRAME_RANGE, use to recalculate the timeline scrollbar range. 2010-06-26 19:17:48 +00:00
Matt Ebb bfd0810beb Notifier cleanup - replaced ND_*_EDIT and ND_*_SELECT data notifiers
with the generic action equivalents (NA_EDITED and new NA_SELECTED)
2010-06-18 04:39:32 +00:00
Campbell Barton c2f36a4d6a naming changes
path -> filepath (for rna and operators, as agreed on with elubie)
 path -> data_path (for windowmanager context functions, this was alredy used in many places)
2010-06-14 03:52:10 +00:00
William Reynish 95bb364bda ***Drag and drop fun!***
Added ability to drag images and movies directly onto objects to assign them as textures.

You can drag them from the file browser, directly from the OS or even from other apps. Here's a video to demonstrate:

http://www.youtube.com/watch?v=fGe2U8F_JvE

Ton wanted to show me how to add it, but he ended up doing almost all of the coding himself ;)

Ton/Matt: Dropping a text file in the Text Editor fails for some reason. It aught to work - probably a keymap conflict of some sorts?
2010-05-09 18:07:17 +00:00
Campbell Barton f743b583bf more lint includes
Only source/blender/editors/ dir, should not give errors on different platforms
Only removing:  UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h
2010-03-23 14:09:09 +00:00
Campbell Barton 1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
Guillermo S. Romero 42ac4a3e7d Fix syntax for ID keyword. 2010-03-21 01:14:04 +00:00
Campbell Barton d4756d395b remove for bad-level-call & some minor changes to make camera switching neater. 2010-03-09 07:41:04 +00:00
Elia Sarti 5658ef4501 Bugfix for #21452, Crashdown in Video Sequence Editor
Added some NULL checks
2010-03-05 19:35:17 +00:00
Campbell Barton 081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Joshua Leung 7dee0e2540 Bugfix #21032: sound strips could not be drag-n-dropped from filebrowser to sequencer 2010-02-09 09:31:45 +00:00
Andrea Weikert 064345ad8c Partial fix for [#20567] SEQUENCER: Image Preview completely unusable
* Zoom and Pan should work now (thanks Aligorith for reviewing)
* mostly removed ancient drawing code
* Fit preview in Window still has issue, HOME key in preview area should be working though
2010-02-07 19:07:56 +00:00
Ton Roosendaal b119ce5fcc Drag and drop 2.5 integration! Finally, slashdot regulars can use
Blender too now! :)

** Drag works as follows:

- drag-able items are defined by the standard interface ui toolkit
- each button can get this feature, via uiButSetDragXXX(but, ...).
  There are calls to define drag-able images, ID blocks, RNA paths, 
  file paths, and so on. By default you drag an icon, exceptionally 
  an ImBuf
- Drag items are registered centrally in the WM, it allows more drag 
  items simultaneous too, but not implemented

** Drop works as follows:

- On mouse release, and if drag items exist in the WM, it converts 
  the mouse event to an EVT_DROP type. This event then gets the full 
  drag info as customdata

- drop regions are defined with WM_dropbox_add(), similar to keymaps 
  you can make a "drop map" this way, which become 'drop map handlers' 
  in the queues.
- next to that the UI kit handles some common button types (like 
  accepting ID or names) to be catching a drop event too.

- Every "drop box" has two callbacks:
  - poll() = check if the event drag data is relevant for this box
  - copy() = fill in custom properties in the dropbox to initialize 
    an operator
- The dropbox handler then calls its standard Operator with its 
  dropbox properties.

** Currently implemented

Drag items:
- ID icons in browse buttons
- ID icons in context menu of properties region
- ID icons in outliner and rna viewer
- FileBrowser icons
- FileBrowser preview images

Drag-able icons are subtly visualized by making them brighter a bit 
on mouse-over. In case the icon is a button or UI element too (most 
cases), the drag-able feature will make the item react to 
mouse-release instead of mouse-press. 

Drop options:

- UI buttons: ID and text buttons (paste name)
- View3d: Object ID drop copies object
- View3d: Material ID drop assigns to object under cursor
- View3d: Image ID drop assigns to object UV texture under cursor
- Sequencer: Path drop will add either Image or Movie strip
- Image window: Path drop will open image


** Drag and drop Notes:

- Dropping into another Blender window (from same application) works 
too. I've added code that passes on mousemoves and clicks to other 
windows, without activating them though. This does make using multi-window
Blender a bit friendler.

- Dropping a file path to an image, is not the same as dropping an 
Image ID... keep this in mind. Sequencer for example wants paths to 
be dropped,  textures in 3d window wants an Image ID.

- Although drop boxes could be defined via Python, I suggest they're 
part of the UI and editor design (= how we want an editor to work), and 
not default offered configurable like keymaps. 

- At the moment only one item can be dragged at a time. This is for 
several reasons.... For one, Blender doesn't have a well defined 
uniform way to define "what is selected" (files, outliner items, etc). 
Secondly there's potential conflicts on what todo when you drop mixed 
drag sets on spots. All undefined stuff... nice for later.

- Example to bypass the above: a collection of images that form a strip, 
should be represented in filewindow as a single sequence anyway. 
This then will fit well and gets handled neatly by design.

- Another option to check is to allow multiple options per drop... it 
could show the operator as a sort of menu, allowing arrow or scrollwheel 
to choose. For time being I'd prefer to try to design a singular drop 
though, just offer only one drop action per data type on given spots.

- What does work already, but a tad slow, is to use a function that 
detects an object (type) under cursor, so a drag item's option can be 
further refined (like drop object on object = parent). (disabled)


** More notes

- Added saving for Region layouts (like split points for toolbar)

- Label buttons now handle mouse over

- File list: added full path entry for drop feature.

- Filesel bugfix: wm_operator_exec() got called there and fully handled, 
while WM event code tried same. Added new OPERATOR_HANDLED flag for this. 
Maybe python needs it too?

- Cocoa: added window move event, so multi-win setups work OK (didnt save).

- Interface_handlers.c: removed win->active

- Severe area copy bug: area handlers were not set to NULL

- Filesel bugfix: next/prev folder list was not copied on area copies

** Leftover todos

- Cocoa windows seem to hang on cases still... needs check
- Cocoa 'draw overlap' swap doesn't work
- Cocoa window loses focus permanently on using Spotlight
  (for these reasons, makefile building has Carbon as default atm)

- ListView templates in UI cannot become dragged yet, needs review... 
it consists of two overlapping UI elements, preventing handling icon clicks.

- There's already Ghost library code to handle dropping from OS 
into Blender window. I've noticed this code is unfinished for Macs, but 
seems to be complete for Windows. Needs test... currently, an external 
drop event will print in console when succesfully delivered to Blender's WM.
2010-01-26 18:18:21 +00:00
Martin Poirier ff038161f6 Add missing names to SpaceTypes 2009-12-19 22:37:51 +00:00
Campbell Barton 8aa8efb327 * rna attributes for sequence strips - seq.start_frame_final & seq.end_frame_final
these expose the final start and end after offsets are applied. when set this is like grabbing the handle and moving it.
* made swapping strips shuffle effects and check for overlap.
2009-12-15 11:27:46 +00:00