Commit Graph

1541 Commits

Author SHA1 Message Date
Jacques Lucke
1a52f2bbab Fix #126924: instable fire simulation by default
The cfl_condition default was changed in 9a0a75eff0 with the intention
of making liquids behave better. However, that degraded the simulations of fire.

Now the property will be set to its old value if the quick smoke operator is used.
Can't think of a great way always use the old value for smoke simulations for now.
2024-09-11 17:48:20 +02:00
Philipp Oeser
d1aa30f1ac UI: Expose "Frame Selected" in image editor mask mode
Was already included in `IMAGE_MT_view_pie`, but missing from
`IMAGE_MT_view`

NOTE: the functionality has problems, see #127352, but that will be
tackled separately

Pull Request: https://projects.blender.org/blender/blender/pulls/127391
2024-09-11 13:30:40 +02:00
Falk David
942499382d GPv3: Vertex Paint Mode
This adds the vertex paint mode and all of the tools
from GPv2:
 * Average
 * Blur
 * Draw
 * Replace
 * Smear

Pull Request: https://projects.blender.org/blender/blender/pulls/125674
2024-09-10 18:56:31 +02:00
Sietse Brouwer
9c9b562d54 GPv3: Smooth active vertex group operator
This PR implements the "Smooth" operator in Weight Paint mode for GPv3.
The Smooth operator smooths the weights in the active vertex group by
applying a gaussian blur to the vertex weights.

The operator has two properties:
- `factor` (0.0 - 1.0): The extent to which the smoothed weight is
applied to the original weight, where 0.0 is 'keep the original weight'
and 1.0 is 'replace fully with the smoothed weight'.
- `repeat`: The number of times the smoothing is executed. A higher
value means more smoothing.

The operator is added to the 'Weight' menu in Weight Paint mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/126429
2024-09-09 10:59:06 +02:00
Sybren A. Stüvel
416625738e Anim: avoid Python exception in Dope Sheet header
Fix a Python exception when drawing the Dope Sheet header in Shape Keys
mode, when the active Object type cannot have shape keys.
2024-09-09 10:49:59 +02:00
Sybren A. Stüvel
bbccf912b4 Anim: remove the 'Animation Debug' panel
Remove the 'Animation Debug' panel from the 3D Viewport. It was always
meant as a temporary debugging tool, and it's no longer needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/127200
2024-09-06 10:59:04 +02:00
Jeroen Bakker
458faa6486 Preferences: GPU backend selection
This PR allows users to select a GPU backend.

In the system tab of the user preferences the GPU backend can be selected in the `Display Graphics` panel.
It will require a restart of Blender before the changes become effective.

During startup minimum requirements are checked. Blender will switch automatically
to OpenGL when no compatible Vulkan device could be detected. A dialog will be shown
to inform the user.

The setting of the in the `Display Graphics` panel are still overridden when blender is started
using the `--gpu-backend` option. When starting blender with `--debug-gpu` the backend
detection will print to the console.

See PR for detailed information and screenshots of the UI.

Implements #126504
Pull Request: https://projects.blender.org/blender/blender/pulls/126545
2024-09-06 08:28:41 +02:00
Campbell Barton
97179b10fb Refactor: make "sys_info" an internal module, rename for clarity
- Move sys_info into an internal module to avoid having so many
  top level modules for Blender's internal functionality.
- Rename system_info sub-modules that pre-fill URL's for clarity.
- Move top-level exception handling into the operator.
- Report an error if an unexpected exception occurs.
- Use `Exception` instead of `BaseException` as there is no reason to
  catch the additional exceptions.
- Remove use of sys_info from the command line example,
  replace with in-lined system info.
2024-09-06 11:11:26 +10:00
Sybren A. Stüvel
383c3c8253 Anim: Add Action+Slot selectors to Property editor tabs
Add Action + Action Slot selectors to various Property Editor tabs.
This follows the pattern established in
f917b60036.

Support for `CacheFile` data-blocks is not included here. That needs
some discussion, as currently its interface is part of the Modifier
stack (and thus implemented in C++ and not Python, and using a
different layout).

