This adds a new exprimental option to automatically convert GP legacy
data to GPv3 one.
It supports also linking and appending cases. Conversion also happens
when opening a file linking GP legacy data saved by an older .blendfile.
Pull Request: https://projects.blender.org/blender/blender/pulls/118705
Replace: `{BLENDER_RESOURCE_PATH_USER}/extensions`
With: `{BLENDER_USER_EXTENSIONS}`
This follows BLENDER_USER_CONFIG & BLENDER_USER_SCRIPTS conventions.
Reading the environment variable and accessible via
`bpy.utils.user_resource('SCRIPTS')`
Experimental flag for "Extensions Development Utilities" that can be
enabled separately from "Extensions". Note this PR does not enable the
use of this flag (coming later) as uses are in addons-contrib. This
flag is requested in #119521
Pull Request: https://projects.blender.org/blender/blender/pulls/119562
Implements the design from #116067.
The socket type is called "Matrix" but it is often referred to as "Transform"
when that's what it is semantically. The attribute type is "4x4 Matrix" since
that's a lower level choice. Currently matrix sockets are always passed
around internally as `float4x4`, but that can be optimized in the future
when smaller types would give the same behavior.
A new "Matrix" utilities category has the following set of initial nodes"
- **Combine Transform**
- **Separate Transform**
- **Multiply Matrices**
- **Transform Direction**
- **Transform Vector**
- **Invert Matrix**
- **Transpose Matrix**
The nodes and socket type are behind an experimental flag for now,
which will give us time to make sure it's the right set of initial nodes.
The viewer node overlay doesn't support matrices-- they aren't supported
for rendering in general. They also aren't supported in the modifier interface
currently. But they are supported in the spreadsheet, where the value is
displayed in a tooltip.
Pull Request: https://projects.blender.org/blender/blender/pulls/116166
Replace: {BLENDER_RESOURCE_PATH_USER}/scripts/extensions
With: {BLENDER_RESOURCE_PATH_USER}/extensions
This makes more sense as not all extensions are scripts.
- Adding new repositories now differentiates between "Online" & "Local"
where adding a local repository doesn't prompt for a URL.
- Support removing repositories and their files (uses confirmation
defaulting to "Cancel" to avoid accidents).
- Show an error icon next to repositories that have invalid settings,
these repositories are now ignored until the settings are corrected,
required fields are highlighted red when they're unset & required.
- Rename "directory" to "custom_directory" since an automatic path is
used when not set - created in the users scripts directory.
- Use toggles for custom-directory & remote URL instead of relying on
the value to be left an empty string for alternative behavior.
This is needed so extensions repositories can reference
user-script directories without them having hard-coded paths
which will be invalid when upgrading a Blender version.
Splits the flag `..._FLAG_INSERTNEEDED` between autokey and
manual keying. The fact that this flag was shared between the two
systems has been the cause of issues in the past. It wouldn't
let you insert a keyframe even though you explicitly used an operator
to do so.
In order to be clearer what options are used where, the user preferences
have been reordered.
By default "Only Insert Needed" will be enabled for auto-keying, but not for manual keying.
The versioning code will enable both if it was enabled previously.
# Code side changes
The keying system has flags that define the behavior
when keys are inserted. Some of those flags were shared
between keying and auto-keying. Some were only used for
auto-keying.
To clarify that, prefix flags that used exclusively in one or the other
system with `AUTOKEY`/`MANUALKEY`
Also the flag name on the user preferences and the tool settings was renamed.
Previously it was called `autokey_flag`. To indicated that it is not only used
for autokeying, rename it `keying_flag`.
Fixes: #73773
Pull Request: https://projects.blender.org/blender/blender/pulls/115525
Translation of the UI is currently split into 3 preferences:
interface, tooltips, and new data. The distinction between interface
and tooltips is currently unclear as tooltips also include a lot of
messages not displayed in the actual tooltips on mouse hover.
These include reports to the Info Editor, information in editor
headers and footers, and statuses in panels.
In order to limit the use of `TIP_()` to actual tooltips, this commit
introduces a new preference for this extra information: "Reports".
New translation macros are introduced: `RPT_()` and `CTX_RPT_()`, as
well as their equivalent for the Python API, `pgettext_rpt_()`, to be
imported as `rpt_()`.
Pull Request: https://projects.blender.org/blender/blender/pulls/116804
This was added at the start of the project, as a way for the source
library to control what would be overridable by the user of the data
(production files).
The implementation never went beyond the experimental area, and only
exposed in the python API then. The idea has been superseeded by the
'cherry-pick' design, so there is no point in keeping this code any
longer.
No functional changes.
Rename the `eAutokey_Flag` to `eKeyInsert_Flag`
to indicate that it is not only used for auto keying.
Also rename the enum items to better reflect what they are used for.
Pull Request: https://projects.blender.org/blender/blender/pulls/115295
When animators want to key something in the viewport,
the code needs to know *which properties* should be keyed of that selected thing.
So far that was done with keying sets, and a pop-up that let's
you choose the keying set to use. You can get rid of the popup by
choosing a keying set ahead of time. But that is also not always desirable.
That pop-up is quite confusing and gives way too many options.
To simplify this process this PR adds a User Preference option to choose one or more of:
* Location
* Rotation
* Scale
* Rotation Mode
* Custom Properties
Now whenever the `I` key is pressed in the viewport,
and no keying set is enabled, it reads the preferences for which channels to insert.
# User Facing changes
* The popup will not be shown when pressing the hotkey,
but you can still explicitly use keying sets by going to the menu
* Which channels are keyed is defined by a User Preference setting under animation
* when a keying set is used explicitly, the User Preference settings are ignored
Part of #113278
Pull Request: https://projects.blender.org/blender/blender/pulls/113504
Changes to edit mode mesh overlays, use hue shift instead of color
fading/darkening for selection mode visual differentiation, and some
theme changes to improve the display of mesh edges and faces with good
selection visibility.
- Removed "edge" toggle from edit mode overlays panel.
- No longer halves the edge and face alpha depending on selection mode.
Half the face alpha in wire-frame mode. For better visibility on most
themes.
Ref !111431
Separate user configuration of subpixel antialiasing from the hinting
options. For example, this allows turning this on while hinting is
"None", or off when hinting is "Full".
Pull Request: https://projects.blender.org/blender/blender/pulls/113027
The goal is to make the search faster to use by dynamically adapting to the user.
This can be achieved using the simple but common approach of showing recently
selected items at the top. Note, that the "matching score" between the query and
each search item still has precedence when determining the order. So the last used
item is only at the top, if there is no other search item that matches the query better.
Besides making the search generally faster to use, my hope is that this can also
reduce the need for manually weighting search items in some places. This is
because while the ordering might not be perfect the first time, it will always be
once the user selected the element that should be at the top once.
This patch includes:
* Support for taking recent searches into account in string searching.
* Keep track of a global list of recent searches.
* Store recent searches on disk similar to recently opened files.
* A new setting in the user preferences that allows disabling the functionality.
This can be used if deterministic key strokes are required, e.g. for automated tests.
In the future this could be improved in different ways:
* Add some kind of separator in the search list to indicate which elements are at
the top because they have been used recently.
* Store the recent search items per search, instead of in a global list. This way
it could adapt to the user even better.
Pull Request: https://projects.blender.org/blender/blender/pulls/110828
`extern "C"` did not actually have an effect here since it only impacts
name mangling of functions, not structs (or other class types). Now this
can get in the way when we add C++ blocks with functions , e.g.
templates are not allowed in code with C-linkage.
Most of these were added in ad4b7741db, even though it was known that
this doesn't have any impact. Reason was because developers thought they
would have to add that to all direct and indirect includes to be able to
use a header in C++ (a common misconception). Now with most files
compiled in C++, it's obvious that this isn't the case.
Pull Request: https://projects.blender.org/blender/blender/pulls/111926
As concluded in discussion under #109439, the View Item widgets are
supposed to use List Item widget theme colors. This patch does that.
Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/111584
Move Auto-Offset toggle from Node Editor View menu
into the Editing > Node Editor section of User Preferences,
to reflect its use as a workflow option not configured
per editor or per file.
Pull Request: https://projects.blender.org/blender/blender/pulls/111589
Adds a userpref toggle for the edit mode overlays fresnel.
The edit mode fresnel is only a bit useful in edge cases, like
very dense photogrametry, and the problem is that it causes
more eye strain when modeling for many hours. And it's
benefit on shape readability is small compared to it's negative
impact on selection visibility. It makes the selection color to a
darker less saturated color instead of the theme color, which
leads to worse contrast between the selection and the mesh
or with the background, and also makes the unselected (black)
brighter, also reducing contrast. So it's off by default.
This was split up from https://projects.blender.org/blender/blender/pulls/110097
Pull Request: https://projects.blender.org/blender/blender/pulls/111494
Using a higher number of samples (enough samples to account for the last
second or two of playback for e.g.) can be useful when comparing minor
changes in overall playback speed, where the behavior of multi-threaded
operations can make the value jitter with 8 samples (default).
Using fixed-point arithmetic means the average FPS can be updated
by subtracting the oldest FPS sample before adding the new value,
instead of having to average an array of floats every draw.
Increasing the number of samples now only uses a little more memory
(20kb at most).
The error margin from using fixed-point arithmetic is under 0.5
microseconds per frame - more than enough precision for FPS display.
A commented define is included that shows the error margin when enabled.
This was hard coded to 8, which can still result in a number that
jitters making the overall FPS difficult to measure.
The default is still 8, but this is now a preference that can be
increased for values that don't jitter as much.
This makes the asset shelf available as a standard, non-experimental
feature. Currently no script makes use of it, so it will still not be
available. However the pose library will be updated to use this for its
UI instead.
Initially the asset shelf was committed as experimental feature, even
though it seemed ready for non-experimental. After double checking with
some people (Dalai and Brecht) we decided to go ahead with this.
There are still some futher changes planned, see #107881.
Support name-spaced add-ons, exposed via user configurable extension
repositories.
Directories for add-ons can be added at run-time and are name-spaced to
avoid name-collisions with Python modules or add-ons from other
repositories.
This is exposed as an experimental feature "Extension Repositories".
Details:
- A `bUserExtensionRepo` type which represents a repository which is
listed in the add-ons repository.
- `JunctionModuleHandle` class to manage a package with sub-modules
which can point to arbitrary locations.
- `bpy.app.handlers._extension_repos_update_{pre/post}` internal
callbacks run before/after changes to extension repositories,
callbacks are used to sync the changes to the Python package that
exposes these to add-ons.
- The size of an add-on name has been increased so a user-defined package
prefix can be included without enforcing shorter add-on names.
- Functionality relating to package management has been left out of this
change and will be developed separately.
Further work:
- While a repository can be renamed, enabled add-ons aren't renamed.
Eventually we might want to support this although we could also
disallow renaming repositories with add-ons enabled as the name isn't
all that significant.
- Removing a repository should remove all the add-ons located in this
repository.
- Sub-module names are currently restricted to `[A-Za-z]+[A-Za-z0-9_]*`
we might want to relax this to allow unicode characters (we might
still want to disallow `-` or any characters that would prevent
attribute access in code).
Ref !110869.
Reviewed By: brecht
First implementation of node previews in the shader node editor. Using
the same user interface as compositor node previews, most shader nodes
can now be previewed (except group in/output and material output).
This is currently still an experimental feature, as polishing of the
user experience and performance improvements are planned. These will
be easier to do as incremental changes on this implementation.
See #110353 for details on the work that remains to be done and known
limitations.
Implementation notes:
We take advantage of the `RenderResult` available as `ImBuf` images to
store a `Render` for every viewed nested node tree present in a
`SpaceNode`. The computation is initiated at the moment of drawing nodes
overlays.
One render is started for the current nodetree, having a `ViewLayer`
associated with each previewed node. We separate the previewed nodes in
two categories: the shader ones and the non-shader ones.
- For non-shader nodes, we use AOVs which highly speed up the rendering
process by rendering every non-shader nodes at the same time. They are
rendered in the first `ViewLayer`.
- For shader nodes, we render them each in a different `ViewLayer`, by
rerouting the node to the output of the material in the preview scene.
The preview scene takes the same aspect as the Material preview scene,
and the same preview object is used.
At the moment of drawing the node overlay, we take the `Render` of the
viewed node tree and extract the `ImBuf` of the wanted viewlayer/pass
for each previewed node.
Pull Request: https://projects.blender.org/blender/blender/pulls/110065
This feature is going to be replaced with a more thorough refactoring
of the node group interface UI, which has actual node drawing support
and a new API for integration of panels into nodes.
Design task: #109135
Implementation: #110272
Pull Request: https://projects.blender.org/blender/blender/pulls/110803
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
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
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
Add a quaternion rotation socket type, and using the recently added
rotation attribute type, support the type in most of the multi-type
geometry nodes, and modifier attribute inputs and outputs.
The socket is still exposed with an XYZ Euler default value.
In the future we can add modes to this rotation value similar
to object rotations.
Rotation values have no implicit conversions to other types.
Nodes to convert to and from rotation values will be added
in a follow-up commit.
For now, the new socket type is hidden behind and experimental
option, because we haven't chosen the final color for it yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/108903
Adds an optional list of panels to node trees. Each socket can be
assigned a panel. UI panels will be created in the future in the
modifier for these grouped sockets.
Panels are stored as a pointer array in node trees, next to socket
declarations. Each panel has a name, but it does not have to be unique.
In future a panel might also store whether it is visible by default and
similar information.
C API and RNA API are both added. Panels and their socket
assignments are accessible to users through another list in the "Group"
tab of the node editor sidebar.
Sockets in the same panel will remain together even when adding,
removing, or moving sockets or panels, renaming, etc.
A socket can be moved up or down within a panel but each panel
remains a contiguous block. Actual tree views may be created later.
Pull Request: https://projects.blender.org/blender/blender/pulls/108649