This commit makes BKE_image_acquire_ibuf referencing result, which means once
some area requested for image buffer, it'll be guaranteed this buffer wouldn't
be freed by image signal.
To de-reference buffer BKE_image_release_ibuf should now always be used.
To make referencing working correct we can not rely on result of
image_get_ibuf_threadsafe called outside from thread lock. This is so because
we need to guarantee getting image buffer from list of loaded buffers and it's
referencing happens atomic. Without lock here it is possible that between call
of image_get_ibuf_threadsafe and referencing the buffer IMA_SIGNAL_FREE would
be called. Image signal handling too is blocking now to prevent such a
situation.
Threads are locking by spinlock, which are faster than mutexes. There were some
slowdown reports in the past about render slowdown when using OSX on Xeon CPU.
It shouldn't happen with spin locks, but more tests on different hardware would
be really welcome. So far can not see speed regressions on own computers.
This commit also removes BKE_image_get_ibuf, because it was not so intuitive
when get_ibuf and acquire_ibuf should be used.
Thanks to Ton and Brecht for discussion/review :)
As it turned out, the node space was the only place we have the option to sample the backdrop buffer RGB, but not the zed.
This code is copied from image space.
Now one can use the viewer node and sample the depth while looking at the color buffer (so Map Range Node works even better)
Patch written during BlenderPRO 2012, Brasília ;)
(reviewed by Lukas Toenne)
this node allows for more control for normalization of the mapped input range.
Made during BlenderPRO 2012 - Brasilia, Brazil :)
Idea and testing: Daniel Salazar
Implementation: yours truly
Reviewed by Lukas Toenne and Sergey Sharybin
When blending shape key, opening the popup didnt execute anything - making it so pressing a button would update the result even if the value didnt change.
- no need to copy the UV vectors, just point to them.
- calculate the midpoint once and copy rather then mid_v2_v2v2() on each UV.
- reduce the number of comparisons by only checking the remaining uv's in the nested loop.
The new node that outputs multilayer was using longer names than default.
Caused old code that truncated pass names to 11 chars to fail on loading exr.
This was an old limit in openexr - but that got fixed long ago.
On todo: check current openexr name lenghts, and all code in Blender that
defines pass/layer names.
Recoded the move-to-layer popup to wait for execution of operator until you
press Enter or OK button.
That excludes undo/redo, which makes it faster for many too.
(note the menu is all hotkey driven, so it's MKEY, <number>, Enter)
Also fixed: missing MEM_free in this popup type.
There was incorrect formula applied on color components, used the same
as gimp uses. It makes image looking nicer in blender, however it's
still not 100% correct. Seems lots of software are handling profiles
from jpeg file nicely. But that's another topic.
Histogram in Blender was nearly useless - it just didnt work, showed
confusing blank results.
Two reasons for it:
- It was including Alpha in the weighted total value
(RGB images have alpha 255 for all pixels)
- It was counting the a total weight value max(R, G, B, A), instead of
using max(R) and max(G) etc.
Now it all draws much nicer - similar to Da Gimp! :)
Crash would have been happen when changing render ending at the same time
rendering happens. It could be final Cycles render or even preview LUX render.
If this is needed we can add the reset button back as an option for certain operators,
but AFAICS any operator with enough settings that resetting them all would be annoying - could have presets enabled.
Conversion from 2.49 and older files: support for unlimited materials on
objects had an error in conversion.
Effect was that you couldn't re-assign material slots a Material, in case
you were using "link to object" option.