Currently, sometimes shader code generation fails because the code of top-level
nodes is interleaved with the code of a repeat zone. See #147747 for more
details.
Previously, the code-generation order was just the standard toposort of the node
tree, but it does not guarantee that all nodes in a zone are next to each other.
Also, it can't easily, because the zone detection itself depends on the
toposort. This patch implements another sorting step on top of the default
toposort. It packs nodes in zones together without changing the validity of the
toposort.
This is an alternative to #147999.
Pull Request: https://projects.blender.org/blender/blender/pulls/148005
This patch adjusts the implicit conversion rules involving float2 to
match other parts of Blender, like BKE Conversions, Geometry Nodes, and
the Compositor. The new rules also make much more sense to me on their
own.
The GPU_VEC2 is no currently used for GPU materials as far as I can see,
so this should not be a breaking change.
Pull Request: https://projects.blender.org/blender/blender/pulls/148033
The inferencing algorithm does not work reliably when the tree has cycles. So
return early and assume everything is used. The user is expected to fix the bad
link as soon as possible.
Pull Request: https://projects.blender.org/blender/blender/pulls/148009
This makes it so that the Pen Tool will return the handle type back
to `Align` after letting go of `LeftCtrl`
This effects Grease Pencil and Curves objects.
Pull Request: https://projects.blender.org/blender/blender/pulls/147943
Quick tooltips immediately show a word or two and then shows more
detailed information after a pause. It is possible to have these two
things shows at differing positions (vertically or horizontally) and
therefore jiggle. Some padding code uses the width and height and half
of a padding amount, which can result in differing values if the first
width or height is an odd amount but the second is even, or vice versa.
This happens quite infrequently and depends on the user scale. This PR
just replaces one line that does the padding in a way that results in
consistent values.
Pull Request: https://projects.blender.org/blender/blender/pulls/148019
The cause was a missed case from #130440 where
`use_nla_remapping = true` was being unconditionally passed to
`fcurve_to_keylist()` rather than determining the value with
`ANIM_nla_mapping_allowed()` as it should have been.
The fix is simply to use `ANIM_nla_mapping_allowed()` instead of
unconditionally passing `true`.
This PR also changes an outdated comment to properly explain why `adt`
was null in the first place (which is precisely to catch bugs like
this).
Pull Request: https://projects.blender.org/blender/blender/pulls/147957
Currently, the scene strip preview uses the existing dependency
graph built for that scene. This was not a big issue before
the sequencer scene was introduced, because the user would have
to create two main Blender windows to run into problems.
Now with the sequencer scene, it's possible to look at the scene
of a scene strip within the same window.
When the user is editing the scene (e.g. moving an animated object)
any open sequencer preview will cause the edits to be flushed.
This can e.g. result in visual jumping of animated objects, and more.
This PR attempts to fix the issue in a straightforward way: Use
a separate dependency graph for rendering the sequencer preview.
While this fixes the immediate issues, there are some consequences:
* The memory usage of the scene dependency graph _can_ roughly
double (since there are now likely two instances of the same
dependency graph). Because of implicit sharing, unmodified data
will not be copied. But for example modifiers on meshes would
currently create two copies of the evaluated data in the two
dependency graphs.
* Creating the dependency graph can be costly, which will cause the
first frame that the scene has to render to be slower.
Note: The current code changes some properties of the original scene
like the frame, subframe etc. before rendering and then restores
the original state. In theory, this part of the code can be removed,
but may be a bit too risky for just a fix. This should be improved
at a later stage.
Also resolves#146769, #139501.
Pull Request: https://projects.blender.org/blender/blender/pulls/147457
Partial revert of c03fdf5d9d, going back to previous versions of the
icons for hide_on (closed eye), restrict_select_on (unfilled mouse
cursor), and the combined versions (vis_sel_xx). These changes are a
bit too contentious to be added so late in the release. Note this
leaves in the changes to the lock icons.
Pull Request: https://projects.blender.org/blender/blender/pulls/147836
This speeds up drawing of the UI of the Geometry Nodes modifier, especially for
very large node trees like in the files from #146949.
A couple previous commits and #147883 speed up the inferencing significantly
already. However, there is a certain limit to how fast this can be on large
complex node trees. While there is some more optimization potential, this patch
implements a cache on the Geometry Nodes modifier level. This means that as long
as the inputs and the node tree stays the same, the inferencing only has to
happen once, instead of on every redraw.
The main difficulty with this cache is that we don't have a good way to
invalidate it eagerly when any of the modifier inputs changes. That can
hopefully become simpler with #138117. For now, we have to check all input
values on redraw to check if anything has changed compared to the last redraw
and recompute the cache if there is any change.
Pull Request: https://projects.blender.org/blender/blender/pulls/147930
The problem was that the Pen Tool would not set the `Resolution` attribute
and so when the `Resolution` attribute didn't exist, the newly added curve
would default to a value of 0, which would then lead to an Assert.
This problem would also effect `Curves` Objects.
Pull Request: https://projects.blender.org/blender/blender/pulls/147673
Split the "Interpolation Line" theme property into three for each
interpolation mode, and use them accordingly. In the current theme
refactor, almost all theme properties of the dope sheet are getting
either removed (unused), or moved (shared). This decluttering opens up
the possibility to allow more theming, and let artists read the Dope
Sheet better.
## Avoiding Confusion
There's two "Bézier" interpolation types:
- Called "Bézier" in the interpolation type menu, and
- Called "Bézier" in the code, for the types that are labeled as
**"Easing" and "Dynamic"** in the interpolation type menu.
Since this commit is about the interpolation lines, which are **not**
drawn for the former, **this PR only covers Constant, Linear, and the
latter form of Bézier interpolation types.**
Pull Request: https://projects.blender.org/blender/blender/pulls/144255
This patch adds proper internal support for 2D vectors in GPU materials,
while previously it used a 3D vector with the Z component ignored as a
workaround. This has no user-facing consequences.
The type conversion file was split into an additional code generation
file for easier refactoring.
Pull Request: https://projects.blender.org/blender/blender/pulls/147983
This breaks tests (and the VR addon itself of course).
Needs to be done differently, will create new PR for proper fix.
This reverts commit 0c22ef5ae7.
This breaks tests (and the VR addon itself of course).
Needs to be done differently, will create new PR for proper fix.
This reverts commit 0c22ef5ae7.
When a Cycles render is uneven (E.g. a small portion of the image takes
significantly longer to render than the rest of the image), then GPUs
typically suffer from poor performance due to low occupancy unless a
large number of samples is scheduled to compensate for that small
complex region.
Due to how Cycles render scheduler is setup, Cycles tries to
increase GPU occupancy by increasing the number of scheduled samples,
but also balance render preview update time by scaling back
the number of scheduled samples based on the previous workloads time
per sample to try and fit within the target update time.
However using the previous workloads time per sample to scale back the
scheduled number of samples gives suboptimal results because the
previous workloads time per sample is usually not representative of the
new time per sample that occurs as GPU occupancy increases, because
increasing GPU occupancy typically results in reduced time per samples.
This commit improves on this issue by assuming that increasing GPU
occupancy linearly improves performance, and adjusts the function
that scales back the sample count to fit within a specific update
window to use this assumption. This leads to Cycles increasing the
amount of work scheduled onto the GPU quicker at the beginning of
uneven/low occupancy scenes, generally leading to improved performance,
especially when rendering at low sample counts or with strict
time limits.
Ref #147954
Pull Request: https://projects.blender.org/blender/blender/pulls/147950