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-15Fix meta-ball bound-box calculation reading past buffer boundsCampbell Barton
This broke "test_undo.view3d_multi_mode_select" test in "lib/tests/ui_simulate" and is likely exposed by recent changes to bounding box calculation. The missing check for DL_INDEX4 dates back to code from 2002 which intended to check this but was checking for DL_INDEX3 twice which got removed as part of a cleaned up. This could be hidden from memory checking tools as meta-balls over-allocate vertex arrays.
2021-12-14Geometry Nodes: support instance attributes when realizing instancesJacques Lucke
This patch refactors the instance-realization code and adds new functionality. * Named and anonymous attributes are propagated from instances to the realized geometry. If the same attribute exists on the geometry and on an instance, the attribute on the geometry has precedence. * The id attribute has special handling to avoid creating the same id on many output points. This is necessary to make e.g. the Random Value node work as expected afterwards. Realizing instance attributes has an effect on existing files, especially due to the id attribute. To avoid breaking existing files, the Realize Instances node now has a legacy option that is enabled for all already existing Realize Instances nodes. Removing this legacy behavior does affect some existing files (although not many). We can decide whether it's worth to remove the old behavior as a separate step. This refactor also improves performance when realizing instances. That is mainly due to multi-threading. See D13446 to get the file used for benchmarking. The curve code is not as optimized as it could be yet. That's mainly because the storage for these attributes might change soonish and it wasn't worth optimizing for the current storage format right now. ``` 1,000,000 x mesh vertex: 530 ms -> 130 ms 1,000,000 x simple cube: 1290 ms -> 190 ms 1,000,000 x point: 1000 ms -> 150 ms 1,000,000 x curve spiral: 1740 ms -> 330 ms 1,000,000 x curve line: 1110 ms -> 210 ms 10,000 x subdivided cylinder: 170 ms -> 40 ms 10 x subdivided spiral: 180 ms -> 180 ms ``` Differential Revision: https://developer.blender.org/D13446
2021-12-14Fix T93920: Wrong field inferencing state with unavailable socketHans Goudey
This commit ignores unavailable sockets in one more place, to fix the case in T93920. Differential Revision: https://developer.blender.org/D13562
2021-12-14Cleanup: consistent naming for the blender file nameCampbell Barton
2021-12-14Cleanup: remove oudated comment from early COW developmentCampbell Barton
Added in 161ab6109e265ea906e0308ab404f95282534770
2021-12-14Cleanup: resolve parameter mis-matches in doc-stringsCampbell Barton
Renamed or removed parameters which no longer exist.
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-14Fix T91005: Autosplit produces unusable filesRichard Antalik
Audio PTS was reset for each new file. This caused misalignment of video and audio streams. In Blender, these files can't be loaded, other players will fail to align audio and video. Since timestamps are reset intentionally, reset also video stream timestamps. There were other bugs: After timestamp was reset for audio, write_audio_frames started encoding from timeline start until target frame, so each split video had more audio than it should. Also audio for last frame before splitting was written into new file. Differential Revision: https://developer.blender.org/D13280
2021-12-13GPencil: New Shrinkwrap modifierAntonio Vazquez
his new modifier is equals to the existing mesh modifier but adapted to grease pencil. The underlying functions used to calculate the shrink are the same used in meshes. {F11794101} Reviewed By: pepeland, HooglyBoogly Differential Revision: https://developer.blender.org/D13192
2021-12-13Cleanup: use "filepath" term for Main, BlendFileData & FileGlobalCampbell Barton
Use "filepath" which is the current convention for naming full paths. - Main use "name" which isn't obviously a file path. - BlendFileData & FileGlobal used "filename" which is often used for the name component of a path (without the directory).
2021-12-13Cleanup: Point cloud vs point-cloud in commentsHans Goudey
Point cloud is two separate words, this just changes comments in a few places where we were inconsistent. A small wording change to another comment is also included.
2021-12-11macOS: add tilde-based path expanderAnkit Meel
Replaces `HOME` environment variable usage for user directories like in D12802. Reviewed By: #platform_macos, brecht Differential Revision: https://developer.blender.org/D13212
2021-12-11Cleanup: Use const argumentsHans Goudey
Also remove unnecessary function to set a node type's label function that duplicated its definition, and make another function static.
2021-12-11Cleanup: Return early for null checkHans Goudey
2021-12-10Cleanup/Docs: Add comments to Mesh header, rearrange fieldsHans Goudey
Most of the fields in Mesh had no comments, or outdated misleading comments. For example, "BMESH ONLY" referred to the BMesh project, not the data structure. Given how much these structs are used, it should save a lot of time to have proper comments. I also rearranged the fields in mesh to have a more logical order. Now the most important fields come first. In the process I was able to remove 19 bytes of unnecessary padding (31->12). I just had to change a `short` flag to `char`. Differential Revision: https://developer.blender.org/D13454
2021-12-10Cleanup: move public doc-strings into headers for various API'sCampbell Barton
Some doc-strings were skipped because of blank-lines between the doc-string and the symbol and needed to be moved manually. - Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. Ref T92709
2021-12-10Geometry Nodes: Remove unnecessary copy when replacing dataHans Goudey
In the `replace_mesh`/`replace_curve` etc. methods, the component was retrieved with write access. Retrieving with write access will duplicate the data if the component has another user. This means that the replaced geometry data was often duplicated just to be deleted a moment later. I expect this would have a large impact in performance in some specific situations when dealing with large geometry. In a scene with many small meshes though, I didn't observe a significant difference. This also makes replacing a geometry set's data with the same data that's already in the set safe. It would be valid to assert for that case instead, but this seems safer. Differential Revision: https://developer.blender.org/D13530
2021-12-09Cleanup: Return early in null checkHans Goudey
I'm planning to make these functions slightly more complicated, and it makes sense to return early when checking one of the parameters for null anyway.
2021-12-09Geometry Nodes: Scene Time NodeJohnny Matthews
This node outputs the current scene time in seconds or in frames. Use of this node eliminates the need to use drivers to control values in the node tree that are driven by the scene time. Frame is a float value to provide for subframe rendering for motion blur. Differential Revision: https://developer.blender.org/D13455
2021-12-09Fix T93871: Image.has_data returns True for images that failed to loadBrecht Van Lommel
2021-12-09Fix T93523: Memory leak in Menu SearchErik
Fixes a memory leak introduced by D13225. Caused by not freeing the hash-map in some cases. Differential Revision: https://developer.blender.org/D13432
2021-12-08Geometry Nodes: Mesh Island NodeJohnny Matthews
This node is a field input that outputs a separate index for each mesh island. The indices are based on the order of the lowest-numbered vertex in each island. Authoring help from @hooglyboogly Differential Revision: https://developer.blender.org/D13504
2021-12-08Cleanup: Silence clang-tidy warnings.Jeroen Bakker
2021-12-08Cleanup: Clang-Tidy modernize-redundant-void-argAaron Carlisle
2021-12-07Geometry Nodes: Edge Neighbors NodeJohnny Matthews
Creates a new Edge Neighbors node which outputs a field containing the number of faces connected to each edge. Differential Revision: https://developer.blender.org/D13493
2021-12-07Geometry Nodes: new Geometry to Instance nodeJacques Lucke
This adds a new Geometry to Instance node that turns every connected input geometry into an instance. Those instances can for example be used in the Instance on Points node. Differential Revision: https://developer.blender.org/D13500
2021-12-07Geometry Nodes: move type conversions to blenkernelJacques Lucke
The type conversions do not depend on other files in the nodes module. Furthermore we want to use the conversions in the geometry module without creating a dependency to the nodes module there.
2021-12-07Revert moving all shader nodes to c++Jacques Lucke
This reverts to following commits: * rB5cad004d716da02f511bd34983ac7da820308676 * rB97e3a2d935ba9b21b127eda7ca104d4bcf4e48bd * rBf60b95b5320f8d6abe6a629fe8fc4f1b94d0d91c * rB0bd3cad04edf4bf9b9d3b1353f955534aa5e6740 * rBf72cc47d8edf849af98e196f721022bacf86a5e7 * rB3f7014ecc9d523997062eadd62888af5fc70a2b6 * rB0578921063fbb081239439062215f2538a31af4b * rBc20098e6ec6adee874a12e510aa4a56d89f92838 * rBd5efda72f501ad95679d7ac554086a1fb18c1ac0 The original move to c++ that the other commits depended upon had some issues that should be fixed before committing it again. The issues were reported in T93797, T93809 and T93798. We should also find a better rule for not using c-style casts going forward, although that wouldn't have been reason enough to revert the commits. Introducing something like a `MEM_new<T>` and `MEM_delete<T>` function might help with the the most common case of casting the return type of `MEM_malloc`. Going forward, I recommend first committing the changes that don't require converting files to c++. Then convert the shading node files in smaller chunks. Especially don't mix fairly low risk changes like moving some simple nodes, with higher risk changes.
2021-12-07Cleanup: remove BKE_ptcache_removeCampbell Barton
No longer needed as the temporary directory is cleared on exit.
2021-12-07Cleanup: clarify source/destination args for BKE_spacedata_copylistCampbell Barton
2021-12-07Cleanup: remove incorrect/unhelpful commentsCampbell Barton
2021-12-07Cleanup: replace int with bool typeCampbell Barton
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-12-07Cleanup: Fix various source typosluzpaz
This is a continuation of D13462 to clean up source typos. Differential Revision: https://developer.blender.org/D13471
2021-12-07Cleanup: Remove unused includesHans Goudey
2021-12-06Shader Nodes: Split each node into own fileAaron Carlisle
This improves both code finding, for example "color ramp" now has its own file. And now each node has its own namespace so function names can be simplified similar to rBfab39440e94 This commit also makes all file names use snake case instead of camel case. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D13482
2021-12-06Geometry Nodes: reduce code duplication with new GeometyrFieldInputJacques Lucke
Most of our field inputs are currently specific to geometry. This patch introduces a new `GeometryFieldInput` that reduces the overhead of adding new geometry field input. Differential Revision: https://developer.blender.org/D13489
2021-12-06Geometry Nodes: 4 Field Inputs for Mesh Topology DataJohnny Matthews
Creates 4 new nodes which provide topology information for the mesh. Values are interpolated from the primary domain in each case using basic attribute interpolation. Vertex Neighbors - Vertex Count - Face Count Face Neighbors - Vertex Count - Neighboring Face Count Edge Vertices - Vertex Index 1 - Vertex Index 2 - Position 1 - Position 2 Face Area - Face Area Differential Revision: https://developer.blender.org/D13343
2021-12-06Cleanup: remove unnecessary extern template implementationsJacques Lucke
This technique isn't really necessary anymore, because unity builds avoid instantiating the same template too many times already.
2021-12-06Fix T93707: Dragging the tweaked NLA strip causes crashSybren A. Stüvel
Earlier code assumed that the active strip was on the active track. This commit detects when this assumption doesn't hold, and adds a more thorough search of the active strip.
2021-12-06Cleanup: remove some temp dev asserts in new link/append code.Bastien Montagne
No longer needed now that all code uses that new BKE_blendfile_link_append module, and that instantiation code in BLO_readfile has been removed.
2021-12-05Geometry Nodes: use array instead of map in GeometrySetJacques Lucke
`GeometrySet` contains at most one component of each type. Previously, a map was used to make sure that each component type only exists once. The overhead of a map (especially with inline storage) is rather large though. Since all component types are known at compile time and the number of types is low, a simple `std::array` works as well. Some benefits of using `std::array` here: * Looking up the component of a specific type is a bit faster. * The size of `GeometrySet` becomes much smaller from 192 to 40 bytes. * Debugging a `GeometrySet` in many tools becomes simpler because one can easily see which components exists and which don't
2021-12-04Cleanup: Use references in node editor, other improvementsHans Goudey
This helps to tell when a pointer is expected to be null, and avoid overly verbose code when dereferencing. This commit also includes a few other cleanups in this area: - Use const in a few places - Use `float2` instead of `float[2]` - Remove some unnecessary includes and old code The change can be continued further in the future.
2021-12-03ImBuf: Made Wrapping and Cropping optional in IMB_transform.Jeroen Bakker
`IMB_transform` is used in VSE. It had a required crop parameter for cropping the source buffer. This is not always needed. In the image engine we want to use the use the `IMB_transform` with wrap repeat. Both options are mutual exclusive and due to performance reasons the wrap repeat is only available when performing a nearest interpolation.
2021-12-02Cleanup: Avoid using C++ keyword as variable nameHans Goudey
2021-12-02Fix (unreported): incorrect custom data layer createdJacques Lucke
Without this fix `CustomDataAttributes::create_by_move` did not work on named attributes.
2021-12-02Cleanup: Move public docs to BKE_spline.hh headerHans Goudey
2021-12-02Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-12-02Fix `Action.asset_data["is_single_frame"]` set incorrectlySybren A. Stüvel
The asset metadata custom property `["is_single_frame"]` was set incorrectly. Since this is intended for forward compatibility, including being covered by the asset metadata indexing, it's important to have it set correctly from the first release of Blender that includes the asset browser. Differential Revision: https://developer.blender.org/D13452
2021-12-02Fix: don't use `BLI_strncpy_utf8` for copying file pathsSybren A. Stüvel
File paths can be any encoding, so using some UTF-8-specific function is not the right way to go.