Commit Graph

127773 Commits

Author SHA1 Message Date
Philipp Oeser
84b4b90e08 Fix #112208: Vertex parenting index wrong with multiple splines
Caused by 346023b457.

Above commit made variables too local (starting index with zero in each
nurb of the curve/surface object, but we need the "overall" index).

Should be good for LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/112222
2023-09-11 12:19:53 +02:00
Amelie Fondevilla
fc5b0ba19a GPv3: Set keyframe type
Update of the animation operator "set keyframe type" to take into account grease pencil keyframes.

Pull Request: https://projects.blender.org/blender/blender/pulls/111472
2023-09-11 11:58:57 +02:00
casey bianco-davis
5870ffa570 GPv3: Frame delete operator
This operator is a combination of the previous delete operator `frame` mode
and the `active_frames_delete_all` operator.

This also add the delete menu and key binds.
2023-09-11 11:37:16 +02:00
Damien Picard
8460aac59d I18n: translate drag and drop messages for sockets
The new node interface items can be dragged and dropped to change
their hierarchy. The messages indicating where an element is dropped
were extracted using N_(), but not actually translated.

This commit enables this translation using TIP_(). It also extracts a
missing message ("Insert into panel").

Pull Request: https://projects.blender.org/blender/blender/pulls/112108
2023-09-11 11:04:36 +02:00
Guillermo Venegas
fca8df9415 Fix #112087: Float curve flickers with aligned points at x axis
Sorting curve points only at x axis generates undefined
behavior if some points are aligned at x axis with qsort.

Pull Request: https://projects.blender.org/blender/blender/pulls/112205
2023-09-11 00:17:14 +02:00
Lukas Stockner
825cc14e74 Cleanup: Cycles: Remove unused argument 2023-09-10 18:58:43 +02:00
Lukas Stockner
e20f86547a Cycles: Fix compilation of the shader table precomputing tool 2023-09-10 18:58:43 +02:00
Harley Acheson
48b8c8f78f Fix #112129: Remove Blank Items from "Region Toggle" Pie Menu
Remove empty menu items from the lists used by WM_MT_region_toggle_pie.

Pull Request: https://projects.blender.org/blender/blender/pulls/112193
2023-09-10 18:26:24 +02:00
Iliya Katueshenock
3b44fd3655 Fix #112184: Adapt optimized case of Points of Curve node for domain
Fix mistake in 000e722c7d. If domain is not
the curve, then result should be adopted to domain.

Pull Request: https://projects.blender.org/blender/blender/pulls/112185
2023-09-09 19:16:10 +02:00
Richard Antalik
72d3d7f7f4 Fix errors in previous commit
Commit introduced build warning and crash due to not unbinding shader.
2023-09-09 17:22:03 +02:00
Richard Antalik
cba9f47562 Cleanup: VSE timeline drawing code
Deduplicate code, touch up some precondition, and minor improvements.
2023-09-09 17:15:56 +02:00
Richard Antalik
4d668e6825 Cleanup: refactor VSE timeline drawing code
- Use context variables for drawing functions.
- Move conditions to functions drawing specific elements as
  preconditions
- Disentangle calculation of common coordinates.
- Use more descriptive variable names (in context at least)

Individual drawing functions are mostly unchanged, so improvements there
are minimal.

