Commit Graph

2161 Commits

Author SHA1 Message Date
Kamil Galik
64696cc699 NDOF: simplify the UI and preferences
- Navigation modes has been redefined a bit and introduced in a form of
  an enum so that new ones can me implemented in the future.
  Additionally switching between modes shouldn't require any additional
  configurations like inverting all the axes.
  Currently there are only 2 modes implemented,
  but 2 more are planned and will be proposed in follow-up PRs.
  Implemented modes are:

  - Object: works like "Orbit" option.
    but has all axes implicitly inverted
  - Fly: works the same as "Free".

- "Turntable" option has been turned into "Lock Horizon".
  This single option works for both normal navigation and Fly/Walk
  modes now.
- Pan and Rotation axes inversion has been removed from default
  configuration.
- UI has been simplified following the design from #136880.
- Zoom Invert has been removed since it looks like a duplication of
  `NDOF_PANZ_INVERT`.

Ref !139343
2025-06-05 21:29:53 +10:00
Pratik Borhade
afa4eaa96c Fix #137942: Grease Pencil: Make layer operators non-editable for linked data
For linked grease pencil data, layer operators are accessible right
now. Grey out them in UI by adjusting poll functions. Also disabled
the individual layer row of tree-view.`

See images in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/137946
2025-06-05 11:55:38 +02:00
Falk David
889751b0c5 Grease Pencil: Add Convert Curve Type operator
Adds a new operator in Grease Pencil edit mode to convert between curve
types. This acts as a replacment for the `Set Curve Type` operator as
the new operator better aligns with previous workflows and artist
expectations. Specifically using a threshold to adjust how well the
resulting curves fit to the original.

It can be found in the `Stroke` > `Convert Type` menu.

This operator aims at keeping visual fidelity between the curves. When
converting to a non-poly curve type, there's a `threshold` parameter
that dictates how closley the shapes will match (a value of zero meaning
an almost perfect match, and higher values will result in less accuracy
but lower control point count).

The conversion to `Catmull-Rom` does not do an actual curve fitting.
For now, this will resample the curves and then do an adaptive
simplification of the line (using the threshold parameter)
to simulate a curve fitting.

The `Set Curve Type` operator is no longer exposed in the
`Stroke` menu.

This also adds a new `geometry::fit_curves` function.

The function will fit a selection of curves to bézier curves. The
selected curves are treated as if they were poly curves.

The `thresholds` virtual array is the error threshold distance
 for each curve that the fit should be within. The size of the virtual
 array is assumed to have the same size as the total number of
 input curves.

The `corners` virtual array allows specific input points to be treated
as sharp corners. The resulting bezier curve will have this point and
the handles will be set to "free".

There are two fitting methods:
* **Split**: Uses a least squares solver to find the control
                     points (faster, but less accurate).
* **Refit**: Iteratively removes knots with the least error starting
                     with a dense curve (slower, more accurate fit).

Co-authored-by: Casey Bianco-Davis <caseycasey739@gmail.com>
Co-authored-by: Hans Goudey <hans@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/137808
2025-06-04 11:48:15 +02:00
Campbell Barton
47e26bdc0e Revert "Cleanup: remove unused functions in UI scripts"
This reverts most of commit 24eaff6889.

The some functions were used by C++.
2025-06-04 07:12:36 +00:00
Campbell Barton
24eaff6889 Cleanup: remove unused functions in UI scripts 2025-06-04 16:54:12 +10:00
Campbell Barton
6a1fa176ef Cleanup: spelling in comments & duplicate terms (check_spelling.py)
Also minor clarification in doc-string.
2025-06-04 01:51:29 +00:00
Sean Kim
440c6c8b6f Fix #138662: Image Editor View and Mask modes show UVs
With 24d08e0bae, the ability to view UVs
in the Image Editor was introduced in all modes, not just Texture Paint
and Edit Mode. This introduced a new flag that was enabled by default,
causing UVs to be displayed in any of the Image Editor modes.

While this is helpful for some workflows, it is unnecessarily
distracting for many usecases when using the Image and Mask modes of the
Image Editor. To remedy this, this PR adds various polls to ensure
that these are only shown in the Paint Mode of the Image Editor and the
UV Editor. Further thought should be put into the potential separation
between the different usecases of this editor, but that is out of scope
for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/139563
2025-06-02 23:42:01 +02:00
Habib Gahbiche
5b8f1fb0b9 Nodes: deactivate overlay buttons when no tree is assigned
Deactivate the following buttons when no node tree exists:
- Overlays (all node editors)
- Snap (all node editors)
- Gizmos (compositor only)
- Backdrop (compositor only)

Note: a node tree can exist although compositing is deactivated
(e.g. "Use Nodes" is set to False), in which case the buttons are
active.

Pull Request: https://projects.blender.org/blender/blender/pulls/139526
2025-06-02 19:28:18 +02:00
Habib Gahbiche
c956145530 Compositor: implement toggle for backdrop gizmos
The new gizmo toggle controls backdrop gizmo visibility for the
compositor node editor.

The implementation is consistent with the image editor, where the gizmo
toggle has a menu with a single entry, instead of having no drop down
menu at all.

The new toggle will be set inactive when there is no node tree in a
follow up PR: https://projects.blender.org/blender/blender/pulls/139526

Pull Request: https://projects.blender.org/blender/blender/pulls/139525
2025-06-02 17:48:19 +02:00
Jacques Lucke
0347608121 Nodes: improve "frame" search
This reduces the search weight of the frame node because it is rarely added
through the add menu. It's much easier to add it with the F key.

By reducing its search weight, the Frame output of the Scene Time node shows up
as first result, which is more desirable.

Pull Request: https://projects.blender.org/blender/blender/pulls/139709
2025-06-02 13:49:17 +02:00
Jeroen Bakker
3f8f32bbbc Vulkan: Update limitations
Added WoA support status. Up to now there hasn't been a working stack
that allows Windows+ARM GPU+Blender work well together. There are render
glitches and occasional crashes. Currently we are investigating the
issues together with Qualcomm in order to improve the situation. However
for Blender 4.5 release Vulkan support should not be expected to work.

There have een some issues detected with core vulkan that are not
visible on other platforms.
2025-06-02 07:55:59 +02:00
Alaska
02f5b8242f UI: Note that Vulkan can have VR performance issues
Currently VR can have suboptimal performance when using the Vulkan
backend (#138977). Jereon has run various experiments and was unable
to resolve the issue. So in the meantime work on Vulkan VR performance
has been delayed until Blender 5.0.

Since Blender 4.5 is likely to release without a fix for the VR
performance issue. This commit adds an explicit note about it to the
user preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/139519
2025-06-02 07:52:05 +02:00
Campbell Barton
0cbcf48e69 Cleanup: move PlayheadSnappingPanel out of tool-system module
This panel is unrelated to the tool-system.
2025-06-01 15:11:51 +10:00
Charles S
96e549c092 Paint: Add color jitter support
Add ability to randomize color of each stroke for or use perlin noise
randomization during the stroke. Works similarly to grease pencil stroke
color randomization. This feature is available for all mesh color
painting modes (Sculpt Paint brush, Texture Paint and Vertex Paint)

This setting is available both as a per-brush setting and a unified
setting on the scene level. Additionally, the equivalent Grease Pencil
options have been migrated to these more generic flags and values.

Based on this [1] RCS request.

[1]: https://blender.community/c/rightclickselect/mwgbbc/

Pull Request: https://projects.blender.org/blender/blender/pulls/128953
2025-05-31 23:48:59 +02:00
Casey Bianco-Davis
2fd5b39a1b Grease Pencil: Edit Mode Outline Strokes operator
This adds an edit mode operator for converting the selected
strokes to outlines, same as it used to work in 4.2 LTS.

Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/139540
2025-05-31 22:38:33 +02:00
Falk David
d332411b21 Grease Pencil: Fill Tool: Draw fill guides
This implements the "boundary strokes" features (from 4.2 LTS).
To make it a bit more clear, the feature is now called "fill guides".
It uses the same `Alt`+`LMB` shortcut.

Fill guides are denoted by a `".is_fill_guide"` attribute set to `true`.
Otherwise they behave as normal strokes.

There is the `Clean Up` > `Remove Fill Guides` operator to remove
the strokes.

This also adds an option to the Fill tool to automatically remove fill
guides once a fill has been created.

Pull Request: https://projects.blender.org/blender/blender/pulls/139293
2025-05-31 12:23:39 +02:00
John Kiril Swenson
0f37863fba Cleanup: VSE: Replace redundant "Change Effect Input" with "Swap Inputs"
The `SEQUENCER_OT_change_effect_input` operator does exactly the same thing
as `SEQUENCER_OT_swap_inputs` . "Change effect input" in the
"Effect Strip" context menu also seems bugged in recent versions.

Since "Swap Inputs" already has a keybind and the name itself is closer
to its intended use, just use that operator over the other one.

Also poll "Swap Inputs" so it is grayed out if the effect does not take
two inputs.

Pull Request: https://projects.blender.org/blender/blender/pulls/139615
2025-05-30 23:28:06 +02:00
Nika Kutsniashvili
975c71d43c UI: Fix incorrect capitalizations
Fixing some incorrect capitalizations I've come across

Pull Request: https://projects.blender.org/blender/blender/pulls/139548
2025-05-30 20:59:20 +02:00
Philipp Oeser
af62f64d48 Grease Pencil: remove "Weights" from editmode menu
All contained operators are using poll functions that check we are in
weight paint mode, so all operators would be disabled in editmode
anyways, better to remove the menu to avoid confusion.

Pull Request: https://projects.blender.org/blender/blender/pulls/139535
2025-05-30 16:31:23 +02:00
John Kiril Swenson
d3d4124ce6 Cleanup: VSE: Standardize "Crossfade" and "Gamma Crossfade" naming
Use these terms over "Cross" and "Gamma Cross" in the UI/RNA
when referring to effect strips.

Keep it as "Cross" for blend modes for now (which is in and of itself
a bit of a weird naming. In the future, we should consider unifying
our blend mode types with compositor ones for consistency).

Pull Request: https://projects.blender.org/blender/blender/pulls/139606
2025-05-30 03:41:10 +02:00
John Kiril Swenson
d90896ebc7 Fix: VSE: Add missing effect types to "change effect type" menu
PR #139514 just copied the "add effect" menu, but forgot the
other possible effect types (crossfade, gamma crossfade, adjustment).
2025-05-30 03:41:09 +02:00
Hans Goudey
91803e130f Cleanup: Grammar: Fix uses of "for e.g."
e.g. stands for "exempli gratia" in Latin which means "for example".
The best way to make sure it makes sense when writing is to just expand
it to "for example". In these cases where the text was "for e.g.", that
leaves us with "for for example" which makes no sense. This commit fixes
all 110 cases, mostly just just replacing the words with "for example",
but also restructuring the text a bit more in a few cases, mostly by
moving "e.g." to the beginning of a list in parentheses.

Pull Request: https://projects.blender.org/blender/blender/pulls/139596
2025-05-29 21:21:18 +02:00
John Kiril Swenson
1834f9f200 VSE: Improve "Change Effect Type" operator
- Previously, effects could be changed into types that take different
amount of inputs, e.g. from "add" to "glow", which led to undefined
and glitchy behavior (unreported bug). Fix by requiring same input count
for new effect.
- Previously, strip names were not updated when changing effect type,
which tended to be confusing. Now, if the default name was not changed,
update to the new effect type name.
- Remove "effect strip" menu from color and text strips. Although they
are effects internally, to a user, this is not clear, and providing the
option to modify effect inputs in these cases doesn't really make sense.

Pull Request: https://projects.blender.org/blender/blender/pulls/139514
2025-05-29 20:28:20 +02:00
Sean Kim
53c922e30d Fix: Cursor options display inactive in Sculpt Mode
Prior to this commit, the cursor overlay options were tied to the
`has_overlay` setting for brushes. This check used the `mtex` property
to examine the mapping mode of the associated texture.

This should not apply to the overall cursor overlay settings, as they
are not dependent upon a texture being loaded.

Pull Request: https://projects.blender.org/blender/blender/pulls/139567
2025-05-29 20:04:42 +02:00
Jacques Lucke
182797ea61 Geometry Nodes: new Format String node
This adds a new Format String node which simplifies constructing strings from
multiple values. The node takes a format string and a dynamic number of
additional parameters as input. The format string determines how the other
inputs are inserted into the string. Only integer, float and string inputs are
supported for now.

It supports two different format syntaxes:
* Python compatible format syntax which also mostly matches the behavior of the
  `fmt` C++ library. Most of this is supported, but there are some small
  limitations.
* Syntax of the form `###.##` where each `#` stands for a digit. This is the
  syntax that was introduced in #134860.

