Running valgrind on a render test exhibit a lot of warnings
about `Conditional jump or move depends on uninitialised value(s)`.
This patch makes sure to initialize the memory to avoid
platform dependent bugs.
Pull Request: https://projects.blender.org/blender/blender/pulls/144995
This PR disables support for NVIDIA 580.76.05 drivers as it can hang
on startup with Wayland. There are reports from other applications
that this driver is faulty and NVIDIA confirmed that an updated driver
is in the making.
For now we will blacklist this specific driver on any Linux system.
Pull Request: https://projects.blender.org/blender/blender/pulls/145094
Implements the proposed design (with some modifications) in #135058.
## Sequencer Scene
This adds a new property called `sequencer_scene` to workspaces. This scene is used
by the video sequence editors in the current workspace for their context.
This is a first step towards "detaching" the VSE from the active scene in the window.
Each sequencer timeline editor shows the sequencer scene that is being used.
By default, when no sequencer scene is selected, the timeline and preview are empty.
Pressing the "new" button will add a new scene and assign it to the sequencer
scene for the current workspace.
## Contextual Playback
Pressing `Space` (by default) for starting the animation playback is now contextual:
depending on the context (where your mouse cursor is), the scene that is played back
might be different. E.g. with a 3D Viewport and a Sequencer open, pressing "play"
in the 3D Viewport will play the _active scene_ of the window, while pressing "play"
in the sequencer will play the _sequencer scene_.
## Time & Scene Synchronization
Additionally, this adds a toggle called "Sync Active Scene".
With the property turned on, the active scene & scene time in the window will be
synced with the time & scene of the current scene strip in the sequencer.
Note that this is _not_ bi-directional. The sequencer can change the active scene
and map time, but it's not possible the other way around since it one can have
multiple strips using the same scene (+camera, and even time!).
Currently this setting is exposed in the footer of the sequencer timeline as well
as in the workspace settings.
This allows for one of the core concepts that the story tools projects aims at: Working
in a scene (e.g. in the 3D viewport) while also working with the edit
(in the sequencer timeline).
## Some technical notes
* Undoing while playback is running will now cancel playback. This is to avoid the timer,
that points to the scene and viewlayer that are playing, to get de-synced after loading
the memfile undo step.
* When the sequencer scene is not the same as the active scene, we ensure it has
a depsgraph.
* Normally, when a `NC_SCENE` notifier points to a specific scene, the notifier is dropped
if that scene doesn't match the active one in the window. We now also check that it
doesn't match the sequencer scene in the active workspace.
* When loading older files, we need to make sure that the active workspace in a window
uses the active scene as the sequencer scene. This is to make sure that the file opens with
the same sequences open.
* Tool settings are stored per scene. To make sure the sequencer uses the tool settings for
the sequencer scene, the "context.tool_settings" and `CTX_data_tool_settings` members
are overridden in the sequence editors.
Pull Request: https://projects.blender.org/blender/blender/pulls/140271
Update the call signature in the docstring so that it is clear that the
arguments to `bpy.data.user_map()` are all optional:
```
.. method:: user_map(*, subset=None, key_types=None, value_types=None)
```
This is important for Python stubs that are generated from the
docstrings; see https://github.com/michaelgold/buildbpy/issues/3.
This change feels a bit weird, as the function behaves differently
depending on whether the arguments are there or not. For example,
`subset=None` is not actually valid, as it should be a dictionary and
the function will raise a `TypeError`. But documenting `subset=dict()`
is also incorrect, because explicitly passing that will make the
function behave differently: it reports an empty dictionary, instead of
reporting everything. The same goes for the other parameters.
A better approach (IMO) would be to either add "empty dict/set means
'everything'" logic, or to allow `None` values for these parameters so
that the documented call can actually be made.
Note that this is the case for other calls as well, such as
`bpy.data.file_path_map()`. As such, I don't want to address this in
this commit; this is just for making the docstring reflect the optional
nature of the parameters.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/144933
Fix an omission in my earlier fix (50876d9b26). This resolves the
situation for the "Blend File" mode, where Actions are shown both in a
flat list (which should show all slots) as well as underneath the IDs
they animate (which should only show the assigned slot).
Instead of looking at the Outliner mode, the code now uses the type of
the parent tree element. If this is an "Animation" element, a single
slot is shown. Otherwise all slots are shown.
Pull Request: https://projects.blender.org/blender/blender/pulls/145101
* RGB was renamed to Linear, and is the scene linear working color space.
* Perceptual uses the color picking color space, which matches the visual color
picking widgets, and is sRGB in the default OCIO config. But it is not the
Display color space, because for wider gamut configs that would not cover
the whole gamut.
* The tooltips now show the specific color space name, which can be useful
information when using different OpenColorIO configs.
* HSV is now using the color picking space rather than linear, as this matches
the color picking widgets and is arguably easier to control.
Ref #144400, #143494
Pull Request: https://projects.blender.org/blender/blender/pulls/144564
In function `curve_populate_trans_data_structs` only editable points are
copied to `TransDataContainer`.
The code handling proportional connected editing was expecting all data
from `CurvesGeometry` to be there. Additional offset index array was
added for editable points per curves.
Pull Request: https://projects.blender.org/blender/blender/pulls/144655
Restrict EditFont manipulation to the object which is in edit-mode
previously multiple threads could clear & assign EditFont::selboxes
at once which crashed when in edit-mode with linked duplicates.
The Curve, Curve::strinfo & EditFont::textbufinfo are now read-only
during evaluation. CharTrans is now used to store some evaluation
options such as wrap/overflow/smallcaps.
Since it's no longer possible to inspect evaluation flags from operators
without evaluating the curve, line beginning/end functionality has been
moved from the operator into vfont_to_curve.
Ensure arrays are valid when reading instead of evaluation.
In general correcting data in evaluation is error prone since
data may be accessed from other parts of Blender before evaluation
(Python scripts for example), and isn't thread-safe in edit-mode
where the edit-data is shared, see #144970.
This also removes material index correction, this doesn't cause
problems as the evaluated `Nurb` must already support out of range
material indices.
PR https://projects.blender.org/blender/blender/pulls/144233.
Fix#142296 performance regression caused by merging UV positions
based on face area weights, replacing it with mean average weights
computation. The former method resulted in higher probability in making
subdivision cache invalid between frame updates and thus causing expensive
recreation of blender::bke::subdiv::OpenSubdiv_Evaluator object.
While this fix isn't directly answering a question why specific UV position
updates would cause this reevaluation of subdivision object, it fixes
the performance regression caused by #139595 PR.
This config has a single file rule with default set to ACES2065-1. Just ignore
the default rule now, which some other applications seem to be doing as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/145054
Caused by casting float value to int in source cache eviction logic. The cache
key was changed from int to float for timeline frame, but this was not changed
in `source_image_cache_evict()`. Compiler did not catch this unfortunately.
Pull Request: https://projects.blender.org/blender/blender/pulls/145019
The goal is to make it easier to support columns where values have different
types. This is achieved by extracting a drawing function that draws whatever is
in a `GPointer`.
Pull Request: https://projects.blender.org/blender/blender/pulls/145046
Found while trying to import an instanced point-instancer with the
operator setting `support_scene_instancing=false`.
The point-instancer Prototype would be partially processed but not
completely since the option was disabled. This caused a discrepancy
during the final portion of import where the view layer was synced and
we attempted to query for an object that was not present.
Pull Request: https://projects.blender.org/blender/blender/pulls/144845
Currently, when some values on the UnifiedPaintSettings struct are
changed, the corresponding active brush gets notified that something has
been edited, but not the scene, despite the data being stored on a scene
basis.
Pull Request: https://projects.blender.org/blender/blender/pulls/144951
The Asset Browser (as opposed to other Filebrowser) is restricted to
either FILE_HORIZONTALDISPLAY / FILE_IMGDISPLAY, as noted in https://
projects.blender.org/blender/blender/issues/103563#issuecomment-82835
the UI isnt polished enough for FILE_VERTICALDISPLAY it seems. However,
resetting to default would leave us with exactly that.
To resolve, control the default dynamically via an
`RNA_def_property_enum_default_func` (and set it to FILE_IMGDISPLAY for
the Asset Browser).
Pull Request: https://projects.blender.org/blender/blender/pulls/144917
Consider the part of the view name before the dash to be the prefix that
we expect the look to have. So that both "AgX" and "AgX - HDR" match
looks starting with "AgX -".
Pull Request; https://projects.blender.org/blender/blender/pulls/142758
Almost all settings were duplicated between BakeData and RenderData.
The only missing field was the bake type, which is stored as a custom
property in Cycles.
This change:
- Removes unused bake_samples and bake_biasdist.
- Migrates settings like bake_margin to BakeData.
- Switches multires baker to use bake_margin.
- Introduces bake type in the BakeData, the same way how it was
defined in RenderData::bake_mode.
Pull Request: https://projects.blender.org/blender/blender/pulls/144984
This change makes it so baking displacement to the high-resolution mesh
(Use Low Resolution Mesh option is OFF, displacement is calculated
between top multi-resolution level and subdivided viewport level mesh)
uses texture UVs and tangent space from the high-res mesh.
This matches intended use-case when object baked with such configuration
have subdivision surface applied to them bringing overall resolution to
the same level as the highest multi-resolution level.
The issue was simple to see when baking high-res displacement for an
object which uses "Keep Corners, Junctions" UV smoothing.
The unfortunate aspect is increased memory usage due to calculation of
the grid index and grid UV mapping, but it is not too bad (12 bytes per
loop, so is like 48Mb per million face). Feels like there is a way to
optimize it by utilizing knowledge that high-res mesh faces are created
in a specific order, but also feels it is not that important at this
moment.
Pull Request: https://projects.blender.org/blender/blender/pulls/144935
The main idea is to switch Bake from Multires from legacy DerivedMesh
to Subdiv. On the development side of things this change removes a lot
of code, also making it easier easier to rework CustomData and related
topics, without being pulled down by the DerivedMesh.
On the user level switch to Subdiv means:
- Much more closer handling of the multi-resolution data: the derived
mesh code was close, but not exactly the same when it comes to the
final look of mesh.
Other than less obvious cases (like old DerivedMesh approach doing
recursive subdivision instead of pushing subdivided vertices on the
limit surface) there are more obvious ones like difference in edge
creases, and non-supported vertex creases by the DerivedMesh.
- UV interpolation is done correctly now when baking to non-base level
(baking to multi-resolution level >= 1).
Previously in this case the old derived mesh interpolation was used
to interpolate face-varying data, which gives different results from
the OpenSubdiv interpolation.
- Ngon faces are properly supported now.
A possible remaining issue is the fact that getting normal from CCG
always uses smooth interpolation. Based on the code it always has been
the case, so while it is something to look into it might be considered
a separate topic to dig into.
It matches the behavior of IMB_rectfill_area() with opaque alpha now.
This is important as the function is used in baking, where the neutral
0.5 is expected to be mapped to 128.
The only annoying part is that for the external MDISPS the mesh
needs to be cast to non-const.
Arguably it is semantically correct behavior as the details of
how external data is read is kind of implementation details.
- Return evaluated points as function return value.
Used in cases when only limit or final point is requested, without
partial derivatives.
- Re-order function argument list and use default argument values to
simplify usage in the simple/typical cases.
No functional changes expected.
This PR adds recycling of descriptor pools. Currently descriptor pools
are discarded when full or context is flushed. This PR allows
descriptor pools to be discarded for reuse.
It is also more conservative and only discard
Descriptor pools when they are full or fragmented.
When using the Vulkan backend a small amount of descriptor memory can leak. Even
when we clean up all resources, drivers can still keep data around on the
GPU. Eventually this can lead to out of memory issues depending on how
the GPU driver actually manages descriptor sets.
When the descriptor sets of the descriptor pool aren't used anymore
the VKDiscardPool will recycle the pools back to its original VKDescriptorPools.
It needs to be the same instance as descriptor pools/sets are owned by
a single thread.
Pull Request: https://projects.blender.org/blender/blender/pulls/144992
get_texture_colorspace_name accessed byte_buffer instead of
float_buffer; introduced in 18110744a2. In practice VSE seems to
always fill colorspaces, so does not cause a very visible bug.
Instead of matching regions, free all popups using
UI_popup_handlers_remove_all which also calls the remove callback
that frees the uiPopupBlockHandle.
Deleting or changing the screen with a popup (error report in this case)
wasn't removing the popup, it would attempt to display using it's
region which had been freed when changing the screen.