Commit Graph

104182 Commits

Author SHA1 Message Date
Dalai Felinto
91124fcff6 Fix #114015: Search filter removes panel header checkboxes
Caused by 1eb90ee519.

Co-authored by: Hans Goudey <hans@blender.org>
2023-10-24 16:08:21 +02:00
Sergey Sharybin
92a19747f0 Sculpt: Add timing information for BMesh PBVH
The goal is to make it possible to have more or less reliable way
to perform performance comparisons of changes in algorithms used
in dynamic topology.

This change allows to run Blender with the following arguments:

  blender --log "sculpt.detail,pbvh.bmesh" --log-level 2

and see timing of dynamic topology flood-fill operation, as well as
individual timings of edge subdivision/collapsing.

Pull Request: https://projects.blender.org/blender/blender/pulls/114099
2023-10-24 14:37:54 +02:00
Campbell Barton
15692501b2 Merge branch 'blender-v4.0-release' 2023-10-24 23:35:15 +11:00
Campbell Barton
0f36ac4e66 Revert "Fix #112441: Restore Key Map Item does not restore the active property"
This reverts commit bb39f4fa41.
2023-10-24 23:35:06 +11:00
Campbell Barton
cdbde7d941 Fix #113603: User modified key-map preferences for add-ons don't load
Regression from [0] where the key-map was attempting to load preferences
for key-map items for add-on operators which were not yet defined.
Resolve by postponing keymap updating until after loading add-ons.

[0]: 6de294a191
2023-10-24 23:32:16 +11:00
Jacques Lucke
bef2155baa Merge branch 'blender-v4.0-release' 2023-10-24 14:05:33 +02:00
Jacques Lucke
e4ad58114b Nodes: support looking up node sockets by identifier and name
The main goal of this patch is to turn `node.inputs[...]` and `node.outputs[...]` into
the main way to lookup sockets on a node. Currently, it's used for that sometimes,
but often it is not, because it does not work in all cases. More specifically, it does
 not work when a node has multiple sockets with the same name but different
identifiers, which is relatively common.

This patch proposes to make the string lookup more convenient, more useful and
less prone to breaking after changes in Blender.

This is achieved by changing how the lookup works:
* First, it tries to find an available socket with an identifier that matches the given
  key. This is checked first, it makes sure that every socket can be accessed by its
  identifier. The identifier matching is currently disabled in some nodes where we
  want to change identifiers soonish.
* If that didn't work, it tries to find an available socket with a matching name. This
  is often convenient because it generally matches what can be seen in the UI.
  Furthermore, it's also necessary to avoid breakage with old usages of this lookup
  function.
* If both options above didn't work, it checks whether the given key matches any
  socket name/identifier that the node used to have in the past, but has been
  renamed for whatever reason. This mainly exists to avoid breaking scripts by certain
  kinds of changes in the future. This is not included in this patch.

Note, previously, string lookup would also find unavailable sockets. This is disabled
now, because the way we handle unavailable sockets internally is likely to change.
Therefor, any use of unavailable sockets might break (unavailable != hidden). For
the time being, it's still possible to find unavailable sockets by iterating over all sockets.

This change has a small chance to break existing scripts because the behavior
changes for some inputs in some nodes. However, for the cases where the function
is used in practice, I don't really expect any breakage.

This patch also allows us to give a better answer to reports like #113106.

Pull Request: https://projects.blender.org/blender/blender/pulls/113984
2023-10-24 14:04:18 +02:00
Jeroen Bakker
b0b46b1c59 EEVEE-Next: Fix Updating Reflection Probes
Due to missing logic reflection probe updates where not always
performed. There were multiple artifacts:

* Lookdev Worlds where Black Until the Scene world was rendered.
  Issue was that the lookdev world didn't initialized its atlas
  coordinates.
* Lookdev world should only retrigger reflection probe update when
  material is compiled
* When world is updated, reflection probes should be updated; this
  might require a redraw when reflection probe draw passes aren't
  updated this sample.