This node greatly simplifies common string operations which would have required
potentially many nodes before to convert numbers to strings and to concatenate
them. It also makes new conversions possible that were not supported before.
This node can also be used to insert e.g. frame numbers into a file path which
was surprisingly complex before.

This node has special behavior for the name of new inputs. For the purpose of
the node, the name of the inputs must be valid identifiers and it's usually
helpful when they are short. New names are therefore initialized to be single
characters. If possible, the first character of the linked input is used. This
works well when connecting e.g. a Separate Vector/Color node. Otherwise, inputs
are named `a` to `z` by default. If that's not possible, the source socket name
is used instead (converted to be a valid identifier). If that still doesn't
work, the name is made unique using the normal `.001` mechanism except that `_`
instead of `.` is used as separator to make the name a valid identifier.

Python Syntax references:
* Python: https://docs.python.org/3/library/string.html#formatspec
* `fmt`: https://fmt.dev/latest/syntax/

More detailed notes about compatibility with the above syntax specifications:
* Conversion using e.g. `!r` like in Python is not supported (maybe the future).
* Sub-attribute access like `{vector.x}` is not supported (maybe the future).
* Using `%` like in Python is not supported (maybe in future).
* Using `#` for an alternate form is not supported. This might help in the
  future to make the syntax compatible with #134860.
