- Some of TODO notes were laying around but they in fact
were resolved a while ago, removed this notes form the code.
- De-duplicate input color space settings drawing in clip and
image spaces. Moved this stuff to a template which could also
be used in Python.
- Replace py-defined view transform settings panel with a
C-defined template as well. Use it in space panels and
image format settings.
- Remove display settings from color management settings
panels used by different spaces. Use window settings
instead.
This adds a user-defined input color space name for image and
movie clip data blocks. Support for this thing for other data
blocks is still a TODO.
Input color space is being used on loading file to convert
loaded image buffer from this space to scene linear space,
later this space is never used in a pipeline.
Color space name was wrapped into own structure like it's
done for display and view settings. This helps keep code
de-duplicated in RNA and it'll help when likely more options
are added into input color space settings (i.e. flag whether
image could be color managed or it's a non-color data).
This implied quite of internal refactoring:
- Made routines around threaded display buffer calculation
more general, so any kind of color transform could be
performed using the same technique.
- Added function to convert given float buffer from given
input color space to output color space. This is a public
function which could be used in such a things as compositor
node.
- Added function to convert ImBuf's content to scene linear
space. Currently used only for images and clips. Should be
added to any image/movie-related data blocks such as
sequencer strips, but that a bit more long-term plan.
- If input color space is set to NONE then no buffer transform
would be performed on image loading. It'll behave in the same
way as using scene linear as input space.
This adds color management controls to the sequencer space,
which are applying on the displaying image.
Currently used the same UI approach as was used for other
areas, but this would probably be cleaned up in the nearest
future.
This required a bit of hackish stuff to be done, Namely color
management for the sequencer requires one extra step in the
conversion chain to convert sRGB float buffer to linear space.
This was made by setting special flag in ImBuf. Later this
could be done using input color space for the ImBuf probably.
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.
1. first pass only fast nodes are calculated and only to the active
viewer node
2. second pass all nodes to all outputs
Temp disabled highlights because of random crashes.
* Elbeem exporter code now overrides user settings to No Slip in case the object is animated;
* UI of fluid obstacles now disables slip settings when export animated is enabled;
* Added in this later option's tooltip a mention that it enforces No Slip!
- Move color management display settings into own structure like it's
done for view settings.
This is helpful from two sides:
* It is planned to support display calibration settings which
should be taken into account by color management stuff to
add needed transformations to OCIO processor.
* File saving should be able to make the same display
transformations as it's done by window when displaying the image.
Having own DNA and RNA structures for display device settings
helps avoiding having duplicated code.
- Small refactor of cacheing functions which are now accepts
cache-like versions of view and display settings. This structures
used for cache are quite the same as DNA structures but they contains
indices of view and display which avoids extra lookup for this
things.
This also helps having reasonable amount of variables passing
to cache functions.
- De-duplicate code used by color management panel drawing,
moved this panel to utility file in bl_ui
- Added support of per-window color management control
which means view transform. exposure and gamma could be
set per window and all spaces would use this settings.
This is default behavior for older files now.
- Added support of color management display of movie clips
in clip editor.
Supported both texture buffer and fallback draw methods.
- Fixed default values for exposure and gamma
- 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.
- Made color management cache safe for situations when one area
requested a display buffer, then some changes were done which
invalidated cache, other area requested display buffer which
changed cached buffer.
Suck case could be fatal for first used of display buffer,
which didn't happen yet because cache is being accessed from
main thread only, but better to keep this things completely
thread save to avoid headache in the future.
- Baked RRT transformations, which gives ~3-4 times boost
hopefully without visible artifacts.
- Added support of partial updates to display buffers.
This would create special context which hols display buffer
which imbuf had to the time of creating this context and
later this context would allow to run a color correction
from given linear buffer within given region.
This is being used by compositor to enable more realtime
display update when compositing.
- Added support of color management backdrop for nodes editor.
There's now special menu called display properties in N-panel
of nodes editor.
Probably this better be de-duplicated somehow, but not sure
yet how. Currently it's not so harmful to have panel for two
spaces which contains only 2 properties.
There's currently one unsolved issue with backdrop:
it's not being updated progressively when just loading the
file -- it's simply because there's no color managed display
buffer for backdrop yet, and compositor doesn't actually
know which color space to use here to generate preview to.
The transform operators in nodes will now use the unselected nodes to generate snapping points. Unlike object snapping, node snapping works for the x/y axes separately and snaps node borders to same borders of unselected nodes. The sensitive area for node borders extends over the whole view2D range, to enable simple alignment of nodes in both x and y direction.
For snap points in the node editor an additional enum value is stored to indicate the type of node border (left/right/top/bottom). This works as a constraint on possible node alignments: only same border types align with each other.
The tool works OK, except it was messing vertices' order of polys, often giving ugly results! Now only using sorted list of vertices indices to find matching polys.
Snapping actually was working already, but grid spacing was set to 1.0, which is basically pixel size in the node editor. Increased this to 1x grid step for fine snapping and 5x grid step for rough snapping.
Grid drawing in node editor now draws 2 levels in slightly different shades to indicate the different snapping modes better.
Node editor also supports the general use_snap tool setting to enable automatic snapping during transform. For now only the incremental snapping is supported, in future could be extended to enable alignment between nodes in a number of ways.
- Cleaned up some files -- seems there were some wrongly resolved
conflicts which resulted into duplicated code in space_image.py
and some build configuration files.
- Store all color space related data (such as display device, view
transform and so) as strings, so it could easily be ported to new
OCIO configuration files and it'll be much more portable between
different configurations.
This required adding some look-ups to RNA associated with such
settings, but it's indeed the only way to do this. If it'll be
figured out such look-ups causes performance issues it's possible
to optimize this further using hash. So far it's only few elements
in list to be looked up.
- Added support of display device transformation from OCIO
configuration files. Display device is setting per-window and
different windows could have different display devices, so it's
possible to have one blender window opened on sRGB monitor and
another one on xyz projector.
Display device is ignored when using ACES ODT Tonecurve view
transform due to it's not an OCIO transformation. Probably it'll
be possible to get rid of this tone curve soon (if it'll be
proved useless or it'll be implemented as a part of OCIO LUT).
- Movie Cache now supports deleter functions for user keys, so
such keys could have some allocated data which would be removed
as soon as element in cache is being removed.
- Movie Cache now support callbacks to check whether current
cache element could be removed from a cache due to it wouldn't
be accessed anymore.
- Re-written cache stuff for display buffers of ImBuf. Now it's
using Movie Cache which is global for all ImBufs.
Probably it's not implemented in fastest way, would be investigated
further and probably changed it performance wouldn't be good enough.