Pull Request: https://projects.blender.org/blender/blender/pulls/114064
2023-10-24 13:43:10 +02:00
Philipp Oeser
4ce55752ae Merge branch 'blender-v4.0-release' 2023-10-24 13:14:19 +02:00
Philipp Oeser
a48d4184b5 Fix #114094: Mask by Color brush has stopped working
Caused by 97f2b01ea9.

Above commit refactored code in a way that it was always early out
(always comparing the current mask value to itself and not the new mask
value).

Pull Request: https://projects.blender.org/blender/blender/pulls/114101
2023-10-24 13:11:27 +02:00
Hans Goudey
f2627a55ee Fix #114053: Sculpt visibility broken after undo
Caused by 3e81f66998, The `BLI_BITMAP_TEST` macro
is very flexible and seems to compile with `BitVector` as well.
2023-10-24 12:31:15 +02:00
Julian Eisel
7654898c18 Fix compile error on GCC
Was getting a compile error after 7afa5aaa59.
2023-10-24 12:07:17 +02:00
Julian Eisel
489d07de69 Fix memory leak when renaming node group sockets/panels
Steps to reproduce:
- Download .blend from #114059
- Edit name of socket or panel in the node interface tree view
- Close Blender

Pull Request: https://projects.blender.org/blender/blender/pulls/114083
2023-10-24 11:48:08 +02:00
Sergey Sharybin
7afa5aaa59 BLI: Add std::string variant of BLI_uniquename_cb
Allows to ensure unique name for cases when name is a dynamically
sized string.

Pull Request: https://projects.blender.org/blender/blender/pulls/114052
2023-10-24 11:35:52 +02:00
Hans Goudey
7ba92a2a2f Fix #114081: Auto smooth versioning node group missing UI data
Fix the missing min and max and correc the interface socket's subtype.
2023-10-24 11:28:10 +02:00
Philipp Oeser
e219cddae5 Merge branch 'blender-v4.0-release' 2023-10-24 10:41:08 +02:00
Philipp Oeser
dcdafaa9f5 Fix #114082: Disabling Geometry Nodes is_tool also disables is_modifier
fd9d22ba57 introduced `GeometryNodeAssetTraitFlag` (at that time
`GEO_NODE_ASSET_POINT_CLOUD` was the max enum value), then 6da4b87661
added `GEO_NODE_ASSET_MODIFIER` (but the max enum value was not changed
accordingly).

Pull Request: https://projects.blender.org/blender/blender/pulls/114092
2023-10-24 10:40:28 +02:00
Christoph Lendenfeld
265858525e Refactor: ANIM_setting_get_rna_values to return a Vector
No functional changes.

Changing old C code to C++ by returning a `Vector` from `ANIM_setting_get_rna_values`.
This reduces the argument count for that function and simplifies the code.

Pull Request: https://projects.blender.org/blender/blender/pulls/113931
2023-10-24 09:01:38 +02:00
Jesse Yurkovich
125776e660 Merge branch 'blender-v4.0-release' 2023-10-23 21:51:27 -07:00
Jesse Yurkovich
10eb1ac8e4 Fix #111442: Correctly handle 1-channel image formats during save
It's possible to encounter a true 1-channel image if it's coming
directly from, say, a float-value AOV or similar.

This was not accounted for and would cause issues when saving the image
out to a 3 or 4 channel format (wrong values) or when saving out to
another 1 channel format (unnecessary usage of luminance weight values).

Pull Request: https://projects.blender.org/blender/blender/pulls/111577
2023-10-24 06:50:13 +02:00
Richard Antalik
d9f66a78f7 Merge branch 'blender-v4.0-release' 2023-10-24 05:07:23 +02:00
Richard Antalik
dadbb5c5f7 Fix VSE retiming last key position incorrect
Last key is drawn on the right edge of the strip, but that is end of
the frame, which it should be bound to. Because of this, drawing code
and operators must consider, that this key is always displaced.