Since this PR is about adding to the Property Editor, some data-blocks
that have no representation there are thus excluded (like `Mask`).
Even when they could actually use an Action+Slot selector somewhere.

Pull Request: https://projects.blender.org/blender/blender/pulls/127074
2024-09-05 12:11:35 +02:00
Sybren A. Stüvel
efcd0e04b3 Fix #126896: Shape Key Editor can't browse actions
The new Action selector (51fd355c01) avoids the need to use
`space_data.action` in the dope sheet (that attribute was a bit of a
hack; the new Action selector was made to avoid that). It failed to take
the dope sheet's shape key mode into account properly, though. This is
now fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/127177
2024-09-05 12:02:23 +02:00
Pratik Borhade
0bfad6cc5a GPv3: Wrong radius property in draw context menu
Mistake in 9ca6e049a7
Adjust draw brush properties based on `use_locked_size` status

Pull Request: https://projects.blender.org/blender/blender/pulls/127070
2024-09-04 12:58:49 +02:00
Pratik Borhade
0ef35bc475 UI: Expose Proportional edit in image editor mask mode
Proportional edit works with shortcut in mask mode of image editor but
it was never exposed in UI (header). Also move pivot point along with
proportional edit property to the right of mask template.

Pull Request: https://projects.blender.org/blender/blender/pulls/126482
2024-09-03 22:56:48 +02:00
Campbell Barton
e34d9eeac7 Cleanup: use C-style comments, double quote Python text 2024-09-03 21:22:34 +10:00
Alaska
3196ef1636 Add a script to collect system information when Blender isn't opening
This commit adds a python script that can collect some of the
information necessary to fill out a bug report.

The primary use case is to help users collect system information for
a bug report in the case that Blender can't open.

CMD and sh files are included to help users use the Python script.

Ref !122191
2024-09-03 13:26:54 +10:00
Campbell Barton
d19c13eb82 Cleanup: spelling & punctuation in comments 2024-09-03 12:59:37 +10:00
Sybren A. Stüvel
433278233e Cleanup: formatting
Just running `make format`, no functional changes.
2024-09-02 18:05:55 +02:00
YimingWu
7c52bbb30a Cleanup: Remove _has_gpv3 condition in python
GPv3 is no longer really a experimental feature now and the
experimental option is also removed already, so it does not
make much sense keeping this branch in the UI.
2024-09-02 21:21:03 +08:00
Sybren A. Stüvel
a6d7e12e22 Anim: New/Un-assign Slot operators
Add two new operators, `anim.slot_new_for_id` and
`anim.slot_unassign_from_id`. These are used in the Action editor and
the Animation panels in the Properties editor, to respectively create a
new Action Slot for an ID and to unassign whatever slot is currently
assigned to that ID.

The latter operator also replaces the C++ operator
`anim.slot_unassign_object`, which was specifically made for the
Dopesheet header. The Python ones are generic enough to be used there
too.

Pull Request: https://projects.blender.org/blender/blender/pulls/126943
2024-09-02 14:10:49 +02:00
Sybren A. Stüvel
f917b60036 Anim: add Action selectors to Material + Camera properties
In the Properties editor, add Action selectors to the Material
properties and the Camera properties.

For the Material, two Action selectors are shown: for the Material
itself and for its shader node tree. Those are separate IDs of different
types, and thus will always have separate Actions (until the Slotted
Actions are commonplace).

When the 'Slotted Actions' experimental feature is enabled, also show
the Action Slot selector underneath each Action selector.

The Animation panel in the Properties editor is (by default) always at
the bottom, just above the Custom Properties panel.

Pull Request: https://projects.blender.org/blender/blender/pulls/125666
2024-09-02 12:10:14 +02:00
Charlie Jolly
294994e4b9 Geometry Nodes: new Hash Value node
This node hashes various types into an integer. Note that hashes
cannot generally used as unique identifiers because they are not
guaranteed to be unique. It can be used to generate somewhat
stable randomness though in cases where White Noise does not
offer enough flexibility.

