Age | Commit message (Collapse) | Author |
|
Goals of this refactor:
* More unified approach to updating everything that needs to be updated
after a change in a node tree.
* The updates should happen in the correct order and quadratic or worse
algorithms should be avoided.
* Improve detection of changes to the output to avoid tagging the depsgraph
when it's not necessary.
* Move towards a more declarative style of defining nodes by having a
more centralized update procedure.
The refactor consists of two main parts:
* Node tree tagging and update refactor.
* Generally, when changes are done to a node tree, it is tagged dirty
until a global update function is called that updates everything in
the correct order.
* The tagging is more fine-grained compared to before, to allow for more
precise depsgraph update tagging.
* Depsgraph changes.
* The shading specific depsgraph node for node trees as been removed.
* Instead, there is a new `NTREE_OUTPUT` depsgrap node, which is only
tagged when the output of the node tree changed (e.g. the Group Output
or Material Output node).
* The copy-on-write relation from node trees to the data block they are
embedded in is now non-flushing. This avoids e.g. triggering a material
update after the shader node tree changed in unrelated ways. Instead
the material has a flushing relation to the new `NTREE_OUTPUT` node now.
* The depsgraph no longer reports data block changes through to cycles
through `Depsgraph.updates` when only the node tree changed in ways
that do not affect the output.
Avoiding unnecessary updates seems to work well for geometry nodes and cycles.
The situation is a bit worse when there are drivers on the node tree, but that
could potentially be improved separately in the future.
Avoiding updates in eevee and the compositor is more tricky, but also less urgent.
* Eevee updates are triggered by calling `DRW_notify_view_update` in
`ED_render_view3d_update` indirectly from `DEG_editors_update`.
* Compositor updates are triggered by `ED_node_composite_job` in `node_area_refresh`.
This is triggered by calling `ED_area_tag_refresh` in `node_area_listener`.
Removing updates always has the risk of breaking some dependency that no
one was aware of. It's not unlikely that this will happen here as well. Adding
back missing updates should be quite a bit easier than getting rid of
unnecessary updates though.
Differential Revision: https://developer.blender.org/D13246
|
|
Missed in rB7c9e4099854a, sorry.
|
|
Outliner would frame the armature object instead of the bone if the bone
was on a hidden armature layer.
Similar to issues reported in e.g. T58068 and T80464, this is due to the
fact that `BKE_pose_channel_active` always checks for the armature layer
(and returns NULL if a bone is not on a visible armature layer).
Now propose to make this layer check **optional** (and e.g. from the
Outliner be more permissive). This also introduces
`BKE_pose_channel_active_if_layer_visible` which just wraps
`BKE_pose_channel_active` with the check being ON.
Maniphest Tasks: T92930
Differential Revision: https://developer.blender.org/D13154
|
|
Initialise the BKE callback system in
`BlendfileLoadingBaseTest::SetUpTestCase()`. This allows certain tests
to run in debug mode (when `BLI_assert` is enabled).
|
|
|
|
Do not also instantiate a collection in the view layer, if it is already
instantiated through an empty object.
|
|
r7acd3ad7d8e58b913c5 converted a pointer to a reference,
but an assert still compares the variable to a pointer.
|
|
This happens because in `SEQ_time_update_sequence` function
`SEQ_get_meta_by_seqbase` returns uninitialized value. This isn't nice,
but it shouldn't happen in first place. Problem is, that
`SEQ_edit_strip_split` does move strips into detached `ListBase`, so
other functions can't see them anymore. Detached `ListBase` is used
solely to preserve relationships during duplication.
Move strips to original `ListBase` immediately after duplication and
return `NULL` if `SEQ_get_meta_by_seqbase` can't find meta strip.
Splitting itself can still rely on fact, that number of original and
duplicated strips is same and they are placed next to each other in
exactly same order at the end of original `ListBase`.
|
|
This is a followup to the previous commit.
|
|
In this commit I changed many loops to range-based for loops.
I also removed some of the redundant iterator variables, using
indexing inside the loop instead. Generally an optimizing compiler
should have no problem doing the smartest thing in that situation,
and this way makes it much easier to tell where data is coming from.
I only changed the loops I was confident about, so there is still more
that could be done in the future.
Differential Revision: https://developer.blender.org/D13637
|
|
This was visible outside of camera view and was not respecting the
"Depth of Field" checkbox on the Camera properties.
Now return early if DoF should not be visible.
Maniphest Tasks: T94262
Differential Revision: https://developer.blender.org/D13631
|
|
|
|
Sculpt.c is now three files:
* Sculpt.c: main API methods and the brush stroke operator
* Sculpt_brushes.c: Code for individual brushes.
* Sculpt_ops.c: Sculpt operators other than the brush stroke operator.
TODO: split brush stroke operator into a new file (sculpt_stroke.c?).
|
|
The duplicated edges were caused by 'oversubdivided' edges, i.e. edges
where some of the vertices on them are only connected to two polygons.
The fix finds these vertices and 'dissolves' them so that only one edge
is created.
For most 'normal' meshes this shouldn't occurr, or only very little, so
the performance impact of this change should be neglegible. In practice
this is also avoidable by triangulating the mesh first.
Differential Revision: https://developer.blender.org/D13445
|
|
These are useful for development, but when the primitive nodes
aren't actively changing, the performance cost is not worth it.
|
|
This fix provides better conditions for asserts in `NURBSpline::knots`
method accounting for cyclic NURBS curves.
Differential Revision: https://developer.blender.org/D13620
|
|
This flag was checked, but not set anywhere.
|
|
Also remove a SCOPED_TIMER I added by mistake in a previous commit.
|
|
On a Ryzen 3700x, this ended up 2.5x faster than before. More
benchmarking details are included in the differential revision.
For smaller grids, all this should do is increase the
code size a bit, and add a few more if statements.
Differential Revision: https://developer.blender.org/D13617
|
|
|
|
There are two issues in USD code that break building it with gcc-11,
one (in `demangle.cpp`) was already fixed upstream, the other (in
`singularTask.h`) is still pending (reported upstream, see
https://github.com/PixarAnimationStudios/USD/issues/1721).
CC #platforms_builds_tests_devices project.
|
|
Refactor code a bit also so we need to do fewer matrix transforms for shader
data setup of points and curves.
|
|
Includes refactoring to reduce the number of bits taken by primitive types,
so they more easily fit in the OptiX limit.
|
|
Root path variables for those libraries is now using the 'standard' naming
scheme.
With tweaks/cleanups from @mont29.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D13591
|
|
Using `&&` there was a typo. With `&&` the `prepend` method
could not be called with a const reference as argument.
|
|
This was basically not implemented, do this via
`ED_autokeyframe_property` in a new dedicated function in
special_aftertrans_update.
Maniphest Tasks: T93570
Differential Revision: https://developer.blender.org/D13608
|
|
Differentiate doc-strings from title/section text.
|
|
Differentiate doc-strings from title/section text.
Also use explicit doxygen references to struct members
so it's not ambiguous which member is being referenced.
Note that these changes aren't complete (some files weren't touched).
|
|
The text editor no longer accumulates changes.
|
|
Caused by `NULL` dereference in `SEQ_meta_stack_active_get()`.
Check if `Editing` is `NULL` before accessing meta stack.
|
|
Meta add function wasn't updated. All strips now use alpha over
blending, so set it in `SEQ_sequence_alloc()`.
|
|
Similar to the previous commit, this allowed removing a function to set
a single pixel of a node preview.
|
|
When adding multiple movie strips and sound stream is longer than video,
this results in gaps between video strips, which is undesirable.
|
|
This is a follow-up to rB43875e8dd1d76ee, removing some
processing of non-existent node previews in the shader and
texture nodes systems.
|
|
|
|
|
|
This moves `MOD_weld.cc` to C++, fixing compiler warnings
coming from the change. It also goes a little bit further and converts
the code to use C++ data structures: `Span`, `Array`, and `Vector`.
This makes the code more shorter and easier to reason about, and
makes memory maneagement more automatic.
Differential Revision: https://developer.blender.org/D13618
|
|
|
|
When dragging from the inputs of function nodes, other function
nodes wouldn't connect, because their socket declaration field types
weren't set correctly. Instead, they relied on code properly checking
the *node* declaration's `is_function_node()` method. However,
that increases complexity and requires passing the node instead of
just the socket in more places. Instead, set the proper field types
in the socket declaration during building.
Differential Revision: https://developer.blender.org/D13600
|
|
Before d56bbfea7b420d7, nodes were updated (size calculated and
buttons added) in reverse order. Instead, now calculate the size of
frame nodes after all other nodes. Separating the drawing further
may be a good step to removing the O(n^2) loop later on.
|
|
Includes use of memcpy to avoid warnings about deprecated members.
|
|
After recent refactoring in 4e98d974b596.
|
|
This adds memory barriers to use with `GPU_memory_barrier` to ensure that
writes to a vertex or index buffer issued before the barrier are
completed after it, so they can be safely read later by another shader.
`GPU_BARRIER_VERTEX_ATTRIB_ARRAY` should be used for vertex buffers (`GPUVertBuf`),
and `GPU_BARRIER_ELEMENT_ARRAY` should be used for index buffers (`GPUIndexBuf`).
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D13595
|
|
Add a function that returns a list of keyframe segments
A segment being a continuous selection of keyframes
Will be used by future operators in the graph editor
Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D13531
Ref: D13531
|
|
In the context of the dragdrop tooltip, the event referenced to the window
is out of date and contains invalid `mval` values.
Avoid using `win->eventstate` as much as possible.
|
|
The RNA setter now ensures that driver variables are uniquely named
(within the scope of the driver).
Versioning code has been added to ensure this uniqueness. The last
variable with the non-unique name retains the original name; this
ensures that the driver will still evaluate to the same value as before
this fix.
This also introduces a new blenlib function `BLI_listbase_from_link()`,
which can be used to find the entire list from any item within the list.
Manifest Task: T94116
Reviewed By: mont29, JacquesLucke
Maniphest Tasks: T94116
Differential Revision: https://developer.blender.org/D13594
|
|
The node group alpha theme was used for the overlay drawing in the node
editor. Since this was removed (919e513fa8f) the alpha channel doesn't
need to be exposed anymore.
Reported as part of T93654.
|
|
The style guide mentions that unsigned integers shouldn't be used to
show that a value won't be negative. Many places don't follow this
properly yet. The modifier used to cast an array of `uint` to `int` in
order to pass it to `BLI_kdtree_3d_calc_duplicates_fast`. That is no
longer necessary.
Differential Revision: https://developer.blender.org/D13613
|
|
|
|
|