Drag-drop operation of outliner doesn't allow dragging linked collection
ID. Poll function returns false for non-editable IDs. This make
sense if drop target is `INTO` linked collection.To fix this, support
drag-drop operation for `before/after` case and return false when
insert type is `TE_INSERT_INTO`.
Pull Request: https://projects.blender.org/blender/blender/pulls/140848
- `bpy_struct.id_data` - provide a type.
- `bpy_struct` - add missing return types to
`bpy_struct.get`, `bpy_struct.pop`, `bpy_struct.path_resolve`.
- `bpy_struct` - add missing argument types to some methods.
- `bpy_struct` - provide explicit `/` and `*` in signatures to make it
clear which arguments are positional / keyword-only.
Ref !141334
When dropping an extension onto Blender, the URL lookup would print
errors to the STDOUT if a repository directory was missing.
While this didn't break installation, these kinds of errors should
only be shown when the directory is expected to exist.
The issue was raised in #141212.
The base URL was used when reporting errors accessing a URL,
use the full URL being accessed instead since anything else
is misleading, the full URL is needed to troubleshoot issues.
When playing back render result a separate process is started for
playback. This process didn't call the GPU_context_frame_begin/end
functions resulting in post-poning destroying discarded resources until
the playback process was 'exited'.
Pull Request: https://projects.blender.org/blender/blender/pulls/141376
Previously, if a socket inside a panel has the same name prefix as the
panel name, the panel name will be removed from socket names when
displayed inside nodes, but this is not done when displaying them on the
modifier interface, which is too verbose visually. Now panel names are
removed from these property labels as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/140448
Check the polybuild gizmo is drawn before using it,
also account for it being empty (the cause of the crash), although this
shouldn't happen in practice.
If any of the selected collection entries in the outliner is a linked
collection, `outliner_collection_from_tree_element` can return null and
it will crash in `BKE_collection_child_find`. This patch handles this
case by skipping those entries and modified the warning message to show
how many selected entries have failed.
----
This is how the message looks like now:
<img width="746" alt="image.png" src="attachments/b91f2a64-7f2d-42d4-8657-7deaf00e90b6">
Pull Request: https://projects.blender.org/blender/blender/pulls/140847
This commit brings multi-monitor window positioning support to the macOS
GHOST backend. This fixes a plethora of issues with macOS window
creation and positioning, such as:
* Windows not being properly restored when loading a file with Load UI
* Users default startup windows not being properly restored on multiple
screens
* Temporary windows (Settings, Render, Playblast, etc..) wrongly
appearing in unexpected places / other screens
* Duplicating an area into a new window (AKA popping out an editor) not
working on non-primary screens.
* etc..
Internally, this makes all macOS windows coordinates be relative to the
user primary monitor, instead of being local to the currently focused
one. I have tested this to properly work using all sorts of multiple
screen arrangements, and can also confirm that restoring windows from
screens that do not exist anymore / are now out of bounds (due to being
unplugged or re-arranged) also works properly, in which case they get
snapped back to the closest available screen similarly to other backends.
This fixes issue #126410 and implements behavior described in TODO task #69819.
Pull Request: https://projects.blender.org/blender/blender/pulls/141159
Previous fix 531bc5ca69 broke the tracing part of planar
probe. This is because the code was relying on assumption that
are no longer true. Fix this by passing the correct
projection matrix and inverse proj mat to the tracing code.
Pull Request: https://projects.blender.org/blender/blender/pulls/141349
The `CurvesGeometry::resize` function would not work properly when
passing a new size of zero.
1) The `CustomData_realloc` would allocate an array with zero size.
2) A new size of 1 is passed to `implicit_sharing::resize_trivial_array`
for the curve offsets when it should pass 0.
3) A value is written out-of-bounds to `curve_offsets`
This fixes the issues in the following ways:
1) `CustomData_realloc` now doesn't allocate any data when the new
size is 0 and sets the `layer->data` to `nullptr`.
2) When the new number of curves is 0, resize the `curve_offsets` to 0
not to 1. This also ensures that the data pointer is `nullptr`.
3) Make sure to only write the first and last curve offset when the
number of curves is greater than 0.
Pull Request: https://projects.blender.org/blender/blender/pulls/141333
In the viewport, semi-transparent strokes could appear more yellowish.
This was because the `reveal_tx` uses the `GPU_R11F_G11F_B10F` format
(loosing precision in the blue channel).
Now using `GPU_RGB10_A2` for `reveal_tx` to fix the issue.
We don't need to change the format for the `color_tx`.
Pull Request: https://projects.blender.org/blender/blender/pulls/141335
The alpha channel wasn't properly handled when using "multiply" layer
blending.
The formula in `blend_mode_output` for `MODE_MULTIPLY` was first
multiplying the `color.a` by `opacity`, storing the result back into
`color` but then multiplying by `color.a` again.
Instead, multiply `color.a` and `color` by the `opacity` separately.
Pull Request: https://projects.blender.org/blender/blender/pulls/141337
While drag toggle decorators, the button where drag started
still is active, so it can conflict with the button to add/remove
keyframe while dragging upward.
Use `UI_BUT_ACTIVE_OVERRIDE` flag since it has precedence in
`ui_context_button_active`.
Last tested to work in 2.83.
Ref !141317
We do not do any audio time stretching when doing time remapping.
As we also use the audio to keep track of time passed, we should always
pass the actual timestamp we are starting playback from.
The issue was that the old logic would try to undo time remapping on cfra.
However cfra is already correct and is not remapped. I'm guessing that
this changed at some point and we forgot to fix it up in the sound code.
Pull Request: https://projects.blender.org/blender/blender/pulls/141288
Detection of whether an object is in Edit mode can rely on checking its
obdata ID status (for meshes e.g.), which will falsly make remapping
code think it is remapping the obdata of an edited object.
Somewhat work around the issue by forcing such remapping for the time
being. On the long run, check should be updated to only rely on the
Object's status.
Follow up to #140668 that fixes the same issue when using multiple
windows & scenes. This is needed as the active tool can apply to
multiple scenes.
Ref !141260
If render settings resolution scale had lowered resolution, cached
images from render image/animation session could "stay around"
and be incorrectly used in the VSE preview area. Two cases I found are
fixed here:
- Intra-frame cache was not flushed upon actual final resolution
change,
- "Source images" for effect/scene strips were not removed when
requested resolution no longer matches their rendered resolution.
Pull Request: https://projects.blender.org/blender/blender/pulls/141297
The crash happens when hitting tab while using attribute search in the Geometry
Nodes modifier. This triggers some auto-completion code (which doesn't work here
currently, but that's potentially a separate problem). However, the
auto-completion code did not handle the case when the string that's
auto-completed does not have a maximum length, i.e. it is dynamic.
This patch adds some handling for the case when the auto-completed string
storage has a dynamic size.
Pull Request: https://projects.blender.org/blender/blender/pulls/141200
On a Suzanne mesh with 125k faces subdivided at level 3, this patch
results in a 40MB savings of memory, from 1.24 GB measured in Blender
itself to 1.20 GB with this patch applied.
Pull Request: https://projects.blender.org/blender/blender/pulls/141167
Add performance test for subdividing a multiresolution mesh from level
2 to 3. This test ends with a total fine vertex count of approximately
10m, similar to the stroke and BVH tests for multires.
Pull Request: https://projects.blender.org/blender/blender/pulls/141168
This adds to the fix done with #110059.
With the changes of this patch, the smoothing still happens ONLY on full frames.
Any subframe data is linearly interpolated to reduce the stepping seen before this PR.
As a side effect, the operator now has to store the original y values of the keys in question.
This is needed for correct blending, whereas before it was assumed that the samples
contain the original y values.
No changes to the butterworth filter, because that already has a property to increase the
sample rate for sub-frame data.
Pull Request: https://projects.blender.org/blender/blender/pulls/140928
The crash seems to come from libepoxy GL functions pointing to null.
It seems that libepoxy "Automatically initializes as new GL functions are used."
and that to call a function without a GL context bound, the function
must have been called before with a bound context.
This just modifies the scope of the context binding from
DRW_module_exit to RE_engines_exit, which seems the safest solution
for 4.5.
Pull Request: https://projects.blender.org/blender/blender/pulls/141233
The issue was that the depsgraph was not rebuilt, thus
the driver node still stuck around. This then crashed when the
depsgraph evaluated.
The reason why this wasn't caught in the unit tests, was because the
depsgraph was not updated between creating and removing the data.
Pull Request: https://projects.blender.org/blender/blender/pulls/141272
TLAS wasn't being refreshed when empty.
This PR removes a spurious early-exit during BVH build that was preventing
the TLAS from being recreated when it was empty.
Pull Request: https://projects.blender.org/blender/blender/pulls/141215
It seemed "stuck" if the initial voxel size value under the remesh tab
was larger than or equal to the longer side of the bounding plane. It
actually was not stuck, but needed long mouse travels to get into the
range that we were clamping to (behavior from 4221f827cf clamps to
"sane" values on modal that make sense for differently sized meshes).
The "sane" sizes are kept, but this PR makes sure we actually start off
with an `init_voxel_size` that is already based on the clamped minimum/
maximum (so we dont have to mousetravel that far)
Pull Request: https://projects.blender.org/blender/blender/pulls/141208
GPU devices can only be selected in the user preferences if a suitable
device is available. This uses a dynamic enum and the items are not
always defined in RNA, so they need to be extracted manually using
`n_()`.
Also rephrase one message slightly to respect the style guide
("Don't" -> "Do not").
In addition, fix my mistake where an import was mixed up
(`pgettext_tip` was imported as `n_`).
Pull Request: https://projects.blender.org/blender/blender/pulls/141244
This call to `BKE_reportf()` uses a tertiary operator to select a
message using singular or plural, which cannot be translated
automatically. This commit adds `RPT_()` translation for both
variants.
Reported by Ye Gui in #43295.
Geometry Nodes' Add > Input > Import menu includes file format items
such as "Standford PLY (.ply)", "STL (.stl)", "Text (.txt)". The
latter needs to be translated because "Text" is a generic format.
These items are declared using a custom function
`node_add_menu.add_node_type`, with a `label` argument. This commit
adds the `label` argument to the function arguments that can be
extracted from specific node declaration functions, and specifies the
argument position for each:
"add_node_type", "add_node_type_with_outputs", "add_simulation_zone",
"add_repeat_zone", "add_foreach_geometry_element_zone",
"add_closure_zone".
There is currently no facility to specify a translation context but it
could be easily added if the need arises.
Most of these functions do not actually declare new, unique messages,
but it could happen in the future. In addition, two messages were
extracted using manual `iface_()` calls, which are no longer needed
after this change.
Reported by Ye Gui in #43295.
Toggle support for brushes was added back in 4.5 with
9e1e9b0859. The intent of this feature is
to allow for easy switching between a specified brush upon using a
hotkey.
Whils this behavior works well in the case of switching between brushes,
the initial implementation didn't account for using other non-brush
tools.
To fix this issue, when activating a tool, if it doesn't handle brushes,
clear the last active brush.
Pull Request: https://projects.blender.org/blender/blender/pulls/141161