Commit Graph

363 Commits

Author SHA1 Message Date
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
b48398c96a Correction to rev50582: LABEL could have a1 = 1.0f and in this case a2 would be used as alpha multiplier for icon 2012-09-14 16:41:00 +00:00
f6c7a69565 code cleanup: correct misleading use of LABEL button type. 2012-09-14 05:44:47 +00:00
b4df6b2819 code cleanup: changing the INT define to an enum conflicts with INT typedef on windows, use more verbose names for button pointer types. also removed some redundant flags from buttons. 2012-09-12 00:32:33 +00:00
319831d7b8 code cleanup: use an enum for uiBut->pointype (more useful debug display of members),
and rename COL -> COLOR --- less confusing since the layout engine has row/col's.
2012-09-11 23:10:23 +00:00
ed6215bff1 a-z menu input now works for enum popups. 2012-09-11 22:55:27 +00:00
ccaf475422 code cleanup: use typedef'd enum for block bounds types. 2012-09-10 07:03:30 +00:00
1a22503cba code cleanup:
use an enum typedef for button types. it was quite annoying debugging UI code since the defines are bit-shifted. GDB would show but->type as 13824 and blender define was (27 << 9).

Now but->type shows as a humanly readable names.
2012-09-10 06:05:19 +00:00
521c085af8 fix [#29072] Color pickers don't close properly when moving the mouse away
instead of checking if the mouse is over another button to exit the popup.
Just check if the mouse is outside the rect-union between the button and the popup.
2012-09-09 01:44:55 +00:00
aa2d84da37 style cleanup:
also remove some redundant conversions int -> short -> int
2012-09-09 00:00:21 +00:00
927b7ed303 Do not show %t to user on right click menu buttons which use "Name%t|...%x0|..." syntax 2012-09-04 17:09:40 +00:00
a71b160184 fix for building on msvc2008 (also style cleanup) 2012-09-04 01:23:50 +00:00
aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
95f7264014 code cleanup: split out defines in BKE_utildefines.h into BLO_blend_defs.h and ui defines in interface_intern.h 2012-09-03 10:12:25 +00:00
2ec75c3104 code cleanup: comments and some minor edits to interface code. 2012-08-25 20:49:51 +00:00
1939baa47d style cleanup 2012-08-22 16:44:32 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
26f073b327 macros for rectangle center and size 2012-08-20 15:29:02 +00:00
d36da8a8a1 style cleanup 2012-08-19 10:41:27 +00:00
ab662a1e02 fix for own commit r49991, this exposed bad logic in rect copy function. 2012-08-18 20:54:43 +00:00
a5b5f5d3fb code cleanup: use BLI rect functions for interface button and block code. 2012-08-18 18:11:51 +00:00
63f143a3cc use rctf struct for UI buttons and blocks, easier to read and means we can use BLI_rctf functions. 2012-08-18 16:53:46 +00:00
e32c60284a style cleanup 2012-07-29 00:20:28 +00:00
0c1ea14656 fix for crash when displaying the tooltip for a non python menu (was introduced with recent translation/ui edits) 2012-07-26 16:55:34 +00:00
2a98e83abd style cleanup 2012-07-21 16:21:42 +00:00
62a73381a7 use fabsf when using floats. 2012-07-21 15:27:40 +00:00
54c5edcfbb Fix crash on creating tooltip for sequencer's gl preview mode
Issue was caused by missed value for this enum, fixed by adding check
in tooltip generation.

Default value for this enum should also be fixed, but that would be
in separated commit.
2012-07-12 07:15:32 +00:00
0dafa97ea3 UI translation from inside Blender UI: first part.
This commit reshapes a bit runtime button info getter, by adding a new uiButGetStrInfo() which accepts a variable number of uiStringInfo parameters, and tries to fill them with the requested strings, for the given button (label, tip, context, RNA identifier, keymap, etc.). Currently used mostly by existing ui_tooltip_create(), and new UI_OT_edittranslation_init operator.

It also adds a few getters (to get RNA i18n context, and current language iso code).

Finally, it adds to C operators needed for the py ui_translation addon:
*UI_OT_edittranslation_init, which gathers requested data and launch the py operator.
*UI_OT_reloadtranslation, which forces a full reload of the whole UI translation (including rechecking the directory containing mo files).

For the first operator to work, it also adds a new user preferences path: i18n_branches_directory, to point to the /branch part of a bf-translation checkout.
2012-07-09 14:25:35 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
558721ab59 More spell checking. 2012-07-04 15:04:38 +00:00
468ef74ed7 More spell and typo fixes (mostly visualise->visualize, grey->gray, normalise->normalize). 2012-07-03 19:09:07 +00:00
2ab62ce126 code cleanup: defines with braces - end with '(void)0' so callers must end with ';' like normal function.
... without this some editors dont parse the source so well.
2012-05-27 12:21:13 +00:00
63788b47d6 add vector versions of hsv_to_rgb, rgb_to_hsv & rgb_to_hsv_compat 2012-05-26 11:01:01 +00:00
28002edb6b Finish changes in up/down arrows for menus
Restored single triangle for special menus, which still isn't perfect but
probably makes more sense.

Added drawflag bit flags to button, which is currently used to declare, that
button need to have up/down arrows. This is needed because it's tricky to
distinguish if button should have such arrows. For example, ID search buttons
is a simple block button which doesn't directly mean it'll have pop-up menu
and not all buttons which cases pop-up menu to display need to have such
arrows.

So currently only ID selector button is forcing up/down arrows to be displayed,
all the rest buttons now behaves in the same way as it used to be before.
2012-05-23 14:24:40 +00:00
81255ca8ce style cleanup: gpencil & metaball 2012-05-08 18:29:02 +00:00
5cd4b32b38 Fix for r46170.
* "but=but->next"  was there twice, once in the loop block and once at the end, caused Blender to crash on startup.

Please always compile and check it works before committing. :)
2012-05-01 21:39:52 +00:00
f4a82ab917 Logic brick connection highlighting on mouseover. Merged from candy branch. I hope it works - my first commit to trunk ^_^ 2012-05-01 21:02:04 +00:00
933b3166fc style cleanup: guys - set your editors to tabs! 2012-05-01 17:51:03 +00:00
343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
e03ebf7a41 code cleanup: replace (val >> 16) with macro RNA_SUBTYPE_UNIT_VALUE(val) 2012-04-10 09:03:45 +00:00
a6ebffe182 style cleanup: interface 2012-03-30 01:51:25 +00:00
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
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
2f348d8b5d style cleanup: mainly for mesh code, also some WM function use. 2012-03-24 02:51:46 +00:00
ccbed13343 Quiet warnings about unused functions and variables.
Commented or '#if 0' these functions/variables and marked with
'UNUSED' comment so they can be restored in the future if needed.
2012-03-19 22:21:40 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
2caa507b7e i18n stuff: adds translation_context to RNA structs (used for there ui name), and a first default "Operator" one for all operators' label.
The fact is, operators' label are nearly always verbs, while properties labels are nearly always nouns. So this should already solve many translations' problems regarding noun/verb confusion.

This commit also simplifies a bit i18n usage:
*Now IFACE_ and TIP_ macros (or there context versions, CTX_IFACE_/TIP_) are used nearly everywhere (with one exception, where code is a bit complex and needs to manually test whether ui/tip translations is allowed, so no need to redo it later through those macros).
*Also, those macros are now defined to NOP in case WITH_INTERNATIONAL is false, which avoid testing that define everywhere in code!
2012-03-16 15:39:25 +00:00
79d97ca509 style cleanup - spelling. 2012-03-08 04:12:11 +00:00
17786b3b3e building without python works again, cleanup bmesh include paths (cmake and scons). 2012-03-08 03:25:53 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00