This ports the LUT using compute shader.
All LUT are computed by the same compute shader
to avoid boiler plate code to add new LUTs.
As for the generation code itself it is mostly the
same except for the use of `hammersley_2d` instead of
regular grid sampling. Regular grid did not improve
anything and was a bit more cumbersome.
This also bumps the number of samples very high
for more precision.
The new utility class for computing the LUT has
methods to write the content to a PFM image file
or as C++ array header.
The main goal here is to rename things in a way that makes sense for
simulation baking, but also for the upcoming bake node.
This also removes some versioning code from 3.6 which initialized the
default bake path. Baked data from back then can't be loaded anymore
anyway, and the way the default path is generated is different now as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/111845
Blob stands for "binary large object" and is a known term. I used to use the term `bdata`
to mean "binary data", mainly because I didn't think of a better name. Blob is a much
better name as it captures the intend of those files much better.
This change breaks existing bakes, because I rename the folder from `bdata` to `blobs`.
I think that is ok, because I also just broke bakes two days ago in a larger refactor
(e92c59bc9b).
Pull Request: https://projects.blender.org/blender/blender/pulls/111822
The file in question does not have the default (internal) root panel
flag for allowing child panels. This was probably saved before the flag
was added. A simple versioning snippet takes care of this case.
Pull Request: https://projects.blender.org/blender/blender/pulls/111828
Since the switch from bone layers to bone collections in
998136f7a7, visibility could not be
overridden anymore. Moreso, layer visibility could also be toggled even in linked
state in 3.6 [those changes get lost on file reload, but it was still
useful and expected behavior].
Both are now restored.
Pull Request: https://projects.blender.org/blender/blender/pulls/111775
Update the filepath of an image when it already exists in the main
storage. This is useful when `relative_path` property is changed and we
attempt to open the same image file again.
Also remove `is_relative_path` parameter. Not required anymore because
`range->filepath` is correctly set to absolute/relative. This is also
passed in `BKE_image_load_exists_ex` to set path to non-exiting image.
Pull Request: https://projects.blender.org/blender/blender/pulls/109815
- Use `this->` to access class methods.
- Follow style guide for class definition order.
- Avoid unnecessary namespace redefinition.
- Make data struct local to node interface file.
Give a better error message when the user tries to register a node
having the same id as an internal one.
Before:
`RuntimeError: Error: Registering node class: 'NodeDummy', bl_idname 'NodeGroupInput' could not be unregistered`
After:
`RuntimeError: Error: Registering node class: 'NodeDummy', bl_idname 'NodeGroupInput' is an internal node`
This is a followup to #111615
Authored-By: @vitorboschi (Vitor Boschi)
Pull Request: https://projects.blender.org/blender/blender/pulls/111799
The hash tables and vector blenlib headers were pulling many more
headers than they actually need, including the C base math header,
our C string API header, and the StringRef header. All of this
potentially slows down compilation and polutes autocomplete
with unrelated information.
Also remove the `ListBase` constructor for `Vector`. It wasn't used
much, and making it easy to use `ListBase` isn't worth it for the
same reasons mentioned above.
It turns out a lot of files depended on indirect includes of
`BLI_string.h` and `BLI_listbase.h`, so those are fixed here.
Pull Request: https://projects.blender.org/blender/blender/pulls/111801
Panels could have parents if the parent was the root panel.
Anyway, the assert isn't really helpful here, better to keep that
just for higher level editing functions.
Mostly the issues were because drag and drop moving to a different
index in the parent didn't take into account the root panel. Also add
a null check for safety similar to b36367e663.
With this, display modes and tree elements can add an element through
the tree-display object used for building the tree for this display
mode. This means we no longer have to pass the `SpaceOutliner` object
around, and we avoid boilerplate. Further such simplifications to the
tree element creations are planned and are easier now.
Also note that this centralizes the use of `SpaceOutliner`, so we can
more easily make tree-display and tree-element objects independent from
it. This could be useful for unit testing, for example.
The outliner tree element creation function passed a `void *idv`
argument and did weird and hard to follow stuff with it (like casting it
to `ID *` even though it wouldn't point to an ID, and further overriding
it based on the element type). This change tries to untangle this, so
that it's easy to follow what's going on, and so that a bunch of casts
from non-ID data to ID pointers are removed.
Basically the void pointer is split into an ID pointer for the owning ID
(if any) and a void pointer for custom data for the element creation.
This can be made type safe still, but that's for another commit. It also
allows us to remove some wrapper structs. The element creation function
itself no longer needs to know what kind of data is passed via the void
pointer. So this change has a number of benefits in fact.
Also improves/adds related comments.
Was quite careful to not cause behavioral changes.
Commit e071288ab2 do_version code was copying an allocated string from
old to new socket data, but not freeing it in the old data properly.
String can actually be moved directly from old to new data, instead of
duplicating it.
Code would not keep filedata for read libraries long enough to be able
to pass along to the 'after_liblink' versioning code. Instead, it was
passing the main file data, leading to all kind of potential breakage in
versioning code, e.g. in case of checks on available DNA data.
Fix#111776.
When entering sculpt mode, the normals cache is shared with the
evaluated mesh. `SharedCache::ensure()` un-shares the cache in order
to update it, so the pointers in the pbvh must be reset.
Fix render regions and make them work with overscan:
- Clarify and improve the naming used by the Film module.
- Convert Display texel coordinates to Film texel coordinates before
calling `film_process_data`, and convert from Film texel coordinates to
Render texel coordinates in `film_sample_get`.
- Returns the actual display extent (and not the film extent) in
`Film::display_extent_get` so the overscan camera matrix is computed
correctly when using render regions.
Regression caused by 567a2e5a6f.
Pull Request: https://projects.blender.org/blender/blender/pulls/111691
A small reduction in the vertical space used by the menu separating
rule. Also centers the line within its space. Looks more balanced when
used between titles and content.
Pull Request: https://projects.blender.org/blender/blender/pulls/111764
Add a set of symbols to improve visualization of different snap types.
- Circle: Represents snapping to a vertex.
- Two Aligned Lines: Represent snapping to an edge.
- Closed Aligned Square: Represents snapping to a specific part of an edge (center or perpendicular).
- Face-Aligned Circle with Midline: Represents snapping to a face.
Pull Request: https://projects.blender.org/blender/blender/pulls/109387
7d54a756b9 did with only loose verties participating in the snap.
However, edges with a transformed vertices are ignored as well.
So some vertices may end up not participating in the snap.
Therefore, add then the vertices whose connected edge is being
transformed.
Also bump the recorded minimum 3.6 subversion for opening files, to
correspond to a fix in the 3.6 branch that prevents bones from seemingly
disappearing when opening files with 4.x bone collections.
Library overrides crashed with on trying to access the interface root
panel. The root panel should not be exposed through RNA, but also
accessing its position property should be allowed.
Several fixes here:
- Fix position property getter when the item has no parent panel
(i.e. the root panel).
- Avoid infinite loops in the greedy override comparison: exclude the
loopback parent property.
- Don't return the root panel via the parent property in the first
place, just return nullptr.
Second attempt at fix, first one in #111755 broke the
bl_node_group_interface test due to incorrect handling of the nullptr
parent case (reverted by 68440742)
Pull Request: https://projects.blender.org/blender/blender/pulls/111782
For operators that allow overshoot it is important that the cursor wraps,
so the user is not limited by the bounds of the screen.
This was missed on a few of the latest additions.
Pull Request: https://projects.blender.org/blender/blender/pulls/111785
`BKE_simulation_state_serialize.hh` is not necessary anymore,
because the serialization is done at a lower level.
The functionality that lived there in the past is now part of
`BKE_bake_items_serialize.hh`.