Commit Graph

369 Commits

Author SHA1 Message Date
Campbell Barton
88dd1d4408 Keymap: rename "Toolbar Toggle" to "Region Toggle"
The toolbar is only one kind of region that can be toggled.
2023-07-26 21:52:37 +10:00
Campbell Barton
ab7161e41a Keymap: add experimental "Toolbar Toggle Pie" preference
When pressing N-key a pie menu is shown which can toggle regions,
typically the toolbar, sidebar and the header.

This supports toggling regions without having to add a separate shortcut
for each one.

The pie menu locations selected based on the region alignment.

See #107785.
2023-07-26 15:24:30 +10:00
Campbell Barton
d7558a243c Keymap: avoid 3D View transform inheritance
Move shared transform operations out of the 3D viewport key-map into a
template function which each modes key-map uses.

This allows sculpt mode to key-bindings which where bound to transform
actions that don't make sense in sculpt mode.

Note that this enables `alt_navigation` for some 2D viewport actions
where it's not yet used.

Based on design task: #105298.

PR !110019.

Co-authored-by: Julien Kaspar <JulienKaspar>
2023-07-25 21:22:09 +10:00
Campbell Barton
5f764b361c Fix 'bl_keymap_validate' test
Exporting & importing the key-map changed results,
resolve by using float literals.
2023-07-25 20:51:33 +10:00
Damien Picard
39a94e370c I18n: restore unit messages after c++ migration broke extraction
The units defined in blenkernel/intern/unit.c were extracted using a
regex which contained `NULL`. Commit 129f78eee7 converted this file to
c++, and these `NULL` were replaced with `nullptr`, breaking the
regex.

This commit changes the regex to `nullptr` as well to restore the
translations.

Pull Request: https://projects.blender.org/blender/blender/pulls/110420
2023-07-24 17:01:41 +02:00
Germano Cavalcante
017d4912b2 Transform: Use alternative hotkeys for Transform Navigation
In order to avoid navigation hotkey conflicts during transform
operations, this commit implements the "Transform Navigation with Alt"
option.

This option is enabled by default and makes navigation hotkeys require
the `Alt` key during a transforming in the 3D View.

Pull Request: https://projects.blender.org/blender/blender/pulls/109754
2023-07-24 15:51:58 +02:00
Lukas Stockner
b220ec27d7 Cycles: Update Velvet BSDF to Sheen BSDF with new Microfiber sheen model
This patch extends the old Velvet BSDF node with a new shading model,
and renames it to Sheen BSDF accordingly.

The old model is still available, but new nodes now default to the
"Microfiber" model, which is an implementation of
https://tizianzeltner.com/projects/Zeltner2022Practical/.

Pull Request: https://projects.blender.org/blender/blender/pulls/108869
2023-07-24 15:36:36 +02:00
Damien Picard
6f1f2b9830 I18n: do not translate one message already translated with tip_()
The "Name Collisions:" UI message does not need to be translated as
part of the label, as it is already through an explicit call to
tip_().

Pull Request: https://projects.blender.org/blender/blender/pulls/110319
2023-07-24 15:13:30 +02:00
Dalai Felinto
b853f21562 Docs: Update RNA to user manual url map 2023-07-21 15:01:05 +02:00
Dalai Felinto
a51b38dec5 Cleanup: make format 2023-07-21 14:23:49 +02:00
Clément Foucault
7158844424 EEVEE-Next: Irradiance Cache: Add manual trilinear weights
This replaces the trilinear interpolation with manually
placed samples to avoid most light leak.

Add two new parameters to bias the sampling position:
- Normal bias
- View bias

Move the irradiance smoothing parameter per grid.

Pull Request: https://projects.blender.org/blender/blender/pulls/110312
2023-07-20 19:03:08 +02:00
Falk David
7cd5e25743 GPv3: Stroke Simplify operator
This adds the `stroke_simplify` operator.
Implements a version of the Ramer Douglas Peucker algorithm for marking the points to delete.