No intended functional changes.
2023-09-09 15:54:33 +02:00
Jacques Lucke
dd515ebc1d Geometry Nodes: add Skip input to Simulation Output node
This adds a new Skip input to the Simulation Output node (design task: #112082).
It is a convenience feature that makes it easy to conditionally forward the
output of the Simulation Input node to the Simulation Output node, without the
need for potentially multiple Switch nodes. When Skip is enabled, the other inputs
of the Simulation Output node are not evaluated, i.e. the nodes in the simulation
zone are ignored.

The implementation adds this new functionality directly to the `LazyFunction`
of the Simulation Output node. It has new inputs that are linked directly
to the Simulation Input node, so that the simulation state can be forwarded.

Pull Request: https://projects.blender.org/blender/blender/pulls/112140
2023-09-09 09:53:01 +02:00
Miguel Pozo
967d49dba4 Cleanup: Formatting
Fix formatting after e5f6c57f8c
2023-09-08 21:35:13 +02:00
Miguel Pozo
e5f6c57f8c EEVEE-Next: Merge UBOs
Merge all the small UBOs used by the engine to save binding slots.
Each module is still responsible for filling its own data (by storing a
reference to it at construction) and this data is still private for other
modules.
The engine instance pushes the data to the GPU at the end of
`end_sync`, so only the modules that modify their data outside of the
sync functions need to manually call `Instance::push_uniform_data()`.

Pull Request: https://projects.blender.org/blender/blender/pulls/112046
2023-09-08 21:03:37 +02:00
Miguel Pozo
1faa522880 Fix: EEVEE-Next: Motion blur on image renders
overscan_changed is always true the first frame.
2023-09-08 20:29:29 +02:00
Harley Acheson
930dadd600 Fix #111831: Proper Highlighting of Inactive Buttons
Deal separately with menu states of Disabled and Inactive buttons,
since we want different hover highlighting for inactive.

Pull Request: https://projects.blender.org/blender/blender/pulls/112159
2023-09-08 19:42:47 +02:00
Weizhen Huang
063a9e8964 Fix: Cycles: inconsistent normal checks when sampling and evaluating BSDF
was mixing real geometry normal, smoothed geometry normal and
bump-mapped normal.
Use `(sd->type & PRIMITIVE_CURVE) ? sc->N : sd->Ng` consistently instead.
2023-09-08 19:00:01 +02:00
Julian Eisel
87aa34d801 UI: Let asset shelf header resizing affect the entire asset shelf
Users expect to be able to scale the uppermost edge of the asset shelf,
which actually belongs to the asset shelf header region only. So it
would only work to hide/unhide this. They expect this because they seem
like one region, but they are actually implemented as two (to have
separate layout and scrolling mostly).

This adds a region flag so that scaling a region can actually affect the
previous one instead. Something similar is already used for split
regions.

Part of #107881.
2023-09-08 17:51:58 +02:00
Leon Schittek
cc1c38f74d UI: Fix inconsistent menu background padding
Remove slight (2 pixels) extra padding at bottom of menus.

Pull Request: https://projects.blender.org/blender/blender/pulls/111826
2023-09-08 17:43:33 +02:00
Harley Acheson
e7f1647785 Fix #112081: Incorrect Toolbar Context Highlighting
More specific targeting of Tool item alternates list.

Pull Request: https://projects.blender.org/blender/blender/pulls/112153
2023-09-08 17:38:13 +02:00
Weizhen Huang
4c6164e292 Cleanup: fix typo in path guiding code 2023-09-08 17:17:12 +02:00
Weizhen Huang
1b7d41eba7 Cleanup: add TODOs in bsdf_microfacet.h 2023-09-08 16:53:26 +02:00
Weizhen Huang
f96b9db610 Cleanup: remove redundant fresnel_dielectric()
We already have two other functions doing very much the same thing.
`bsdf_microfacet_sample()` seems to be the only place where this
function was used; there we always sample visible normals, so the extra
`inside` check is not needed.
2023-09-08 16:53:12 +02:00
Weizhen Huang
21ca47d81f Cleanup: rearrange code in bsdf_microfacet.h for better readability
1. move early-out logic even earlier
2. reduced the scope of some variables
3. return `label` at the end of `bsdf_microfacet_sample()`. Return
`LABEL_NONE` in the invalid case. The previous distinction was
unnecessary because samples with zero contribution are assigned with
`LABEL_NONE` in `integrate_surface_bsdf_bssrdf_bounce()` anyway.
2023-09-08 16:52:59 +02:00
Weizhen Huang
bf82f9442c Cycles: remove defensive sampling in BSDF picking
the motivation was to give closures with low weight a higher pdf to pick
at the first bounce, in case the next interaction has high contribution.
However, there are several issues:

1. this is too much fine-tuned for a specific case, and only works well
when there is a strong contribution after reflection and very little
contribution after the transmission;
2. the logic in `bsdf_microfacet.h` was added when merging reflection
and refraction into a glass closure, since then it doesn't even work
well in the above case when mixed with other closures;
3. The behavior is inconsistent in `bsdf_microfacet_eval()` and
`bsdf_microfacet_sample()`;
4. such cases should be handled by more modern and more general methods
such as path guiding and denoiser;
5. it makes the code flow harder to follow

Delete this trick for now to pick the closures solely based on their
`sample_weight`. Can be added back (with proper fix in
`bsdf_microfacet`) if indeed necessary.
2023-09-08 16:52:42 +02:00
Julian Eisel
3589533908 Thumbnails: Always use cached thumbnails for offline files
bd9f94e917 made it so the file browser doesn't bring files online for
the purpuse of creating their thumbnail, because that can take a while.
Instead it uses a previously cached thumbnail if available. This should
be the behavior for all cases thumbnails are requested, it's not only
the file browser that does this.

In fact it makes sense to move this into the normal function to "manage"
thumbnails (that is, load and if necessary (re)create cached
thumbnails) since there are no currently known use-cases for
different behavior.

Also, seems like the previous solution didn't work when loading ID
previews from offline .blend files. For that we need to use the path to
the .blend file to check the offline status, not the full path to the ID.

Found while working on #109234 (Use UI preview system for async loading of
file/asset previews).

