Original script from Sylvio Sell [0] has "Blender Foundation" listed
as copyright holder. In general template scripts are examples
that users can use as a reference without the copyright applying to
their work.
[0]: http://maitag.de/~semmi/blender/lyapunov/osl/lyapunov.osl
Adds a new "Ui Asset Shelf" template to the script editor, demonstrating
how scripts can register own asset shelves. The asset shelf is designed
as a new standard UI element that add-ons, application templates and the
like can use, so this is useful. It's also useful as a quick way to test
and customize the asset shelf.
The script is only available in the UI if the "Asset Shelf" experimental
feature is enabled in the Preferences.
With the "Extended Asset Browser" and "Asset Shelf" experimental
features enabled, an asset shelf will now be displayed in sculpt mode.
This is useful for testing and development for the brush assets project,
see #101895.
Approved as part of #104831, then split off as separate commit.
The previous commit introduced all the basic bits and pieces necessary
to support asset shelves as experimental feature, but didn't actually
add support for any specific editor. With this commit asset shelves can
be registered in 3D Views, which should soon be used by the Pose Library
add-on to replace its previous UI in the sidebar (see
blender/blender-addons#104546). Note that until then, there will still be no
actual asset shelf to display.
Also adds:
- Toggle to hide/unhide the asset shelf under "View" -> "Asset Shelf"
- 3D View theme settings for the asset shelf regions.
None of the changes are visible if the experimental option for the asset
shelf is not enabled.
Approved as part of #104831, then split off as separate commit.
Pull Request: #110767
No user visible changes expected, except of new experimental feature
option.
------------------------------------------------------------------------------
This introduces asset shelves as a new standard UI element for accessing
assets. Based on the current context (like the active mode and/or tool), they
can provide assets for specific workflows/tasks. As such they are more limited
in functionality than the asset browser, but a lot more efficient for certain
tasks.
The asset shelf is developed as part of the brush assets project (see #101895),
but is also meant to replace the current pose library UI.
Support for asset shelves can quite easily be added to different editor types,
the following commit will add support for the 3D View. If an editor type
supports asset shelves, add-ons can chose to register an asset shelf type for
an editor with just a few lines of Python.
It should be possible to entirely remove `UILayout.asset_view_template()` once
asset shelves are non-experimental.
Some changes are to be expected still, see #107881.
Task: #102879
Brush asset workflow blog post: https://code.blender.org/2022/12/brush-assets-workflow/
Initial technical documentation: https://developer.blender.org/docs/asset_system/user_interface/asset_shelf/
Pull Request: #104831
"Tool" is a more friendly word with mostly the same meaning within
Blender. Eventually it should be possible to create active tools with
node groups anyway, so the distinction isn't even helpful.
See #101778
Implement capture point bias. This offsets the capture
points to reduce the amount bad capture locations (i.e.:
inside objects, near walls etc...).
Two new parameters are added:
- Capture Surface Bias: Ensure a minimum distance between
capture points and surrounding geometry. This is expressed as the
relative distance between two capture point. Requires re-bake
to take effect.
- Capture Escape Bias: Moves capture points enclosed inside
objects above the nearest surface. This bias defines how far a
capture point can be moved for escaping the object. This is
expressed as the relative distance between two capture point.
Requires re-bake to take effect.
This is called virtual offset in the reference material.
A quick prepass runs before the baking to offset the samples away
from any surface that could potentially make bad samples.
In order to speedup the process, we create cluster list of surfels
near each irradiance grid point. This allow access to neighboring
surfels that can contribute to the virtual offset which should
never be more than half a cell wide.
Pull Request: https://projects.blender.org/blender/blender/pulls/110355
Implement invalid sample points filling. Improves invalid regions
but introduce light leak.
Grid sample points are considered invalid if they have a ratio of
front-face ray hit under the given threshold. This is a post-processing
pass on the baked lighting that fills dark regions produced by
invalid sample location (e.g.: inside walls) with valid neighbor
samples data.
Two new parameters are added:
- Dilation Threshold: Validity threshold under which grid samples are
considered invalid. Invalid samples will gather valid lighting data
from valid neighbors inside the dilation radius.
- Dilation Radius: Radius of the dilation process. Expressed in grid
sample distance.
The validity of each point is progressively refined just like the
lighting data during the baking process.
The dilation process is implemented as a post-processing pass during
the loading of the grid data into the irradiance atlas. This allows
live tweaking the dilation parameters.
Pull Request: https://projects.blender.org/blender/blender/pulls/110386
This is a full rewrite of the raytracing denoise pipeline. It uses the
same principle as before but now uses compute shaders for every stages
and a tile base approach. More aggressive filtering is needed since we
are moving towards having no prefiltered screen radiance buffer. Thus
we introduce a temporal denoise and a bilateral denoise stage to the
denoising. These are optionnal and can be disabled.
Note that this patch does not include any tracing part and only samples
the reflection probes. It is focused on denoising only. Tracing will
come in another PR.
The motivation for this is that having hardware raytracing support
means we can't prefilter the radiance in screen space so we have to
have better denoising. Also this means we can have better surface
appearance with support for other BxDF model than GGX. Also GGX support
is improved.
Technically, the new denoising fixes some implementation mistake the
old pipeline did. It separates all 3 stages (spatial, temporal,
bilateral) and use random sampling for all stages hoping to create
a noisy enough (but still stable) output so that the TAA soaks the
remaining noise. However that's not always the case. Depending on the
nature of the scene, the input can be very high frequency and might
create lots of flickering. That why another solution needs to be found
for the higher roughness material as denoising them becomes expensive
and low quality.
Pull Request: https://projects.blender.org/blender/blender/pulls/110117
Adaptation of the operator `ACTION_OT_keyframe_insert` to take into account grease pencil channels.
Grease pencil keyframes can now be inserted in blank mode, or in additive mode (duplicate the current frame in the new keyframe).
Two API functions were added :
* `add_duplicate_drawings` which copies the data of a drawing to creates a duplicate, and
* `insert_duplicate_frame` which creates a duplicate frame of an existing one either by copy or instance.
The additive mode option is also added to the UI.
The Layer method `frame_key_at` previously private was set to public.
Pull Request: https://projects.blender.org/blender/blender/pulls/110649
The Repeat Zone operator from the Geometry nodes Add Node -> Utilities
menu was not translated because it used the "Operator" translation
context, instead of the default context.
Since the function displaying the menu item, `add_repeat_zone()`, is
only ever called from the Utilities menu, and the label is specified
there as "Repeat Zone", we know in advance that it will have this
name.
For the same reason, this commit also simplifies the function which
creates the menu entry for simulation zones. This function is also
only called from the Simulation menu with a specific label using the
default context, so it should also use this one.
Pull Request: https://projects.blender.org/blender/blender/pulls/110644
The presets for external text editors introduced in e16ec95a16 are
stored in Python files. The names of these files are used to generate
the UI name, and are case-sensitive.
They are currently lower case, but should be title case like other
presets. This commit renames the files so they are title case.
Pull Request: https://projects.blender.org/blender/blender/pulls/110642
Use instead of "'%s'" to avoid problems in the unlikely instance of
the strings containing characters that need escaping.
Also use a ternary operator instead of indexing a tuple.
Prefer the more generic exception type as it's possible exceptions
derive from this and not "Exception".
Also use the name 'ex' for exceptions instead of 'e'.
Note that the previous commit [0] added a workaround for MMB-Emulation,
which should have been a separate commit.
(Ctrl-Shift-LMB for weight paint selection).
Extended the code comment for this.
[0]: cfffd813c1
Dynamic topology drawing can now use the smooth status saved in each
edge. Because of that, the "Smooth Shading" draw option is unnecessary
and just adds confusion because of inconsistency between dynamic
topology drawing and other modes.
Fixes#109191
Pull Request: https://projects.blender.org/blender/blender/pulls/110548
In Walk Navigation mode with gravity enabled, the jump height is
often inappropriate for the scene that you are viewing. This is a small
feature that lets you change the jump height in modal walk navigation
as you go, i.e. if there are varying elevation changes across the scene.
Pressing '.' increases and ',' decreases the jump height (because these keys
are the same for most layouts).
Pull Request: https://projects.blender.org/blender/blender/pulls/109827
Use Alt-LMB for selecting in vertex/weight paint modes for vertex, face
& pose bone selection - replacing Ctrl which was previously used for
selecting. This is needed so Ctrl & Shift can be consistent between all
paint modes.
Loop selection is available With Alt-LMB but only when selection tools
are active (with the LMB select key-map). They're always available with
the RMB select key-map.
This also resolves a conflict where box & lasso select tools couldn't
be used to de-select (via Ctrl) because the Ctrl-LMB was also clearing
the selection.
Part of #105298 design task.
Selection modes are typically assigned to the number keys.
These are some updates for more consistency among painting and grease
pencil modes:
- Paint Mask = `M` changed to `1`.
- Vertex Selection = `V` changed to `2`.
- GP: Point Selection = `1`.
- GP: Stroke Selection = `2`.
- GP: Segment Selection = `3`.
Design task: #105298
Ref !108714.
## Overview
Much like node groups, or a VSE clip, when we duplicate we actually want a _linked_ duplicate. This PR updates the NLA key board for Duplicate linked to `Shift + D`, and Duplicate to `Alt + D`.
Additionally, update Tool tips to reflect duplicate vs linked duplicate.
Pull Request: https://projects.blender.org/blender/blender/pulls/110316
This implements the main aspects of changes to blendfile compatibility
as designed in #109151:
* Blender files which file minversion is newer than current Blender
executable won't be loaded at all.
* Blender files which file version is newer than current Blender will
triger systematic warning to user:
* In the status info bar (lower right corner in default UI).
* When attempting to save (overwrite) them.
This means that the file minversion becomes a hard limit, and not a
soft, warning-only as it used to be. Further more, forward compatibility
warning is now systematic (instead of depending on file minversion),
and more visible for users.
See also https://wiki.blender.org/wiki/Process/Compatibility_Handling
for details over the new policy.
Technically:
* Opening any file with a minversion newer than current Blender file one
now triggers an early abort, with an error message reported to the user.
This is handled by a new utils called from `blo_decode_and_check`.
* Any file newer than current Blender version sets a new
`has_forward_compatibility_issues` flag in Main struct at read time.
* Status bar info area is turned into a template, which uses this flag
to display special warning UI and tooltip when set.
* A new confirmation popup appears when user tries to save (overwrite)
such a 'newer' blendfile, stating potential loos of data, and
proposing by default to 'save as' instead.
* The 'quit unsaved' popup has also been updated to 'save as' instead of
'save' when the edited file is has potential forward compitibility
issues.
Part of #109151 (PR !110109).
"Proportional Editing" is the term officially used by the Blender
community to describe this specific feature.
Also, "Proportional Editing" seems to be more descriptive than
"Proportional Influence", as it emphasizes the ability to
proportionally edit the areas around the selection.
Loading a blend file with unknown regions would raise an exception.
Also remove exception where channels were skipped when the attribute
isn't found as it's no longer needed.
Binding a key to weight-paint with mode set (invert/smooth for e.g.)
caused regular weight painting to reuse this setting.
Don't reuse paint "mode" between strokes.
This also allows the default to be removed from the key-map.
- Use km_edit_ prefix for edit-modes.
- Rename "curve" to "curve_legacy".
- Consistent naming for naming for vertex/face selection mask.
- Group object/grease-pencil/paint/edit mode key-map functions together.
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.
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>
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
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