Pull Request: https://projects.blender.org/blender/blender/pulls/110266
2023-07-20 15:31:51 +02:00
Amelie
924aa0ef07 GPv3: Hard Eraser tool
Implementation of the hard eraser for grease pencil.
The tool "cuts" the strokes, meaning it removes points that are inside the eraser's radius, while adding points at intersections between the eraser and the strokes.

Note that this does not implement the "Stroke" and "Dissolve" mode of the eraser yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/110063
2023-07-20 13:56:23 +02:00
Bastien Montagne
27616ddad3 I18N: Utils module: remove unrelated logic from utils generating languages menu file.
Writing this file in specific places is not the responsibility of that
utils module code. this is for caller's logic to handle (in this case,
mainly the update UI translations add-on).
2023-07-20 11:31:33 +02:00
Christoph Lendenfeld
44fb4fa46a Animation: Merge Push/Relax Rest Pose operators
This patch merges the two operators `Push Pose from Rest Pose`
and `Relax Pose from Rest Pose` into one
new operator `Blend Pose with Rest Pose`

The operator has a default range of -1/1 with a default of 0.
The functionality of `Relax Pose from Rest Pose` is on the positive axis
and `Push Pose from Rest Pose` on the negative.
This is a breaking change so ideal for 4.0

Pull Request: https://projects.blender.org/blender/blender/pulls/108309
2023-07-20 09:27:06 +02:00
casey bianco-davis
1629eb61a1 GPv3: UI and RNA for layer opacity
Adds the UI for layer opacity in the layer panel.

Currently layer blending rendering is not implemented, so the last layer's opacity will affect all of the layers.

Pull Request: https://projects.blender.org/blender/blender/pulls/110177
2023-07-19 17:34:05 +02:00
Clément Foucault
cdb8a8929c GHOST: Delete Mac OpenGL support
The maximum OpenGL versions supported on mac
doesn't meet the minimum required version (>=4.3) anymore.

This removes all the OpenGL paths in GHOST
Cocoa backend and from the drop down menu in
the user preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/110185
2023-07-19 14:16:03 +02:00
nutti
308da08221 Docs: Fix layout of bpy.types.Object Python API documents
Fix the layout of Python API documents of bpy.types.Object.
2023-07-18 23:32:00 +10:00
Jeroen Bakker
6a3c865129 Cleanup: Make format 2023-07-18 12:04:13 +02:00
Amelie
d9277b19f3 GPv3: Stroke smoothing operator
Implementation of the smoothing operator for grease pencil strokes.
Works on `CurvesGeometry` position and other attributes, such as radius.

Based on the gaussian blur like algorithm in `BKE_gpencil_stroke_smooth_point` by Henrik Dick.

Pull Request: https://projects.blender.org/blender/blender/pulls/109635
2023-07-18 11:54:34 +02:00
Jeroen Bakker
03ead30027 Eevee-next: Reflective Light Baking
This PR introduces baking reflective light from light probes. Light probes
are baked on the fly when the light probe data has changed. It doesn't update
directly when other scene data is changed in the viewport.

When doing image rendering the light probes are updated on each frame.

Currently the world probe and closest reflection probe are composited
together in shader. This allows different resolutions. We expect that we
eventually composite it before usage. This would improve the performance.
Unclear if we would support both compositing options eventually.

