It was looking up the last modifier in the stack, ignoring visibility, instead
of mesh->runtime.subsurf_runtime_data set by the modifier evaluation and used by
the drawing code.
If there is an error we should stop rendering, instead of finishing with a
wrong render result or reporting a wrong benchmark time.
Ref T96519
Differential Revision: https://developer.blender.org/D15287
This implements client-side window decorations for moving and resizing
windows and HiDPI support.
This functionality depends on the external project 'libdecor' that is
currently a build option: WITH_GHOST_WAYLAND_LIBDECOR.
Reviewed by: brecht, campbellbarton
Ref D7989
In the cases where length is zero, we simply equally distribute the
value based on the control point/curve index.
Differential Revision: https://developer.blender.org/D15285
Manta flow used the `__main__` namespace which it was executed in,
this caused a bug when calculating fluid from Python, which clears
it's `__main__` name-space after execution.
This caused Manta-flows name space to be cleared too.
Resolve this by creating a separate name-space for manta-flow.
Reviewed by: SonnyCampbell_Unity
Ref D15269
Before [0] mouse-motion events left the 'event.value' un-changed,
so a mouse-move would be set to PRESS/RELEASE based on previous events.
Support accessing the previous event value directly
to address feedback from T99102.
Note that the previous cursor location is already exposed.
[0]: 52af3b20d45ea525a0ce66b2613ac132c9032a3f
This reverts commit c503c5f756aab850e8afe2513b2dc7b645cf84af,
alternate fix for T82244.
Scripts that run in background mode expected rotation to be usable,
defaulting to the 3D viewport when there is no active windowing data.
Also resolves T88610.
When running the render test cases on MacOS/Intel the hair render
test fail. Most likely due to the dense geometry and the low
resolution of the test image.
This patch increases the fail threshold so these tests will pass.
Note that I haven't been able to test whether this is also the case
for Linux/Windows. If that is the case we should remove the platform
specific test.
Makes the current test cases pass on NVIDIA 1080Ti/515.
The tests still fail on other platforms (AMD, Intel). Some are actual failures.
Other require platform specific reference images.
Original patch provided by Brecht van Lommel.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D15264
When using the old particle hair with the hair info length it wasn't
working with AMD GPUs. The reason was that the drw_curves uniform buffer
wasn't initialized what made the shader select the incorrect length.
Commit 277fa2f441f4 added channels region to unintended editors if sequencer was
used in area. This caused issues with some editors having 2 tool regions and
non functioning side panel.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D15253
As grab already uses it's own virtual coordinates, cursor warping can
be used when grab is enabled.
Currently nothing depends on this however it could be useful in future.
Walk mode implemented it's own grab which relied on WM_cursor_warp
to work (which isn't implemented for wayland).
Resolve this by using WM_cursor_grab_{enable/disable}.
Besides fixing Wayland this removes the need for workarounds:
- Ensure the event received were after the event generated from warping.
- Alternate logic that reset the "center" when using tablets.
- Checking the cursor location was scaled by native-pixels on macOS.
There is a minor change in behavior: on completion the cursor is left
at the location walk-mode began instead of the center of the region.
This applies the same optimization as b8bd304bd45397b8c to the separate
color node. I observed about a 50% improvement with 10 million values
when only extracting one channel-- from about 17ms to 11ms.
A small regression as a result of adding a custom outline to the empty
virtual socket, which ended up overriding the colors when selected with
Shift+LMB.
Differential Revision: https://developer.blender.org/D15103
the mesh ID for a full update. The conditions it uses are troublesome:
1. There must be an evaluated mesh
2. The evaluated mesh's active byte color layer must equal the original's
This logic doesn't make sense for a few reasons. First of all, the
`mloopcol` pointer doesn't make sense in the context of color
attributes (rather than the old vertex colors), since it only points
to byte color attribute on face corners. Second, just because the
layer pointers are equal doesn't mean something doesn't depend
on the attribute's values.
I think the best solution currently is to remove this "fast update"
case and instead work on optimizing the general case.
Also, T95842 suggests removing these pointers, and this is one
of the last remaining uses of `Mesh.mloopcol`.
Differential Revision: https://developer.blender.org/D15275
We store various lazily calculated caches on meshes, some of which
depend on the vertex positions staying the same. The current API to
invalidate these caches is a bit confusing. With an explicit set of
functions modeled after the functions in `BKE_node_tree_update.h`,
it becomes clear which function to call. This may become more
important if more lazy caches are added in the future.
Differential Revision: https://developer.blender.org/D14760
This makes calculation of selected indices slightly faster when the
input is a virtual array (the direct output of various nodes like
Face Area, etc). The utility can be helpful for other areas that
need to find selected indices besides field evaluation.
With the face area node used as a selection with 4 million faces,
the speedup is 3.51 ms to 3.39 ms, just a slight speedup.
Differential Revision: https://developer.blender.org/D15127
This change helps decrease Intel GPU binaries compile time by 5-10
minutes without impacting other backends.
Reviewed By: sergey, brecht
Differential Revision: http://developer.blender.org/D15273
All of the operators in vertex paint mode didn't work properly with
the new color attribute system. They only worked on byte color type
attributes on the face corner domain.
Since there are four possible combinations of domains and types now,
it mostly ended up being simpler to convert the code to C++ and use
the geometry component API for retrieving attributes, interpolating
between domains, etc. The code changes ended up being fairly large,
but the result should be simpler now.
Differential Revision: https://developer.blender.org/D15261
When input file is changed, `orig_height` and `orig_width` fields are
reset, which causes thumbnail dimensions to be incorrectly calculated.
Only draw thumbnails if both mentioned fields are non 0.
One case of copying image formats was not properly using BKE_image_format_copy.
To fix this for existing .blend file we need to do versioning, ensuring the curve
mapping is properly copied.
This patch unifies the names of math functions for different data types and uses
overloading instead. The goal is to make it possible to swap out all the float3
variables containing RGB data with something else, with as few as possible
changes to the code. It's a requirement for future spectral rendering patches.
Differential Revision: https://developer.blender.org/D15276
Fix by always testing unhandled double-click events as press events,
irrespective of the previous event type.
**Details**
Handling double-click events only ran when the previously pressed-key
matched the current pressed-key.
Originally when double-click support was added the previous type was
compared (ignoring it's press/release value) and while not necessary
it was harmless as it matched the check for double-click events being
generated.
As of [0] the logic for click/drag detection changed to ignore release
events as release this could interrupt dragging.
This made it possible to generate double-click events that failed the
`event->prev_press_type == event->type` comparison.
In these cases it was possible to generate double-click
events that would not fall-back to a 'press' value when unhandled.
[0]: 102644cb8cbb8b21e55643cebe2ed364885023a6
If the some driver had been flagged as "invalid", the flag would not be
cleared when joining armatures which could lead to now valid drivers
still being flagged as invalid.
Now we clear this invalid flag on all drivers to force a recheck after
joining the armatures.
Add a `BKE_action_fcurves_clear(action)` function, which removes all the
Action's FCurves, and expose it as `ActionFCurves.clear()` in RNA.
This is more ergonomic than calling `remove` on f-curves until the list
is empty.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D14660
Add a poll message to the bone group operators, to explain they only
work in pose mode. Before, the buttons would be greyed out with no
explanation.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D15119
Adds a custom property panel for the active `Action` to the Dopesheet
editor. There was previously no way to edit these properties outside of
the Python API.
This panel will show up when
`context.active_object.animation_data.action` is set.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D14646
- Respect modifier keys (Shift press/release didn't change the case).
- Changing modifiers resets the timer instead of canceling key-repeat.
- Releasing keys (besides the key being repeated) resets the timer
instead of canceling key repeat.
This makes key-repeat behave the same way as GTK & WIN32 text input.