Commit Graph

127517 Commits

Author SHA1 Message Date
Clément Foucault
2aebfb596e Cleanup: EEVEE-Next: Rename G1 to G1_V to avoid confusion 2023-09-03 16:42:53 +02:00
Clément Foucault
2637bbf016 EEVEE-Next: Add LUT test
This avoid the generation code to become desync with
the precomputed tabled.

This is also a good way to test any changes to them.
2023-09-03 16:42:53 +02:00
Clément Foucault
7b54fce723 EEVEE-Next: Port LUT generation code
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.
2023-09-03 16:42:53 +02:00
Jacques Lucke
7d2c854261 Geometry Nodes: generalize modifier simulation cache storage names
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
2023-09-03 16:14:11 +02:00
Jacques Lucke
7f00cfeab4 Cleanup: move bake items code to separate namespace 2023-09-03 13:37:50 +02:00
Campbell Barton
0c11542708 Cleanup: rename check_spelling_c_config to check_spelling_config
This is used for GLSL/Python sources too.
2023-09-03 21:36:04 +10:00
Campbell Barton
e8c812a307 Cleanup: spelling in comments, update dictionary 2023-09-03 21:35:07 +10:00
Campbell Barton
9af2291541 check_spelling: rename check_spelling_osl -> check_spelling_shaders
- 'make check_spelling_shaders' now checks MSL & GLSL spelling.
- Add '--match' argument to 'check_spelling.py' for more configurable
  checks without relying on picking directories that only contain the
  desired file-type.
- Ignore spelling for scripts/addons & scripts/addons_contrib.
2023-09-03 21:35:07 +10:00
Jacques Lucke
d1c2b45836 Geometry Nodes: rename bdata to blob
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
2023-09-03 12:33:59 +02:00
Campbell Barton
3082037743 Cleanup: spelling in comments 2023-09-03 16:15:01 +10:00
Campbell Barton
8ea2db5337 Cleanup: format, remove redundant trailing commas 2023-09-03 15:48:30 +10:00
Pratik Borhade
3d798e8486 Cleanup: Remove unused parameter
`relbase` is unsed after 1c0a1ae801
2023-09-03 10:22:20 +05:30
Clément Foucault
5ad7d81549 Cleanup: EEVEE-Next: Fix compilation warning and errors on Metal 2023-09-02 23:17:36 +02:00
Germano Cavalcante
7b0b2e4a5d Fix conditional logic in 'synced_selection' check
The conditional `(selected ? 0 : bm->totvert)` should be evaluated first.
2023-09-02 14:51:02 -03:00
Lukas Tönne
79a6a6977a Fix #111721: Node interface root panel flag missing
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
2023-09-02 15:58:19 +02:00
Lukas Tönne
5a7df8f587 Fix #111817: Use new interface API in move-to-nodes operator
This also now supports sockets that have been marked both input and
output.

Pull Request: https://projects.blender.org/blender/blender/pulls/111824
2023-09-02 14:08:45 +02:00
Lukas Tönne
7ddf1820ff Fix #111763: Incorrect string copy function for default_attribute_name
`default_attribute_name` is an allocated string, unlike most other strings in `bNodeSocket`.

Pull Request: https://projects.blender.org/blender/blender/pulls/111823
2023-09-02 14:07:54 +02:00
Bastien Montagne
2698dbd6a4 Also pass relevant filedata to versioning code in linking code.
Folloup to bfdfde18e1, forgot to add this for the linking/appending code
path (similar change to what was done for the main blendfile readfile code).
2023-09-02 12:55:25 +02:00
Philipp Oeser
b0d5f3dc22 Fix #111711: bone collection visibility cannot be overridden
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
2023-09-02 10:38:23 +02:00
Jacques Lucke
8cadeac18b Cleanup: fix node registration
This was broken in 15f5dfd45d.
2023-09-02 09:18:09 +02:00
Pratik Borhade
1c0a1ae801 Fix #109561: Overwrite existing imagepath based on relativepath property
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
2023-09-02 07:19:54 +02:00
Harley Acheson
a7ad0ad8fb UI: Theme Versioning for Enum Highlighting
Theme versioning to ListItem InnerSel required for highlighting
the selected Enum value from #111074.

Pull Request: https://projects.blender.org/blender/blender/pulls/111819
2023-09-02 05:33:13 +02:00
Hans Goudey
15f5dfd45d Nodes: Remove unused shader and compositor NodeItem definitions
Unused after:
- 577c0b4b46
- 9db4c0ca4b

See the geometry nodes commit for more background:
- 837144b457
2023-09-01 23:07:51 -04:00
Hans Goudey
78495acaa0 Fix: Crash dragging node interface panels at root level
Similar to 32ca4caaac
2023-09-01 23:07:51 -04:00
Hans Goudey
840769d855 Cleanup: Small C++ changes to two tree view uses
- 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.
2023-09-01 23:07:51 -04:00
Hans Goudey
da0c7ca0c2 Cleanup: Correct outdated tree view item comment 2023-09-01 23:07:51 -04:00
Harley Acheson
347e4692de UI: Minor Changes to Topbar Edit and File Menus
Minor reordering of items on the Edit and File Menus, and the addition
of "Release Notes" to the latter.