Pull Request: https://projects.blender.org/blender/blender/pulls/109909
2023-07-14 11:22:18 +02:00
Christoph Lendenfeld
7acd6e61ab Animation: Butterworth Smoothing filter
Implements the Butterworth Filter
(https://en.wikipedia.org/wiki/Butterworth_filter) for smoothing FCurves.

This filter is ideal for smoothing dense data, like motion capture recordings.
It has the advantage of keeping the shape of the curve
intact while reducing minimal fluctuations.
The disadvantage is the impulse response has a twang,
meaning extreme spikes cause fluctuations to either side.

The implementation is based on the GPL code found here:
https://exstrom.com/journal/sigproc/dsigproc.html

In order to avoid phase shifting, the filter is run forward and backward,
effectively doubling the filter order.

The Redo panel offers the following options

* Frequency Cutoff: 0-n value, where 0 means it cuts everything
so the curve will become straight, the max value is the Nyquist frequency
and depends on the frame rate and the "Samples per Frame" option

* Filter Order: Higher values mean the frequency cutoff is steeper

* Samples per Frame: Before the filter is applied, the curve is resampled
at this interval to avoid errors when there are uneven spaces between frames.
If the keys are on subframes, e.g. a 60fps file in a 30fps scene, increase this value to 2

* Blend: 0-1 value to blend between the original curve and the filter result

* Blend In/Out: The number of frames at the start and end for which
to blend between the filtered and unfiltered curve.
This can help reduce any resulting jumps in the animation at the selection border

The operator can be called from the Key menu. (Key->Smooth->Butterworth Smooth)

Pull Request: https://projects.blender.org/blender/blender/pulls/106952
2023-07-13 09:10:42 +02:00
Colin Marmond
1ebdd2d9cf Nodes: Move preview images to an overlay
Move the node previews to the overlay region, atop each node.
It allows nodes to keep the same size when the preview is toggled,
which is more convenient for large nodes and large nodetrees.

The preview has to be drawn from `node_draw_extra_info_panel`
because there could be overlapping between info text and the preview.
When the node is out of the view, it also has to make sure that the
preview is also out of the view before exiting the draw function.

Pull Request: https://projects.blender.org/blender/blender/pulls/108001
2023-07-12 16:14:12 +02:00
Dalai Felinto
157f1dfc81 Cleanup: make format 2023-07-12 11:55:18 +02:00
Sietse Brouwer
64887c80a2 GPv3: Convert selection domain on curves when selection mode changes
When the selection mode in the Grease Pencil tool settings changes,
the selection domain of all curves in the active Grease Pencil object
has to change.
This PR handles that conversion. Point selections are converted to
curve selection and vice versa.

Note: this PR only takes care of selection modes 'Point' and 'Stroke'.
'Segment' mode is handled in a separate PR (#109221).

Pull Request: https://projects.blender.org/blender/blender/pulls/109964
2023-07-12 10:22:46 +02:00
Matias Caamaño
58b34917e5 Fix #109086: Center Safe Areas missing parameter
Add the "Center Action Safe Margin" that was missing in VSE UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/109944
2023-07-12 08:28:30 +02:00
Jacques Lucke
3d73b71a97 Geometry Nodes: new Repeat Zone
This adds support for running a set of nodes repeatedly. The number
of iterations can be controlled dynamically as an input of the repeat
zone. The repeat zone can be added in via the search or from the
Add > Utilities menu.

The main use case is to replace long repetitive node chains with a more
flexible alternative. Technically, repeat zones can also be used for
many other use cases. However, due to their serial nature, performance
is very  sub-optimal when they are used to solve problems that could
be processed in parallel. Better solutions for such use cases will
be worked on separately.

Repeat zones are similar to simulation zones. The major difference is
that they have no concept of time and are always evaluated entirely in
the current frame, while in simulations only a single iteration is
evaluated per frame.

Stopping the repetition early using a dynamic condition is not yet
supported. "Break" functionality can be implemented manually using
Switch nodes in the  loop for now. It's likely that this functionality
will be built into the repeat zone in the future.
For now, things are kept more simple.

Remaining Todos after this first version:
* Improve socket inspection and viewer node support. Currently, only
  the first iteration is taken into account for socket inspection
  and the viewer.
* Make loop evaluation more lazy. Currently, the evaluation is eager,
  meaning that it evaluates some nodes even though their output may not
  be required.

Pull Request: https://projects.blender.org/blender/blender/pulls/109164
2023-07-11 22:36:10 +02:00
Hans Goudey
c8e0c69c73 Geometry Nodes: Hide node operators behind experimental option for now
Until the traits (#109526) and the redo panel (#109975) are added,
this is non-functional and confusing enough that it's worth hiding.
2023-07-11 11:43:40 -04:00
Jeroen Bakker
d1884e01c8 Cleanup: make format 2023-07-10 15:52:10 +02:00
Bastien Montagne
739146bf33 UI Translations and messages fixes. 2023-07-10 14:34:41 +02:00
Joseph Eagar
351034891e Sculpt: Cleanup duplicate code in clay strips brush
Clay strips was using it's own brush local matrix,
which wasn't quite compatible with texture matrices.
This could lead to brush textures not lining up with
the stroke dabs.

There was also a bug where the stroke was starting
20 pixels into the stroke, which is much higher than
necassary to derive the initial rake angle.

Notes:
* The clay strips brush now uses SCULPT_cube_tip_init
  to calculate the local brush matrix.
* SCULPT_cube_tip_init now accepts custom brush location
  and radius arguments.
* The mouse sample preroll used to calculate initial brush
  rotation angle is now smaller than the update interval.
* Clay strips now supports tip_scale_x, which has also
  been added to DNA defaults.
2023-07-10 05:01:58 -07:00
Jeroen Bakker
fa4def46c8 Cleanup: Remove Unused use_ambient_occusion Property
`use_ambient_occlusion` is a legacy property and not
connected to anything. The clip editor still write
to it for enabling the ambient occlusion renderpass.

This change will remove the legaccy option and
won't enable ambient occlusion pass anymore due
to visual and performance impact.

Pull Request: https://projects.blender.org/blender/blender/pulls/109783
2023-07-10 11:18:22 +02:00
rBrenick
18efd11369 UI: Grey out ShapeKey list entry on mute
At a glance, it can be hard to see if a Shape Key has been muted or not.
This change greys out all the UI elements, instead of just the current value number.
All the functionality still works the same, purely a visual change.

Pull Request: https://projects.blender.org/blender/blender/pulls/109857
2023-07-10 10:20:09 +02:00
Jeroen Bakker
17a58f7db0 Eevee-next: Reflection Probe Packing
All probes (including the world background probe) are stored in a single texture. Each probe
can be of any resolution as long as it is a power of 2 and not larger than 2048. So valid options
are (2048x2048, 1024x1024, 512x512, etc).

Each probe can be stored in their own resolution and can be set by the user.
> NOTE: Eventually we would like to add automatic resolution selection.

The probes are packed in an 2d texture array with the dimension of 2048*2048. The number of
layers depends on the actual needed layers. If more layers are needed the texture will be recreated.
This can happen when a new reflection probe is added, or an existing reflection probe is made visible
to the scene or its resolution is changed.

### Octahedral mapping

Probes are rendered into a cubemap. To reduce memory needs and improve sampling performance the cubemap
is stored in octahedral mapping space. This is done in `eevee_reflection_probe_remap_comp.glsl`.

The regular octahedral mapping has been extended to fix leakages at the edges of the texture
and to be able to be used on an atlas texture and by sampling the texture once.

To reduce sampling cost and improve the quality we add an border around the
octahedral map and extend the octahedral coordinates. This also allows us to
generate lower resolution mipmaps of the atlas texture using 2x2 box filtering
from a higher resolution.

### Subdivisions and areas

Probes data are stored besides the texture. The data is used to find out where the probe is stored
in the texture. It is also used to find free space to store new probes.

This approach ensures that we can be flexible at storing probes with different
resolutions on the same layer. Lets see an example how that works

Code-wise this is implemented by `ProbeLocationFinder`. ProbeLocationFinder can view a texture in a
given subdivision level and mark areas that are covered by probes. When finding a free spot it returns
the first empty area.

**Notes**

* Currently the cubemap is rendered with a fixed resolution and mipmaps are generated in order to
  increase the quality of the atlas. Eventually we should use dynamic resolution and no mipmaps.
  This will be done as part of the light probe baking change.

Pull Request: https://projects.blender.org/blender/blender/pulls/109688
2023-07-07 15:37:26 +02:00
Sybren A. Stüvel
6ad87a5f65 Anim: remove trailing period from description
Remove the trailing period from the 'Disable constraint without moving'
operator.

No functional changes.
2023-07-06 11:12:24 +02:00
Chris Blackbourn
374935fb56 Fix #109605: Add correct_aspect to uv align rotation operator
The "Align Rotation" operator in the UV editor was producing
unexpected results if an image was displayed with non-square aspect
ratio. This change adds the "Correct Aspect" option to the operator.
2023-07-06 16:14:10 +12:00
Chris Blackbourn
7b3e1cbb96 Fix #109674: UV: Follow Active Quads uses face selection in 3d editor
To ensure consistency between the UV unwrapping operators, the
`UV > Follow Active Quads` operator will now use 3D selection when
called from the 3D editor, and UV selection when called from the
UV editor.
2023-07-06 14:35:41 +12:00
Brecht Van Lommel
57d85b32a9 Lights: remove unused Blender Internal properties
For falloff, attenuation and shadow buffers.

Pull Request: https://projects.blender.org/blender/blender/pulls/109738
2023-07-05 18:54:36 +02:00
Germano Cavalcante
1a44120d71 Error importing keymaps prior to version 4.0.3
Caused by 3010f1233b.

The keymap format was incorrect because `extend` was being used instead
of `append`.
2023-07-04 20:19:48 -03:00
Germano Cavalcante
c0d230e0b8 Revert "Transform: Allow navigation by default"
This reverts commit d53862351d.

After conducting tests with artists at the studio, it was observed that
altering the Transform Modal Maps caused significant disruption due to
the heavy reliance on the "Proportional Editing" and "Automatic
Constraint" features.

Considering this, it is now deemed more beneficial to provide users
with the choice of adapting their muscle memory to the new changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/109660
2023-07-04 14:53:39 +02:00
Jeroen Bakker
8f00659fb7 Cleanup: make format 2023-07-04 07:51:11 +02:00
Chris Blackbourn
4f6ce68500 UV: Add "Invert Pins" to the menu in the uv editor
Thanks Robert Rioux for the suggestion.

Pull Request: https://projects.blender.org/blender/blender/pulls/109187
2023-07-04 02:46:23 +02:00
Falk David
3d99d05f00 GPv3: Add separate paint mode
This patch adds a separate paint mode for Grease Pencil 3.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/109453
2023-07-03 16:34:30 +02:00
Jeroen Bakker
590f3582c9 Eevee-next: Lookdev HDRI Switcher
This PR adds support to override the world with the HDRI of the
viewport.

Blurring of the background and camera based rotation isn't supported.
Switching the HDRI would still use the world diffuse light as that is
baked into the irradiance cache.

These issues have been added to #109646

![image](/attachments/2613adff-064a-4f81-8bdd-f687ab8ffcfb)

Pull Request: https://projects.blender.org/blender/blender/pulls/109548
2023-07-03 15:34:11 +02:00
Utsav Singh
bbcdf88f82 Fix #108960: Replace archived link from custom nodes template
Replace archived link with working blender api docs link related
to the same content (properties and custom-properties)

Pull Request: https://projects.blender.org/blender/blender/pulls/109103
2023-07-03 12:21:06 +02:00
Campbell Barton
1c104b16dd Cleanup: use set.discard instead of a __contains__ check before remove() 2023-07-02 19:54:27 +10:00
Campbell Barton
ffab21a3ef Cleanup: format 2023-07-02 19:54:26 +10:00
Miguel Pozo
221f985129 EEVEE Next: Ambient Occlusion Node and RenderPass
Port Ambient Occlusion to EEVEE Next.

Add support for the AO Node and the AO RenderPass.
AO shading integration is still missing.

This also fixes the Shadow RenderPass.

Pull Request: https://projects.blender.org/blender/blender/pulls/108398
2023-06-30 19:37:30 +02:00
Hans Goudey
6eea4acc62 Fix #109547: Error creating geometry node group from property editor
Mistake in e4cc91a611 that assumed
the operator was always run from the node editor.
2023-06-30 11:55:18 -04:00
Hans Goudey
267d449a50 Spreadsheet: Support selection filter for point cloud objects
Similar to curves, the ".selection" attribute is used to store selection.
Selection isn't visualized in the viewport yet, but this should be added
at some point anywya. See f89b32382a.
2023-06-29 12:57:24 -04:00