It uses hash functions from BLI_noise.hh. These are also used in
the White Noise node.

Pull Request: https://projects.blender.org/blender/blender/pulls/110769
2024-08-30 16:42:29 +02:00
YimingWu
b98b93ec8f Grease Pencil: Add menu corrections for GPv3
Correct line art icons for add menu in grease pencil v3, also
renamed "Suzanne" back to "Monkey" to keep it consistent with
GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/126979
2024-08-30 15:43:40 +02:00
Jacques Lucke
1ee6a8fad5 Geometry Nodes: support customizing warning propagation
Previously, all errors, warnings and info messages were propagated from the node
that generates it to the top level node group. This is a good default, but may
not always be desirable. For example, someone may build a node group asset that
generates some warning that is irrelevant to the user to the asset. Now, the
asset author can selectively disable propagating warnings from that node.

Each node has a new `Warning Propagation` setting. It controls if warnings from
this node should be propagated to the parent group node. By default, everything
is propagated. One can also choose to propagate nothing, only errors or only
errors and warnings.

Note, this does not affect whether the warning is shown in the node itself, only
if the warning is propagated one level up!
Pull Request: https://projects.blender.org/blender/blender/pulls/126786
2024-08-30 12:06:48 +02:00
Jacques Lucke
e8b81065bc Geometry Nodes: support custom warnings in node groups
This implements the `Warning` node that allows node groups to communicate
expectations about input values to the user.

By default, the `Warning` node is only evaluated if the node group that contains
it is evaluated in any way. This is better than always evaluating it, because
that could trigger lots of unnecessary evaluation in parts of the potentially
large node tree which should be ignored. In this basic mode, the output of the
node should not be connected to anything and it must not be in a zone.

For more fine-grained control for when the `Warning` node should be evaluated,
one can use the boolean output which is just a pass-through of the `Show` input.
If this output is used, the `Warning` node will only be evaluated if its output
is used. A simple way to use it is to control a Switch node with it that e.g.
"disables" a specific output when the inputs are invalid. In this case, the
`Warning` node may also be in a zone.

The node allows the user to choose between 3 severity levels: Error, Warning and
Info. Those are the same levels that we use internally. Currently, the error and
warning mode are pretty much the same, but that may change in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/125544
2024-08-29 16:03:25 +02:00
Sybren A. Stüvel
090c7aa68e Anim: add operator for creating a new Action Slot to the dope sheet header
Add new operator `anim.slot_new_for_object`, which creates a new action
slot for the active object. Since this slot is created on the action
used by the object, it requires that this action exists and is a
layered/slotted action (which by definition includes empty actions).

Pull Request: https://projects.blender.org/blender/blender/pulls/126934
2024-08-29 15:37:03 +02:00
Campbell Barton
d497452a73 Cleanup: typo, spaces in comments, comment blocks & use double quotes 2024-08-29 17:16:44 +10:00
Alaska
6ccb33e9fe Shader: Add Metallic BSDF Node
Add Metallic BSDF Node to the shader editor.

This node can primarily be used to create more realistic looking
metallic materials than the existing Glossy BSDF node.

This commit does not add any new closures to Cycles, it simply exposes
existing closures that were previous hard to access on their own.

- Exposes the F82 fresnel type that is currently used by the
metallic component of the Principled BSDF. Results should match
between the Metallic BSDF and Principled BSDF when using the same
settings.
- Exposes the Physical Conductor fresnel type that was previously
limited to custom OSL scripts. The Conductor fresnel type accepts
IOR and Extinction coefficients to define the appearance of the
material based off real life measurements.

EEVEE only supports the F82 fresnel type with internal code to convert
the the physical conductor inputs in to a colour format for F82,
which can lead to noticeable rendering differences with
some configurations.

Pull Request: https://projects.blender.org/blender/blender/pulls/114958
2024-08-27 17:20:46 +02:00
Sybren A. Stüvel
f8af00e61b Anim: Action editor, only show Action selector if there is an active object
In the Action editor, only show the Action selector (and the matching
separator) if there actually is an active object to select it for.
2024-08-27 15:13:17 +02:00
Campbell Barton
780686f885 Cleanup: correct code-comment 2024-08-26 11:50:14 +10:00
Christoph Lendenfeld
51fd355c01 Anim: UI template for Action selectors
This PR is just taken over from @dr.sybren with
minor comments addressed.