Pull Request: https://projects.blender.org/blender/blender/pulls/111814
2023-09-02 05:05:34 +02:00
Harley Acheson
afa71adbb1 UI: Improved Enum Title Determination
Show Enum titles if there is a non-blank label before on the same row.

Pull Request: https://projects.blender.org/blender/blender/pulls/111818
2023-09-02 05:03:56 +02:00
Vitor Boschi
f662d8acb0 PyAPI: Better error msg when re-using internal node id
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
2023-09-02 04:41:07 +02:00
Iliya Katueshenock
4b899588eb Fix: Vert to corner topology map assert for mesh with no faces
Fix of mistake from 226359ec48. `reverse_indices_in_groups` is
used in other one function (`build_vert_to_corner_indices`), so handling of
empty corners array should be moved into itself.

Pull Request: https://projects.blender.org/blender/blender/pulls/111815
2023-09-02 03:55:42 +02:00
Pablo Vazquez
de09bdb510 Cleanup: rename compositing to compositor in menu file
Also use lowercase for menu bl_idname, since there won't be any
conflict it's not needed.
2023-09-01 23:43:13 +02:00
Pablo Vazquez
f8dd297531 Cleanup: rename shading to shader in add menu file
Also use lowercase for menu bl_idname, since there won't be any
conflict it's not needed.
2023-09-01 23:36:34 +02:00
Pablo Vazquez
403b6a67f1 Fix: Duplicate Mix node in Add menu
"Mix" node was twice since the recent refactor, one as Mix Color and
regular Mix (which belongs in the Converter category).
2023-09-01 22:16:04 +02:00
Hans Goudey
fa34992def Cleanup: Remove unnecessary includes from C++ data structure headers
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
2023-09-01 21:37:11 +02:00
Harley Acheson
9f4b28bba8 UI: Highlight Selected Enum
Highlight the currently-selected item in enum, and some other, lists.

Pull Request: https://projects.blender.org/blender/blender/pulls/111074
2023-09-01 21:33:03 +02:00
Hans Goudey
e160a4ceca Fix: Memory leak with node interface forward compatibility
The runtime pointers are allocated when reading sockets,
they have to be freed when the legacy sockets are freed.
2023-09-01 15:30:19 -04:00
Hans Goudey
9fd4091f5b Fix: Incorrect assert in node tree interface copy
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.
2023-09-01 15:30:19 -04:00
Hans Goudey
32ca4caaac Fix: Various crashes and issues dragging node group interface
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.
2023-09-01 15:30:19 -04:00
Julian Eisel
781492fdb4 Refactor: Simplify outliner tree element creation using member function
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.
2023-09-01 20:59:53 +02:00
Pablo Vazquez
9db4c0ca4b Shading Nodes: Refactor Add menu
Refactor the Add menu in Shading nodes, with manually created menus,
inspired by Geometry Nodes and more recently the Compositor.

Minor sorting adjustments by splitting categories in groups, with
separators in between groups, and sorted alphabetically. Shading
node group assets are also populated in the menus.

This is the first part of the re-organization of the Add menu,
part of #111746

Pull Request: https://projects.blender.org/blender/blender/pulls/111798
2023-09-01 20:46:12 +02:00
Hans Goudey
b36367e663 Fix: Crash adding panel to node group
`move_to_parent` is called with a null parent by the Python code
that attempts to add new items to the active item if it's a panel.
2023-09-01 14:33:55 -04:00
Harley Acheson
8779f92e67 Cleanup: Make format
Just changes resulting from Make format.
2023-09-01 11:09:12 -07:00
Rawalanche
0e090369d6 Fix #109439: Use List Item widget colors for View Item widgets
As concluded in discussion under #109439, the View Item widgets are
supposed to use List Item widget theme colors. This patch does that.

Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/111584
2023-09-01 20:02:20 +02:00
Julian Eisel
0a633a4e07 Refactor: Untangle confusing & unsafe outliner tree element data passing
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.
2023-09-01 19:56:39 +02:00
Bastien Montagne
1bcd812a75 Fix (unreported) memory leak in Nodes versioning code.
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.
2023-09-01 19:31:39 +02:00
Bastien Montagne
bfdfde18e1 Fix invalid filedata passed to linked data for versioning.
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.
2023-09-01 18:03:10 +02:00
Bastien Montagne
e3a8cd3141 Cleanup: Readfile: simplify internal library_link_begin code.
For private, internal code, there is no reason to pass a pointer of
pointer to the filedata.
2023-09-01 18:03:10 +02:00
Hans Goudey
3766084bf9 Cleanup: Remove unused BMesh include 2023-09-01 11:59:49 -04:00
Miguel Pozo
619f38514e Fix: Compilation error after 7e33c405fb 2023-09-01 17:36:30 +02:00
Hans Goudey
2a28112bb8 Fix #111698: Sculpt draws unchanged normals on first stroke
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.
2023-09-01 11:29:19 -04:00