Pull Request: https://projects.blender.org/blender/blender/pulls/112101
2023-09-08 16:41:44 +02:00
Hans Goudey
98e33adac2 Mesh: Further optimize topology map creation
We need a separate array that we can change in during the parallel
group construction. That array tells where in each group the index
is added. Building this array is expensive, since construcing a new
`Array` fills its elements serially. There are two possible solutions:

1. Use a copy of the offsets to increment result indices directly
2. Rely on OS-optimized `calloc` instead of `malloc` and a copy/fill

Both depend on using `fetch_and_add` instead of `add_and_fetch`.

The vertex to corner and edge to corner map creation is optimized
by this commit, though the benefits will be useful elsewhere in the
future.

|          | Before  | 1. offsets copy | 2. calloc       |
| -------- | ------- | --------------- | --------------- |
| Grid 1m  | 3.1 ms  | 1.9 ms (1.63x)  | 1.8 ms (1.72x)  |
| Grid 16m | 51.8 ms | 33.3 ms (1.55x) | 32.7 ms (1.58x) |

This commit implements the calloc solution, since it's slightly faster
and simpler. In the future, `Array` could do this optimization itself
when it detects that its fill value is just zero bytes.

Pull Request: https://projects.blender.org/blender/blender/pulls/112065
2023-09-08 16:18:38 +02:00
Hans Goudey
be68db8ff9 Geometry Nodes: Show node group in modifier UI after duplication
When duplicating the node group from the geometry node editor, show the
data-block selector in the modifier interface. Otherwise it's not clear
that the modifier is using a local data-block, not the original asset.
2023-09-08 10:03:16 -04:00
Hans Goudey
6642bd6220 UI: Remove name property from node interface active panel UI
While it isn't "wrong" to have the name listed below too, In Blender
the name of an item is usually edited by double clicking inside
of list/tree views, and it's better to be consistent.
2023-09-08 10:03:16 -04:00
Hans Goudey
80b1d098a7 UI: Add a separator before modifier context menu geometry nodes items 2023-09-08 10:03:16 -04:00
Hans Goudey
75c57e924f UI: Rename Geometry Nodes "Show Node Group Selector" property
Skip "Selector" in the name. The fact that this influences the UI is
implied by "Show." That makes the "Selector" word redundant.
2023-09-08 10:03:16 -04:00
Sybren A. Stüvel
0ea79698ac Anim: Add bone.collections.clear() RNA function
Add the RNA function `bone.collections.clear()` to remove a bone from all
its collections.
2023-09-08 15:53:35 +02:00
Sybren A. Stüvel
9d65214d5b Anim: add notifier ND_BONE_COLLECTION for bone collection changes
Send nodifier `NC_OBJECT | ND_BONE_COLLECTION` on bone collection changes.
2023-09-08 15:53:35 +02:00
Xavier Hallade
7c9a02f138 Cycles: oneAPI: keep disabling use of copy engine with new compiler versions
Recent versions of DPC++ dropped using the environment variable
SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_IN_ORDER_QUEUE=0 we were setting.
We're now also setting SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE=0 by default
to keep a consistent behavior.
2023-09-08 15:51:51 +02:00
dshot92
162b2954a6 UI: Add "Open Recent" to File Context menu
Add "Open Recent" to the File Context menu (F4).