Original PR: #125493

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/126561
2024-08-23 11:07:16 +02:00
Philipp Oeser
65930d2a03 Fix #125800: AttributeError when maximized the 3d view with asset shelf
For a brief moment when switching to a maximized screen full area, the
screen context is missing its `object` it seems, until the context is
properly set up again.

Prevent the 'Context' object has no attribute 'object' by just checking
if it is available

Pull Request: https://projects.blender.org/blender/blender/pulls/125905
2024-08-22 15:07:38 +02:00
John Kiril Swenson
715129bf5b VSE: ability to connect and disconnect strips in the VSE.
Adds the ability to connect and disconnect strips in the VSE.

- Connected strips have an icon indicating their status, and attempting
  to select one connected strip selects all other connected strips in
  that chain.
- If the user attempts to connect a strip that is already connected to
  other strips, that strip will disconnect itself from others before
  connecting to new strips.
- Preview selection also works in bulk if multiple video strips are
  connected together in the timeline.
- When adding new strips from the Add menu or the File Browser, strips
  from the same file are connected by default. There's an option to
  turn this off in Editing > Video Sequencer user preferences.
- It is possible to individually tweak strips/handles and ignore
  connections with Alt+Click.
  - This shortcut overrides the old keymap item for "Linked Handle"
    selection. The property still exists if people want to use that
    shortcut for its old purpose.
- To make sure that connections remain valid even after duplication,
  I've added a condition to `seq_new_fix_links_recursive` that also
  updates connections using the `seq->tmp` var. (A note -- I've updated
  the comment for this field in `DNA_sequence_types.h` because the var
  is only used for duplication now. It was once present in
  `select_more_less_seq__internal` to be used for linked selection but
  is gone now).
  - There are also functions to cut one-way links and make sure that
    all strips are bidirectionally connected after duplicating.

Pull Request: https://projects.blender.org/blender/blender/pulls/124333
2024-08-22 14:54:42 +02:00
Lukas Tönne
2e9fc8ef2d GPv3: Segment selection support
Support segment mode in Grease Pencil v3 selection operators.
This is a continuation of #109221.

Segment selection works in multiple stages:
1. When enabled, the 2D evaluated lines for all visible curves are
entered into a BVH tree. This tree is used to find intersections later
on. All the visible drawings are in the tree, an `OffsetIndices` array
is used to record ranges of BVH elements for each drawing.
2. Primary selection functions get alternative versions that produce an
`IndexMask` instead of writing directly to selection attributes. This
makes it possible to detect select actions on points that are already
selected. Using a delta of selection attributes for this is not enough
to detect such user actions (and inefficient).
3. In segment mode the `IndexMask` is extended to fully cover segment
points (or exclude them when deselecting respectively). This first
performs and intersection test using the BVH tree, then finds all point
range with selected elements.
4. Finally the extended index mask is applied to selection attributes as
usual.

Pull Request: https://projects.blender.org/blender/blender/pulls/126027
2024-08-21 13:35:26 +02:00
Amelie Fondevilla
625ef79f57 GPv3: Soft mode for the Eraser tool
Implementation of the soft mode of the eraser tool for GPv3.
In this mode, the eraser decreases the opacity of the points it hits.
If the opacity of a point falls below a threshold, then the point
is removed from the curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/110310
2024-08-20 17:24:03 +02:00
Lukas Tönne
400c738db9 GPv3: Import and export for SVG and PDF
Implements the SVG import/export and PDF export operators for GPv3.