* Using `L` like in the `fmt` library is not supported because it depends on the
  locale which is not good for determinism.
* Grouping with e.g. thousands separators using e.g. `,` or `_` like in Python
  is not supported (maybe in future). Need to think about the locale here too.
* Mixing of unnamed (`{}`) and named (`{x} or {0}`) specifiers is allowed.
  However, all unnamed specifiers must come before any named specifier.

The implementation uses the `fmt` library for the actual formatting. However,
the inputs are preprocessed to give us more control over the exact supported
syntax and error messages. The code is already somewhat written so that many
strings could be formatted with the same format but that's not actually used yet
because we don't have string fields yet.

Error messages are propagated using a new mechanism that allows a limited form
of error propagation from multi-functions to the node that evaluates them.
Currently, this only works in fairly limited circumstances, e.g. it does not
work during field evaluation. Since this node is never part of field evaluation
yet, that limitation seems ok, but it's something to work on at some point.
Properly supporting that requires some more changes to propagate enough context
information everywhere. Also showing errors of field evaluation on the field
node itself (instead of on the evaluation node) requires even more work because
our current logging system is not setup to support that yet.

This node comes with a few new requirements for the socket items system: names
must be valid identifiers and they are initialized in a non-trivial way.
Overall, this was fairly straight forward to implement but currently it requires
to adding a bunch of new members to all the accessors that don't really need it.
This is something that we should simplify at some point even if I'm not entirely
sure how yet. The same new requirements used in this node would probably also
exist in a potential future expression node.

