Color management refactoiring and some extra options
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 30 Jun 2012 12:37:16 +0000 (12:37 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 30 Jun 2012 12:37:16 +0000 (12:37 +0000)
commitb57a5521c4a6b1f27fdb2a122b2b31f4f7308950
treecd2567e14d645dc353a996cdd9eb001340a65620
parentdc40cb4fb0cca3428d511c30bcb331fdd4b9caf1
Color management refactoiring and some extra options

- Move space-being settings (such as view transform) into own
  DNA and RNA structure to avoid code duplication in some areas
  and save some arguments on display buffer acquiring function.

  Also added some utility functions to BKE to manipulate this
  settings.

- Replace static sized color managed buffer flags array with
  dynamically sized array which matches actual number of displays.

  Probably this flags better be transfposed so it'll support
  any number of view transforms and 32 displays (currently it's
  other way around). it's runtime flags only, so would be simple
  to change any time.

- Added support of configurable exposure and gamma.

  Changing this settings wouldn't generate new item in cache,
  it'll affect on buffer with the same color spaces conversion.

  It'll also run full color transform from scratch on every run,
  this could be changes in a way that it'll re-use color managed
  buffer, but from quick glance it doesn't give really noticeable
  boost.

  Currently this settings are stored as pointer in ImBuf structure
  itself. Probably it make sense removing them from ImBuf and make
  moviecache be able to store some kind of tags associated with
  cached ImBuf.
18 files changed:
intern/opencolorio/ocio_capi.cpp
intern/opencolorio/ocio_capi.h
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_node.py
source/blender/blenkernel/BKE_colortools.h
source/blender/blenkernel/intern/colortools.c
source/blender/editors/space_image/image_draw.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/space_node.c
source/blender/imbuf/IMB_colormanagement.h
source/blender/imbuf/IMB_imbuf_types.h
source/blender/imbuf/intern/allocimbuf.c
source/blender/imbuf/intern/colormanagement.c
source/blender/makesdna/DNA_color_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_space.c