Pull Request: https://projects.blender.org/blender/blender/pulls/111701
2023-09-08 15:47:52 +02:00
Xavier Hallade
01931e213f Cycles: oneAPI: only export necessary symbols
The API for the kernels library is defined, there is no need to
export more than that. This change only affects linux since hidden
visiblity is the default on Windows.
2023-09-08 15:44:39 +02:00
Pablo Vazquez
754f2f9c80 UI: Use asset icon for "Mark Asset" in menus
Use the asset icon for the "Mark Asset" operator in menus.

Using icons is not only good for accessibility, but also to create
a connection with the Asset Browser and the icon shown in the
data-block template once marked as asset.

Pull Request: https://projects.blender.org/blender/blender/pulls/112111
2023-09-08 15:39:59 +02:00
Sergey Sharybin
4b217df080 Fix crash in Cycles when cancelling render during light tree building
The recursive building has an early output, which could leave the node
without the requested child initialized, causing the access to the left
child to crash later on in the builder function.

Simply add an extra is-canceled check to avoid access of possibly
non-initialized tree structure.

Pull Request: https://projects.blender.org/blender/blender/pulls/112132
2023-09-08 15:21:54 +02:00
Campbell Barton
4de525e757 Fix assertion unwrapping UV's on a mesh without UV's 2023-09-08 23:15:50 +10:00
Campbell Barton
52c4051d13 Cleanup: use doxy sections 2023-09-08 23:09:51 +10:00
Campbell Barton
2133ee141e WM: don't update key-maps when toggling "show_expanded"
Toggling show_expanded set the WM_KEYMAP_UPDATE_RECONFIGURE flag.
Disable this as it's only a display option in the UI.
2023-09-08 23:09:51 +10:00
Campbell Barton
d897fd34cb UV: restore internal solver state variable
Removed in [0] however I think it helps track the state,
so restore the state and assertions.

[0]: 8ace65e3c6
2023-09-08 23:09:51 +10:00
georgiy.m.markelov@gmail.com
cc2198254f Fix #111988: Hydra render crash if object doesn't have material
Appeared after f5472dcebc.

Pull Request: https://projects.blender.org/blender/blender/pulls/112128
2023-09-08 14:58:47 +02:00
Dalai Felinto
3b77e8315d Modifiers: Rename "Empty Modifier" to "Geometry Nodes"
Reasons to keep calling it Geometry Nodes:
* People can search for Geometry or Nodes and find it.
* It makes a connection with the editor called Geometry Nodes.

Interesting enough these were similar reasons to the original discussion
we had when Geometry Nodes first got added to Blender. Basically the
reasoning is still valid.

Counter-arguments:
* Over-time more and more modifiers will be geometry-nodes based, it
  could be seem as strange to single out one of them.
* Once we have different node-base systems that may also work as
  modifiers (e.g., collection modifiers?) we will need a more unified
  name.

The response to the latter is that once we get to this we will also
rename the editor. Until then we keep what is working.
2023-09-08 14:55:23 +02:00
Damien Picard
f64858896c I18n: fix the name of the Czech language
Like other languages, the way the Czech language was called in Czech
was incorrect: "Český is adjective, Čeština is noun".

Ref #105461

Pull Request: https://projects.blender.org/blender/blender/pulls/112130
2023-09-08 14:44:21 +02:00
Campbell Barton
468198a6df License header: add SPDX header 2023-09-08 22:33:32 +10:00
Campbell Barton
a4aa5adf44 Fix #110729: Unwrap angle based fails with seams
Regression [0] which merged index assignment into an earlier loop.
This caused the indices to be overwritten by p_chart_abf_solve
causing unwrap to fail.

[0]: 8ace65e3c6
2023-09-08 22:30:14 +10:00
Hans Goudey
006104645a Cleanup: Remove unnecessary struct keyword in C++ code 2023-09-08 08:27:28 -04:00
Hans Goudey
dcd0512eb1 Cleanup: Move sequencer_intern.hh to C++
See #103343
2023-09-08 08:27:28 -04:00