Pull Request: https://projects.blender.org/blender/blender/pulls/138860
2025-05-29 13:17:03 +02:00
Hans Goudey
11dc71b258 Spreadsheet: Add option to display internal attributes
Previously the only way to see these attributes and their values
was the Python API. It's helpful for both users and developers to
be able to know all the data attached to the geometry.

This commit adds an option to the spreadsheet's "View" menu
to display attributes starting with a period that are normally hidden.
The option is off by default. Anonymous attributes are still hidden.

---

![image.png](/attachments/3fbb8544-c13d-469c-ae7d-3ade68b0bcb3)

Pull Request: https://projects.blender.org/blender/blender/pulls/139559
2025-05-29 04:12:28 +02:00
Jacques Lucke
894163b464 Nodes: add missing input node sockets in search
Those were missing from 39a3b44a72.
2025-05-28 08:52:37 +02:00
Jacques Lucke
39a3b44a72 Nodes: support searching for outputs of various input nodes directly
Previously, one had to search for the name of an input node (Geometry, Light
Path, etc.) instead of for the actual desired values.

This patch makes it possible to search for the output names of various input
nodes directly. All other outputs of the input node are hidden automatically.
This was partially support for the Scene Time before.

Supported nodes:
* Compositor: Scene Time
* Geometry Nodes: Camera Info, Mouse Position, Scene Time, Viewport Transform
* Shader Nodes: Camera Data, Curves Info, Geometry, Volume Info, Light Path,
  Object Info, Particle Info