Pull Request: https://projects.blender.org/blender/blender/pulls/123996
2024-08-20 11:41:37 +02:00
Campbell Barton
9ab9aab3d7 Cleanup: use "Helper" suffix for mix-in panel classes
This clarifies that they aren't themselves panel types.
2024-08-20 14:25:56 +10:00
Campbell Barton
ec759b6caf Cleanup: suppress debug warning with unregistered Panel sub-classes 2024-08-20 14:25:55 +10:00
Campbell Barton
12549de989 Cleanup: remove unused menu definition 2024-08-20 14:25:53 +10:00
Casey Bianco-Davis
1a07c08718 GPv3: Eyedropper tool
This adds the Eyedropper tool to GPv3.

A few changes have been made:

- Added `Brush` mode.
- Set active color in palette.
- Show the palette in the UI.
- Add UI for setting material mode.
- Drag for color accumulation.

Pull Request: https://projects.blender.org/blender/blender/pulls/126211
2024-08-19 11:27:49 +02:00
Campbell Barton
8a7ff41a85 Cleanup: wrap long lines in Python scripts 2024-08-19 10:48:07 +10:00
Harley Acheson
aa78d43a05 UI: Multicolor Autokeying Indicator
Show the autokeying indicator (record button) on the Timeline header in
red when enabled. With a white outline on dark theme, or with a black
outline on light theme. The red color is user changeable.

Pull Request: https://projects.blender.org/blender/blender/pulls/126344
2024-08-16 23:16:40 +02:00
casey bianco-davis
8f386cd308 GPv3: Edit Mode: "Scale Thickness" option
This implements the `use_scale_thickness` setting for GPv3.

Pull Request: https://projects.blender.org/blender/blender/pulls/126213
2024-08-16 19:50:34 +02:00
Jacques Lucke
ab26dc5817 Nodes: add operator to get node width from parent
This operator sets the new default group node width (from e842966c5e) based on
the parent group node. This makes it easier to initialize the value. Without
this, one had to create and delete the group node potentially many times to find
a good default width.

Pull Request: https://projects.blender.org/blender/blender/pulls/126239
2024-08-15 17:54:56 +02:00
YimingWu
4f4add5406 Fix #125426: Update paths in animation when renaming IDProperty
Previously when renaming an IDProperty the existing paths in the
animation/driver system isn't updated, this leads to missing animation
after renaming the property. Now `BKE_animdata_fix_paths_rename_all`
will be called so the animation system records the updated name.

Pull Request: https://projects.blender.org/blender/blender/pulls/125474
2024-08-15 13:56:17 +02:00
Campbell Barton
74fae7f943 Presets: remove poll functions that scan the file-system
The poll functions for theme & key-map preset operators used functions
documented not to be used on redraw draw and could make the interface
slow when extensions (for example) are stored on a network file-system.

While the file-system lookups are typically cached, it can still cause
occasional stuttering or hanging. In general scanning the file-system
on poll should be avoided.
2024-08-15 16:06:17 +10:00
Campbell Barton
9e09351b5b Fix active theme behavior when adding/removing themes
Regression in [0] which displays the filename for the active
theme but still used the label internally.

This meant actions such as removing the theme would not always apply
to the name being displayed.

- Adding a new theme was not setting it active.
- Detecting if a theme was built-in used the run-time label as a lookup.
- Theme removal first require it to be re-selected.

[0]: 0bb6317035
2024-08-15 16:06:13 +10:00
Campbell Barton
9f931ee3d2 Presets: consider presets within the extensions repo to be "built-in"
It was possible to remove a preset defined within an extension,
the only way to restore it was to uninstall & re-install the extension.
2024-08-15 16:06:11 +10:00
Pratik Borhade
8e771104d8 GPv3: Cursor panel not usable in paint modes
This is due to failing poll function. Use correct tool setting pointer
based on the active mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/126279
2024-08-14 13:26:00 +02:00
Pratik Borhade
7bfdc6dfea GPv3: Invert weight operator
Port gp legacy "invert weight" operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/126275
2024-08-14 08:55:24 +02:00
Omar Emara
94d3b764e7 Geometry Nodes: Implement Gabor noise node
This patch ports the Gabor noise shader texture node into Geometry
Nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/125718
2024-08-14 08:48:17 +02:00
Hans Goudey
be53bd079f Cleanup: Formatting 2024-08-12 09:47:02 -04:00