This was not done in 86a0d0015a and caused issues like #113755 that was
fixed incorrectly.
2023-10-24 04:57:00 +02:00
Richard Antalik
79b1eacba9 Fix #113890: Buffer overread when rendering after strip content range
Caused by incorrect frame index clamping in `SEQ_give_frame_index()`.
2023-10-24 04:37:34 +02:00
Campbell Barton
515d25fbed Unbreak build from missing header 2023-10-24 09:43:41 +11:00
Jesse Yurkovich
abb6e9471f Fix #113993: Bevel cutoff intersection type crash
Own mistake in d47ceb53f8

The old calls to `BLI_array_staticdeclare` were deceptive. Because no
appends were done after declaration, to actually use the array, the
variables remained null. Effectively `nullptr` was always being passed
in here.

Pull Request: https://projects.blender.org/blender/blender/pulls/114049
2023-10-24 00:29:46 +02:00
Jacques Lucke
7254caa267 Merge branch 'blender-v4.0-release' 2023-10-23 21:29:25 +02:00
Jacques Lucke
312d8b1d66 Fix #114041: freeze connecting capture attribute to repeat output node
The issue was that a node was supposed to propagate an anonymous
attribute that is only created further to the right in the tree. This does not
during inferencing, where uses of fields can only come to the right of its
creation. Note, all fields coming out of the repeat input/output node are
new field sources during inferencing.

Now, only field sources that are passed from the outside into the repeat zone
can be propagated from the repeat output to the repeat input node.

Solving this also showed another issue where anonymous attributes are
not properly propagated through a repeat zone where there is no link between
the repeat input and output node. In such cases, data is still propagated between
those two nodes when the number of iterations is zero.
2023-10-23 21:29:00 +02:00
Julian Eisel
ee1be3c9bb Merge branch 'blender-v4.0-release' 2023-10-23 21:23:26 +02:00
Julian Eisel
009c4b819c Fix #114055: Tree item collapse icon doesn't respond to multiple clicks
The way we handled activation of view item buttons (which are placed
underneath other buttons) would leave that button in an active state,
giving it priority on the next event handler run. Instead we want to
cleanly exit the button after activation, so that the overlapped chevron
icon can be recognized as hovered again.

Also limit this to mouse press events, since otherwise the tree view
item would toggle the collapsed state on both the press and the release
event.
2023-10-23 21:19:05 +02:00
Falk David
ddd4c2ae76 Fix: GPv3: Crash when drawing
This should fix one of the remaining crashes while drawing.
The issue was that we would try to write to an out-of-bounds
memory location.

This fixes the issue and also cleans up the code a bit more,
adding more comments and using better names.
2023-10-23 19:41:49 +02:00
Falk David
e1c3a00103 GPv3: Draw strokes relative to the object origin
The drawing plane was at the world origin not the object origin.
This still needs to use the correct drawing plane in the future,
but it's a good step in the right direction.
2023-10-23 19:41:49 +02:00
Falk David
a945d938e3 Cleanup: Rename static function
Renames `calculate_mean` to `arithmetic_mean`.
2023-10-23 19:41:49 +02:00
Julian Eisel
5fab6700cd Cleanup: Move 3D View context functions to own file
Such context functions are often separated out to a context file, to
keep files more coherent and focused.
2023-10-23 19:32:56 +02:00
Julian Eisel
da34c70916 Merge branch 'blender-v4.0-release' 2023-10-23 19:19:38 +02:00
Julian Eisel
ad71b77f25 Fix #114024: "Mark as Asset" doesn't work in 3D View sidebar ID selector
Choosing "Mark as Asset" from the context menu of the ID selector (ID
template) would always use the selected objects instead of the ID set in
the ID selector. This is because since f22e2bab72, multiple selected IDs
have priority over a single active ID (to give batch editing priority),
and the 3D view context exposes both.