Right now, the output names are hardcoded in the menu. We don't have a great way
to access those without an actual node instance currently. For that we'll need
to make the node declarations available in Python, which is a good project but
out of scope for this this feature. It also does not seem too bad to have more
explicit control over what's shown in the search.

Pull Request: https://projects.blender.org/blender/blender/pulls/139477
2025-05-28 05:41:37 +02:00
Hans Goudey
b80f1f5322 Geometry Nodes: Socket structure type and display changes
Implementation of #127106.
This is just a visual representation of the field/single/grid
status of sockets to make the workflow more intuitive. With
a visual representation for volume grid sockets, volume features
should be unblocked for further development. The structure type
will also be used to distinguish list sockets in the interface.

Group input nodes now have a "Structure Type" option instead of
the existing "Single Value Only". Usually the auto option should be
enough, but in some cases where the inferencing cannot (yet) make
a clear determination, it can be helpful to choose a specific type.

The new visualization and the group input structure type option
are hidden behind a new experimental option for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/134811
2025-05-28 02:33:47 +02:00
Jacques Lucke
4f53677dcd Nodes: support searching for warning types directly 2025-05-27 09:02:06 +02:00
Omar Emara
a4502f82c1 Compositor: Add Image Coordinates node
This patch adds a new Image Coordinates node for the compositor. The
Texture Coordinates and Pixel Coordinates outputs were removed from the
Image Info node and were added to the new node instead. Additionally, a
new Normalized Coordinates output was added.

The Pixel Coordinates output now no longer includes half pixel offsets.

Pull Request: https://projects.blender.org/blender/blender/pulls/138935
2025-05-26 08:25:06 +02:00
Pratik Borhade
0ad79ca541 Fix #139170: Regression: The Linked Node Group Socket Name is Editable
This probably have occured after migration from UIList. When nodetree ID
is linked form another file, disable the layout for individual rows and
the add/remove operator. Also tweak `supports_renaming()` function so that
individual tree element cannot be renamed when linked.

Pull Request: https://projects.blender.org/blender/blender/pulls/139269
2025-05-23 12:19:41 +02:00
Aras Pranckevicius
a4b76dbb09 IO: more strongly indicate that Collada is deprecated
- Add "(Deprecated)" to Collada I/O tooltips
- Move the import/export menu items to be the last ones from the
  built-in items

Pull Request: https://projects.blender.org/blender/blender/pulls/139303
2025-05-23 12:02:38 +02:00
quackarooni
ad90cceb1e Geometry Nodes: Add "Set Grease Pencil Softness" node
How solid/faded the edges of a Grease Pencil stroke is
controlled by the `softness` attribute. This change adds a
node that exposes that attribute, allowing the user to
control it via Geometry Nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/138939
2025-05-23 07:30:23 +02:00
Campbell Barton
72f24fcbab Cleanup: resolve pylint warnings 2025-05-23 14:03:20 +10:00
Pratik Borhade
b48f3b0df4 Fix #139195: Preferences are not automatically saved after keyitem_restore
Tag preference dirty when keyitem_restore is called. When window is
closed and is_dirty=true, WM_exit_ex() will call the function to update
the prefs.

Pull Request: https://projects.blender.org/blender/blender/pulls/139254
2025-05-23 00:36:41 +02:00
Eqkoss / T1NT1N
bb9d5cdaad Lights: Add normalize property
When enabled, this normalize the strength by the light area, to keep
the total output the same regardless of shape or size. This is the
existing behavior.

This is supported in Cycles, EEVEE, Hydra, USD, COLLADA.

For add-ons, an API function to compute the area is added for conversion,
in case there is no native support for normalization.

area = light.area(matrix_world=ob.matrix_world)

Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/136958
2025-05-22 16:32:44 +02:00
Eqkoss / T1NT1N
a12bce039f Lights: Add temperature property
Similar to other renderers, this adds a temperature property to set the
light color using blackbody emission. This can be more convenient than
using nodes, and can improve interop with other software.

This is supported in Cycles, EEVEE, Hydra, USD, COLLADA and FBX.

