The interactive compositor crashes if the scene resolution is changed
after rendering. That's because the compositor queries its render size
from the scene directly, which might be different from the size that was
already rendered.
To fix this, the compositor should use the size of the existing render
result if available, while it should fallback to the scene resolution.
Pull Request: https://projects.blender.org/blender/blender/pulls/137674
Color picker supports palette color picking by clicking during the modal
operator, but it will set initial color on the color property when
exiting from palette color picking, but it didn't send out a notifier
which means interface would kept showing last hovering color.
This fix also included a more obvious visual notification on the bottom
bar so the mode change gets more attention and would be harder to miss.
-------
This PR makes it so that if you clicked while holding `Shift + X`, this info would prompt on the bottom bar, this may need interface to look & decide whether that's needed because previously the string change wasn't eye-catchy enough:
<img width="194" alt="图片" src="attachments/5185f05a-54c2-45b9-acf9-3a0da8d686bb">
Pull Request: https://projects.blender.org/blender/blender/pulls/128842
Instead of skipping `update_sculpt_normal` entirely, we should avoid
doing the extra sampled calculation when we know we have a valid plane
normal.
This better aligns with future refactors to avoid both caclulating and
setting values inside `calc_brush_plane`.
Pull Request: https://projects.blender.org/blender/blender/pulls/137689
When creating the `axismtx` in `SeqToTransData`, the strip's rotation
needs to be multiplied by the mirror values.
This adjustment effectively multiplies the rotation by -1 when a mirror
is active, resulting in the `axismtx` being correct. This process is
essentially the same as in #136004.
The `axismtx` is utilized in various transform modes, such as
`transform_mode_translate`.
Pull Request: https://projects.blender.org/blender/blender/pulls/137489
The `initial_normal` and `initial_normal_symm` values used for the "Area
Normal" automasking functionality are not set inside
`update_sculpt_normal`, therefore this check and subsequent processing
can be removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/137693
Updates sculpt_update_cache_variants to:
* Join declaration and assignment
* Use const where possible
* Use references where possible
* Use C++ math operations where possible
Pull Request: https://projects.blender.org/blender/blender/pulls/137643
This reduces verbosity when using `LinearAllocator` or `ResourceScope` to
allocate values for a `CPPType`. Now, this is simplified and one also does not
have to manually add a destructor call anymore.
Pull Request: https://projects.blender.org/blender/blender/pulls/137685
Previously, it was not possible to add any of the existing zones using
link-drag-search, but only using normal search of the Add menu.
For most zones the intended behavior was fairly straight forward. Just for For
Each Element zone is a bit special, because it has two output geometries which
have different meaning.
I also had to update the link-drag-search a bit to remove the limitation that
only a single node can be added.
Pull Request: https://projects.blender.org/blender/blender/pulls/137684
In the function `gather_attributes_to_propagate` all the instance
attributes were set to be propagated to the `Point` domain.
For Grease Pencil, we want to make sure to propagate these
attributes to the `Layer` domain instead.
Pull Request: https://projects.blender.org/blender/blender/pulls/137665
This disables the labels for the geometry domains that the selected
geometry set doesn't contain.
It also removes the sub rows for the domains for these geometry types.
Pull Request: https://projects.blender.org/blender/blender/pulls/137666
Mistake in fe52284be9.
The attribute filter created by the geoemtry nodes evaluation system
doesn't work in this case because the the conversion from curves to
points is internal to the node, just an implementation detail.
Pull Request: https://projects.blender.org/blender/blender/pulls/137614
For performance reasons render graphs can keep memory allocated so it
could be reused. This PR optimizes the memory usage inside the
rendergraph to keep it within normal usage.
I didn't detect any performance regression with this change but reduces
the memory when performing final image rendering of heavy scenes.
Partial fix for #137382. the amount of memory still increases with 4mb
per render. It fixes the main difference when using large scenes.
Pull Request: https://projects.blender.org/blender/blender/pulls/137660
This adds a new Instance Bounds nodes which provides an easy and
efficient way to get the bounding box of each instance.
Nested instances or not taken into account to compute the bounding
box. That would result in a major performance degredation because
one would have to basically realize all instances to do that.
Also see #135933 for some examples.
Pull Request: https://projects.blender.org/blender/blender/pulls/135933
The Cryptomatte node only works with the first view layer in a setup
where a view later is called ViewLayer and another called ViewLayer.001.
This is because the code used a prefix check to match the view layer to
the Cryptomatte type name, and since ViewLayer is a prefix of the other
ViewLayer.001, the check always matches the first ViewLayer.
To fix this, we just remove that guard condition and rely on later
checks.
Pull Request: https://projects.blender.org/blender/blender/pulls/137659
The goal here is to avoid having to cast to and from `ID` when getting the
evaluated or original ID using the depsgraph API, which is often verbose and not
type safe. To solve this, there are now `DEG_get_original` and
`DEG_get_evaluated` methods which are templated on the type and use a new
`is_ID_v` static type check to make sure it's only used with valid types.
This allows removing quite some verbosity on all the call sites. I also removed
`DEG_get_original_object`, because that does not have to be a special case
anymore.
Pull Request: https://projects.blender.org/blender/blender/pulls/137629
The issue was that there were no handle positions but
`retrieve_visible_bezier_handle_points` still returned a mask
of bezier points.
The fix ensures that ther drawing has handle positions and returns
an empty mask otherwise.
This means that the code that draws the handles now correctly ignores
them when there are no handle positions available.
Pull Request: https://projects.blender.org/blender/blender/pulls/137655
It is more convenient for math reasons, for Blender to treat a pen tilt
toward the user as a positive angle. This PR just reverses all the
comments about the expected values. And also reverses the values from
WinTab, Windows Ink, and Wayland to match.
Pull Request: https://projects.blender.org/blender/blender/pulls/137636
Prevent dissolve leaving duplicate faces when dissolving edges.
Also use the builtin reuse of duplicate faces provided by BM_face_join()
instead of doing it manually.
Ref: !137634
Caused by checking if strip frame index falls into a range instead of
timeline frame. This was introduced in 6a39d79967 and was incorrect
solution to the issue.
Cache key had `timeline_frame` field, which was removed, because it is
not updated when strip moves. The value is now calculated from frame
index.
The issue was not very noticable especially when working with larger
strips, but the behavior was incorrect and confused me when working on
cache related features.
Pull Request: https://projects.blender.org/blender/blender/pulls/137583
In bf18e8f814, `buttons_context_compute()` was moved "upstream" in code
path, as a de-duplication effort. But this wasn't correct, because
function `property_search_for_context()` was executed in a loop where
the tabs were iterated over.
This commit moves `property_search_for_context()` back where it was
before.
Pull Request: https://projects.blender.org/blender/blender/pulls/137576
Since 115d809358 the scroll bars are darker on light theme. But this
makes the circular "handles", in Timeline for example, to not be
visible. This is because we start with the item color and then make
it darker when over a threshold. But we never make them lighter when
they are dark. This PR makes these darker or lighter depending on the
base color.
Pull Request: https://projects.blender.org/blender/blender/pulls/137618
Currently this code uses the `Mesh` struct as a value embedded in the
undo step struct. This causes the need for various hacky workarounds and
abstraction leaks. It's simpler to just allocate it in the regular way
The Shape Key ID can also be freed with the regular ID free function,
avoiding the need to expose the internal free function.
Pull Request: https://projects.blender.org/blender/blender/pulls/137613
This adds support for having viewer nodes in closures. The code attempt to
detect where the closure is evaluated and shows the data from there.
If the closure is evaluated in multiple Evaluate Closure nodes, currently it
just picks the first one it finds. Support for more user control in this case
may be added a bit later. If the Evaluate Closure node is in e.g. the repeat or
foreach zone, it will automatically use the inspection index of that zone to
determine what evaluation to look at specifically.
Overall, not too much had to change conceptually to support viewers in closures.
Just some code like converting between viewer paths and compute contexts had to
be generalized a little bit.
Pull Request: https://projects.blender.org/blender/blender/pulls/137625
The test_draw_submit_only was broken because of the
empty pass optimization #135875. Making the passes
non-empty fixes the test.
`eevee_surfel_list` has non-deterministic result. This
should be investigated in the future.
Tests were calling the submission mutex without
init. Adding functions to expose only setting
up the submission mutex instead of the full
DRW context (which is uneeded here).