Adds variants of the mark and clear asset operators that only work on a
single ID ("id" context member). Context menus for buttons representing
an ID use this instead. Using an operator property resulted in too
complicated code. Plus the poll function would succeed in cases where
the operator wouldn't be able to succeed. Separate operators keep things
simple and more reliable.
2023-10-23 19:18:31 +02:00
Brecht Van Lommel
68e06704a6 Merge branch 'blender-v4.0-release' into main 2023-10-23 19:09:12 +02:00
georgiy.m.markelov@gmail.com
132b90651a MaterialX: Implement White Noise node
There is no float hash in MaterialX so this is only approximate.

Ref: #112864
Co-authored-by: Bogdan Nagirniak <bodyan@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113495
2023-10-23 17:31:44 +02:00
georgiy.m.markelov@gmail.com
be477f069c Fix #113954: Hydra crash if output node for world light is not found
Also improve update handling of world data.

Pull Request: https://projects.blender.org/blender/blender/pulls/113974
2023-10-23 17:25:11 +02:00
Brecht Van Lommel
38ec7ab51a Merge branch 'blender-v4.0-release' into main 2023-10-23 17:14:05 +02:00
Brecht Van Lommel
34a11f962f Fix Cycles time limit not showing unit when scene units are set to none 2023-10-23 17:12:38 +02:00
Clément Foucault
aa917282a7 Fix EEVEE-Next: NaN in refraction
Refraction direct light is not implemented yet.
2023-10-23 17:07:40 +02:00
Clément Foucault
98fcb8573c Fix EEVEE-Next: Raytrace: NaN in bilateral denoising
This was caused by the last frame's tile_mask being
sampled instead of the current one.
2023-10-23 16:14:32 +02:00
Dalai Felinto
e42281084b GPv3: Named Layer Selection node
This node supports either a Layer or a Layer Group name as input,
and outputs a selection field for it.

Known limitations to be addressed separately:

* We are not warning/keeping track of the named layers.
* There is no lookup for layers (groups) yet.

Ref !113908.

Pull Request: https://projects.blender.org/blender/blender/pulls/113908
2023-10-23 15:49:39 +02:00
Dalai Felinto
6b7d0fe425 GPv3: Layer Selection modifier input
Known limitations to be addressed separately:

* We are not warning/keeping track of the named layers.
* There is no lookup for layers (groups) yet.

Ref !113908.
2023-10-23 15:49:34 +02:00
Dalai Felinto
f312be62ea GPv3: Named Layer Selection field
This field supports either a Layer, or a Layer Group name as input,
and outputs a selection.

The nodes that use this should add the name to the list of Named
Dependencies of the node-tree.

Ref !113908.
2023-10-23 15:49:34 +02:00
Sebastian Parborg
b77209e617 Merge branch 'blender-v4.0-release' 2023-10-23 15:03:43 +02:00
Pratik Borhade
357c213cde Fix #114010: Can't duplicate object data
This is due to missing switch case for new Grease pencil object.

Pull Request: https://projects.blender.org/blender/blender/pulls/114057
2023-10-23 13:10:22 +02:00
Clément Foucault
d91da78b35 Fix #113266: Viewport: Color banding in viewport image render
This was caused by the framebuffer incorrectly being recreated
using a byte buffer. From now on, always use the input format
or guess the format based on the output bitdepth.

Pull Request: https://projects.blender.org/blender/blender/pulls/114061
2023-10-23 13:09:59 +02:00
Pratik Borhade
32638cb4c3 Merge branch 'blender-v4.0-release' 2023-10-23 16:37:37 +05:30
Pratik Borhade
b8705d342f Fix #113112: Loop Cut and Slide from menu is waiting for cursor input
This is because `TRANSFORM_OT_edge_slide` has `OPTYPE_DEPENDS_ON_CURSOR`
flag set. Due to this, invoke call to loop-cut operator was not sent
from function `WM_operator_name_call_ptr_with_depends_on_cursor`.
Since `edge slide` operator does not depend on actual cusor position, we
can remove this operator flag to fix the problem.

Pull Request: https://projects.blender.org/blender/blender/pulls/113140
2023-10-23 13:05:45 +02:00