Pull Request: https://projects.blender.org/blender/blender/pulls/134303
2025-05-22 16:32:44 +02:00
Eqkoss / T1NT1N
7e0dad0580 Lights: Add exposure property
Similar to other renderers, this adds an exposure property to multiply
the light power by 2^exposure. This can be more convenient to control
a wide range of values.

This is supported in Cycles, EEVEE, Hydra, USD, COLLADA and FBX.

Pull Request: https://projects.blender.org/blender/blender/pulls/134528
2025-05-22 16:32:44 +02:00
Brecht Van Lommel
6f45aedd85 UI: Move some advanced Cycles light settings to Settings panel
Similar to the material Settings panel. To make room for three new options
that will be added in following commits.
2025-05-22 16:32:43 +02:00
Jacques Lucke
9ac3e44ce6 Spreadsheet: move context path to left side bar
Previously, we were drawing the context path in the header of the spreadsheet.
However, that had some problems:
* When using a viewer that's somewhere deep in a node group, the viewer path
  wouldn't fit.
* Standard editor menus didn't fit in. Also we wanted to add spreadsheet
  specific operators that should be in a new menu.
* Couldn't fit more useful data for the context path (like the inspection index
  for repeat zones).

This patch solves this by moving the entire context path to the left side bar.
This frees up the header for menus.

The new context panel information is added at the top of the side bar because
then there is a proper hierarchy: `Object > Evaluation State > Viewer Path
(optional) > Instance Selection > Domain Selection`

This patch also adds information about the current inspection index for for-each
and repeat zones. They are not editable yet, but that can be implemented
separately as it might require a few more changes for everything to update
correctly.

The new Viewer Path panel is only displayed when actually showing viewer data.

Pull Request: https://projects.blender.org/blender/blender/pulls/138477
2025-05-22 15:04:41 +02:00
Christoph Lendenfeld
87a28fa117 Anim: Common Playhead snapping for all editors
This patch adds snapping options for the playhead to all animation editors.
The options can be modified through a new dropdown in the editor header.

All editors will show all those options, and they are shared,
so toggling the option in on editor will change it for all other editors too.
Some options are not working/relevant in some editors for example
Strips in the Dope Sheet. However for consistency the option is still shown.
This is a separate menu from the transform snapping menu because
you can toggle the snapping for transform and playhead separately.
Putting it in the existing snapping transform menu would imply that it can
be turned off with the magnet which is not the case.

Playhead snapping is explicitly disabled for the drivers editor
because there is no playhead to drag around.

Snapping to Frame/Second intervals takes the scene start as a starting point.
That means you can snap to the n-th second of the animation even though
it might not start at frame 1. The preview range is NOT taken into account
by design since the use case is working on a sub-section of the animation
in which case the snap target should not change.

Snapping is toggled by pressing CTRL as indicated by the status bar.

Snapping to Frames/Seconds is absolute, meaning no matter
how far away your cursor it will snap to the closest snap point.
All others only snap to things if they are close to the cursor in pixel values.
When mixing those two behaviors, it prefers relative snapping.
If no point is close enough to snap relative,
it will fall back to absolute snapping.

Based on the prototype #135913
Part of #135794

Pull Request: https://projects.blender.org/blender/blender/pulls/137278
2025-05-22 10:17:19 +02:00
Habib Gahbiche
f6048a5e7b Compositor: UI: Visualize render size and domain size in image editor
Show render region as a bounding box with a passepartout option.
Additionally, a text info is shown at the upper left corner, similar to
the info text in 3d view, showing the render size and current image
size.

Devtalk thread:
https://devtalk.blender.org/t/compositor-ui-improvements/34186?u=izo

Pull Request: https://projects.blender.org/blender/blender/pulls/120471
2025-05-21 15:57:31 +02:00
Bartosz Kosiorek
6f1e0a8adf Physics: Decrease thickness of smoke surface emission for small objects
The Smoke Surface Emission is the height of the smoke from the mesh surface.
It is measured in Domain Grid Units, and if the grid unit is relatively big
(compared to the mesh), the smoke emission is huge.

To fix that the Surface Emission was decreased from 1.5 to 1.0. As a result
it is possible to emit smaller smokes (width 2, previously 3).

Further decreasing default value of Surface Emission is not recommended,
as in some cases (too small mesh compared to Grid Unit) will result not
emitted smoke.

