OpenVDB is compiled with Blosc support, meaning we should pass Blosc to
a linker now.
Unfortunately, the Blosc has compiled-in crt and pthread library, which
still screws up linking.
Took me some time to figure out what was going on here... Was again that delayed button
callback stuff (`ui_apply_but_funcs_after()`), first calling button op, and then
its callback func.
Issue was that 'open file' op (through call to `WM_file_read()`) would clear
the splash screen (as more or less the entire 'dynamic' UI), but callback func of that splash
(`wm_block_splash_refreshmenu()`) would still try to access that freed menu's region.
So, root of the issue seems to be that setting context's wm/win/etc. would not clear
context's menu pointer (while clearing all other 'sub' pointers). I could not find
nor imagine any case where this behavior could be desired, so simply added nullification
of that pointer when setting context's wm/win/etc.
Note that crash was due to read-after-free, infuriating debug builds with asan,
but seems like release builds never actually crashed on it.
The issue was happening when having unconnected point density which
will cache data but will not free it because there's no actual call
to the actual sampling.
Now the idea is to make sure cache is zeroed on file load and undo
and then caching via RNA will free the data if any exists. This could
leave us with a single copy of cache in the node if it's not used,
but it's quite small amount of memory and it's not leaking.
This will respect the official build configuration where we should
have BLOSC enabled.
We can't really detect if OpenVDB was compiled with BLOSC or not,
so seems we can't really avoid this extra flag.
Mainly it's related on a bad practice in SDL to force-define __SSE__
and __SSE2__ flags which generates quite some warnings and causes too
much noise.
There are some other warnings fixed. Should be no functional changes.
NeXyon, please check the changes in audaspace :)
Displaying a button would clamp the value if the button was outside the range.
This could be OK in some cases,
however it's problematic with object dimensions which would re-scale objects on showing the panel.
Add `ui_but_update_edited` when its OK to modify the value.
Without this, grabbing with normal weight will continually select new normals
based on where you move the cursor,
causing the normal location to flicker in a way which isn't controllable in any useful way.
Also re-reported through IRC by Thomas Beck (@plasmasolutions), thanks.
Though it's not ideal in theory, we have quite poor handling of object datablock currently
from user PoV - before this commit, it was not easily possible to get fully rid of an object
anymore if you did not removed it from all its groups before deleting it.
So for now, restore 2.76 behavior (namely, unlink an object from avaerything in Blender
once it is no more used by any scene).
Better handling of all this is TODO for later (also related to much more heavy changes
done in id-remap branch regarding sanitizing our ID deletion process).
Avoid allocating the (tiny) array on the heap in the first place.
Reviewers: sergey, lukastoenne
Differential Revision: https://developer.blender.org/D1815
This re-enables the AA jittering, but with proper clamping so that u >= 0,
v >= 0 and u+v <= 1.
Differential Revision: https://developer.blender.org/D1254