Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-21Nodes: refactor node tree update handlingJacques Lucke
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
2021-12-21Cleanup: clang formatPhilipp Oeser
Missed in rB7c9e4099854a, sorry.
2021-12-21Fix T92930: Outliner "Show Active" bone fails in certain situationsPhilipp Oeser
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
2021-12-21Tests: initialise BKE callbacks before loading blend fileSybren A. Stüvel
Initialise the BKE callback system in `BlendfileLoadingBaseTest::SetUpTestCase()`. This allows certain tests to run in debug mode (when `BLI_assert` is enabled).
2021-12-21Fix T93757: Do not force-instantiate indrectly linked objects in linking case.Bastien Montagne
2021-12-21Fix T93839: Copy/Paste of empty instantiating a collection.Bastien Montagne
Do not also instantiate a collection in the view layer, if it is already instantiated through an empty object.
2021-12-21Fix build error in debug builds from recent commitHans Goudey
r7acd3ad7d8e58b913c5 converted a pointer to a reference, but an assert still compares the variable to a pointer.
2021-12-21Fix T94280: Crash when splitting meta stripRichard Antalik
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`.
2021-12-21Cleanup: Use span instead of raw pointerHans Goudey
This is a followup to the previous commit.
2021-12-21Cleanup: Use simpler loops in weld modifierHans Goudey
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
2021-12-20Fix T94262: Grease Pencil Blur Effect DoF mode wrongPhilipp Oeser
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
2021-12-20Run clang-formatJoseph Eagar
2021-12-20Sculpt: split sculpt.c into three filesJoseph Eagar
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?).
2021-12-20Fix T94144: Duplicate edges in dual mesh nodeWannes Malfait
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
2021-12-20Cleanup: Remove mesh valid assertions in debug buildsHans Goudey
These are useful for development, but when the primitive nodes aren't actively changing, the performance cost is not worth it.
2021-12-20Fix: Incorrect assert conditions in NURBSplinePiotr Makal
This fix provides better conditions for asserts in `NURBSpline::knots` method accounting for cyclic NURBS curves. Differential Revision: https://developer.blender.org/D13620
2021-12-20Cleanup: Remove unused node type flagHans Goudey
This flag was checked, but not set anywhere.
2021-12-20Cleanup: Comment formatting in node.ccHans Goudey
Also remove a SCOPED_TIMER I added by mistake in a previous commit.
2021-12-20Geometry Nodes: Parallelize mesh grid primitiveHans Goudey
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
2021-12-20Cleanup: Remove unused argumentsHans Goudey
2021-12-20Update our USD 21.02 patch to support gcc-11Bastien Montagne
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.
2021-12-20Fix T94251: Cycles wrong pointcloud normal for instanced objectsBrecht Van Lommel
Refactor code a bit also so we need to do fewer matrix transforms for shader data setup of points and curves.
2021-12-20Fix Cycles OptiX crash with 3D curves after point cloud changesBrecht Van Lommel
Includes refactoring to reduce the number of bits taken by primitive types, so they more easily fit in the OptiX limit.
2021-12-20install_deps: Fix OIIO and OSL build with OpenEXRMaxime Chambonnet
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
2021-12-20BLI: fix Vector.prepend declarationJacques Lucke
Using `&&` there was a typo. With `&&` the `prepend` method could not be called with a const reference as argument.
2021-12-20Fix T93570: VSE image transforms in preview dont autokeyPhilipp Oeser
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
2021-12-20Docs: use doxygen formatting for BLICampbell Barton
Differentiate doc-strings from title/section text.
2021-12-20Docs: use doxygen formatting for DNACampbell Barton
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).
2021-12-20Docs: minor correction to doc-stringCampbell Barton
The text editor no longer accumulates changes.
2021-12-20Fix T94254: Crash using view_all operator in VSERichard Antalik
Caused by `NULL` dereference in `SEQ_meta_stack_active_get()`. Check if `Editing` is `NULL` before accessing meta stack.
2021-12-20Fix: Meta strip not created with alpha over blend modeRichard Antalik
Meta add function wasn't updated. All strips now use alpha over blending, so set it in `SEQ_sequence_alloc()`.
2021-12-20Cleanup: Remove more texture nodes preview handlingHans Goudey
Similar to the previous commit, this allowed removing a function to set a single pixel of a node preview.
2021-12-20VSE: Clamp sound strip when adding movie stripRichard Antalik
When adding multiple movie strips and sound stream is longer than video, this results in gaps between video strips, which is undesirable.
2021-12-20Cleanup: Remove more no-op node preview codeHans Goudey
This is a follow-up to rB43875e8dd1d76ee, removing some processing of non-existent node previews in the shader and texture nodes systems.
2021-12-20Cleanup: Const arguments, remove unused argumentHans Goudey
2021-12-19Cleanup: Clang tidy lamda function nameHans Goudey
2021-12-18Cleanup: Move weld modifier to C++Hans Goudey
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
2021-12-18Fix: Build error from missing includeHans Goudey
2021-12-18Fix: Link drag search missing field nodes from function nodesHans Goudey
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
2021-12-18Fix T94173: Missing update for frame node sizeHans Goudey
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.
2021-12-18Cleanup: compiler warnings with clangBrecht Van Lommel
Includes use of memcpy to avoid warnings about deprecated members.
2021-12-18Fix T94215: compositer denoise node UI wrongly shows as disabledBrecht Van Lommel
After recent refactoring in 4e98d974b596.
2021-12-18GPU: add memory barriers for vertex and index buffersKévin Dietrich
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
2021-12-18Function to return a list of keyframe segmentsChristoph Lendenfeld
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
2021-12-18Fix T94184: Outliner: Collection dragging tooltip is not updatingGermano Cavalcante
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.
2021-12-17Fix T94116: Drivers can have multiple variables with same nameSybren A. Stüvel
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
2021-12-17Theme: Node Group color only needs RGB, not RGBADalai Felinto
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.
2021-12-17Cleanup: Use signed integers in the weld modifierHans Goudey
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
2021-12-17Cleanup: quiet warning due to incompatible pointer typesJacques Lucke
2021-12-17Cleanup: use new c++ guarded allocator api in some filesJacques Lucke