Fix #132613: Issue with large smoke domain and small emitter

Pull Request: https://projects.blender.org/blender/blender/pulls/138567
2025-05-20 17:40:03 +02:00
Christoph Lendenfeld
5f5c06fc24 Assets: Create Asset thumbnails via a screenshot anywhere in Blender
This patch adds the option to take screenshots for asset previews.
Since the functionality lives inside an operator, the screenshot can only
be taken from within the GUI of Blender.

* The operator can be accessed from the dropdown menu in the asset
browser preview n-panel.
* It works for local assets and assets that are managed by blender
(e.g. brush assets)
* Click drag anywhere in Blender to create a capture
* Holding Space will move the capture area
* Holding Shift will unlock the aspect ratio
* On a re-run, the operator remembers it previous capture
area to easily create an identical screenshot
* If the screenshot is fully contained within a single 3D viewport,
the background will render transparent

Pull Request: https://projects.blender.org/blender/blender/pulls/132904
2025-05-20 13:56:45 +02:00
Omar Emara
a141d66aa2 Compositor: Add Relative To Pixel node
This patch adds a new Relative To Pixel node in the compositor. The node
converts values that are relative to the image size to values that are
in terms of pixels.

This is useful to use relative values in nodes that take pixel values.
For instance, the Kuwahara node has an input that defines the filter
size in pixels. If one wants to define it relative to the image size
instead, one can use this node.

The node can operate on float and 2D vector values. Further, the node
can do the conversion relative to a number of image properties:

- Per Dimension: Each dimension gets converted independently. The X
  value is relative to the X dimension and the Y value is relative to
  the Y dimension. This mode is special because in float mode, the
  output will be a factor as opposed to a float.
- X: Relative to the x dimension.
- Y: Relative to the y dimension.
- Greater: Relative to the greater dimension.
- Smaller: Relative to the smaller dimension.
- Diagonal: Relative to the diagonal of the image.

Pull Request: https://projects.blender.org/blender/blender/pulls/138773
2025-05-20 08:32:46 +02:00
Colin Basnett
39c2f01b51 Nodes: add Bit Math node
This adds a new Bit Math node which supports the following operations: `and`,
`or`, `xor`, `not`, `shift` and `rotate`.

For the `shift` and `rotate` operations, a posititive shift is a left shift and
a negative shift is a right shift.

Currently, the node always works on 32-bit integers which is what Geometry Nodes
uses internally for integers. If required, this can be extended to work on other
bit widths in the future.

The need for this came up every now and then. It can be useful when encoding
specific bits in integer attributes (for efficiency or because the geometry is
exported to other software that expects a certain format). Also, this node is
useful for some people doing crazy but fun things with Geometry Nodes like
emulating hardware. Even if the use-cases are not common, if they arise, it's
hard to work around and the cost of having this node is quite low for us.

Co-authored-by: Charlie Jolly <charliejolly@noreply.localhost>

Pull Request: https://projects.blender.org/blender/blender/pulls/138290
2025-05-19 18:03:05 +02:00
Lukas Tönne
5180930e0d Fix #138933: Support assigning a default value to menus wrapping node groups
The modifier input value for menu items is an int property, which is not
compatible with the enum property used in node group socket definitions for
menus. Wrapping a node group with a menu will try to assign the int value from
the modifier directly to the enum, which expects a string identifier.

To aquire the matching string identifier, use the UI properties in the modifier
RNA, which contain the complete enum item definition.

Pull Request: https://projects.blender.org/blender/blender/pulls/139074
2025-05-19 15:49:45 +02:00
Jacques Lucke
d9317046b2 Nodes: initialize node name from group name
Previously, when adding a group node it was always called `Group`. This is not
particularly useful. Also it's inconsistent with many other places like adding
modifiers where the name of the modifier depends on what modifier is added.

Now, newly added group node will have the same name as the group that it calls.
Node names still have to be unique though, so e.g. `.001` is still added.

Pull Request: https://projects.blender.org/blender/blender/pulls/139093
2025-05-19 15:39:44 +02:00
Habib Gahbiche
69701e3357 Compositor: Add filter types to search menu
Expose filter types of the filter node (Sobel, Diamond Sharpen, etc..)
in the compositor search menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/139078
2025-05-19 11:55:57 +02:00