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-11-24Cleanup: `IDTypeInfo` new `asset_type_info` member.Bastien Montagne
Two issues addressed here: I) `asset_type_info` is sub-data, not a callback. Therefore, move it before the callbacks in the `IDTypeInfo` struct. II) More important, initialize this new attribute in *ALL* `IDTypeInfo` instances. No member of this struct should ever be left implicitely uninitilazed, ever. Aftermath of rBa84f1c02d251.
2021-11-24Cleanup: Add info about attributes init in Mesh IDTypeInfo after conversion ↵Bastien Montagne
to C++. rB6002914f141f totally lost those info, in C++ we use comments by convention.
2021-11-23Merge branch 'blender-v3.0-release'Jacques Lucke
2021-11-23Fix T93231: crash when overwriting vertex group with other domainJacques Lucke
The problem was that we forgot to actually remove the vertex group when it should be deleted. We only removed all the data that was attached to it. Differential Revision: https://developer.blender.org/D13326
2021-11-23Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-11-23Asset Browser: add operator for installing asset bundlesSybren A. Stüvel
Add an operator "Copy to Asset Library" for installing asset bundles into already-existing asset libraries. The operator is shown when: - the "Current File" library is selected, - the blend file name matches `*_bundle.blend`, and - the file is not already located in an asset library. The user can select a target asset library, then gets a "Save As" dialogue box to select where in that library the file should be saved. This allows for renaming, saving in a subdirectory, etc. The Asset Catalogs from the asset bundle are merged into the target asset library. The operator will refuse to run when external files are referenced. This is not done in its poll function, as it's quite an extensive operator (it loops over all ID datablocks). Reviewed by: Severin Differential Revision: https://developer.blender.org/D13312
2021-11-23BKE LibLink/Append: Add mechanism for external code to loop over link/append ↵Bastien Montagne
context items. Will be required for python's `bpy.data.libraries.load()` refactor.
2021-11-23BKE link/append: Add optional blendfile handle to libraries.Bastien Montagne
This enables calling code to deal with the blendfile handle themselves, BKE_blendfile_link then just borrows, uses this handle and does not release it. Needed e.g. for python's libcontext system to use new BKE_blendfile_link_append code. Part of T91414: Unify link/append between WM operators and BPY context manager API, and cleanup usages of `BKE_library_make_local`.
2021-11-23Cleanup: add missing pragma onceJacques Lucke
2021-11-23BKE link/append: Add optional blendfile handle to libraries.Bastien Montagne
This enables calling code to deal with the blendfile handle themselves, BKE_blendfile_link then just borrows, uses this handle and does not release it. Needed e.g. for python's libcontext system to use new BKE_blendfile_link_append code. Part of T91414: Unify link/append between WM operators and BPY context manager API, and cleanup usages of `BKE_library_make_local`.
2021-11-23Merge branch 'blender-v3.0-release'Jacques Lucke
2021-11-23Fix T93092: incomplete animation rendering of multi-layer exr compositionJacques Lucke
This was broken by rB0c3b215e7d5456878b155d13440864f49ad1f230. The caching of loaded exr files needed some special treatment. Differential Revision: https://developer.blender.org/D13313
2021-11-23Fix T93090: crash with data transfer modifier and geometry nodesJacques Lucke
There was a missing normals layer that was requested by the data transfer modifier from the target object. The normal layer was correctly added to the target object. However, it never reached the data transfer modifier because the mesh was copied in `BKE_object_get_evaluated_mesh` (in the call to `get_mesh_for_write`) and the copy does not include the normals layer. The solution is to not use `get_mesh_for_write` here which was only used because `BKE_object_get_evaluated_mesh` returns a non-const `Mesh *`. Mid term, it should actually return a `const Mesh *` to avoid the confusion. Differential Revision: https://developer.blender.org/D13319
2021-11-22Merge branch 'blender-v3.0-release'Julian Eisel
2021-11-22Fix grayed out preview generation button for light objectsJulian Eisel
Mistake in e7bea3fb6ed0. We should only skip preview generation for objects that don't support preview rendering, not completely forbid accessing preview data of such IDs.
2021-11-22CurveEval: Add total_length() and total_control_point_size() methodsJohnny Matthews
Add the following methods to the CurveEval class: total_length() : returns the total length of the curve without needing to allocate a new array total_control_point_size() : returns the total number of control points without needing to allocate a new array
2021-11-22BKE Link/Append: Use BLO's LibraryLink_Params.Bastien Montagne
This allows to reduce signature of several functions, and make it eaiser to integrate more higher-level usages later on. This should be a non-behavioral-change commit. Part of T91414: Unify link/append between WM operators and BPY context manager API, and cleanup usages of `BKE_library_make_local`.
2021-11-22Link/Append: Move main linking code (from WM) to use new instantiation code ↵Bastien Montagne
in BKE. This removes the last main usage of BLO's instantiation code. Also required some limited refactoring of BKE_blendfile_link_append's instantiation to make it more modular, and usable by both linking and appending code paths. NOTE: This should be a non-behavioral change commit. Part of T91414: Unify link/append between WM operators and BPY context manager API, and cleanup usages of `BKE_library_make_local`.
2021-11-22Link/Append: Move most of core link/append code from WM to new ↵Bastien Montagne
`BKE_blendflie_link_append` module. This will allow to expose all those advanced features of the WM operators to other parts of the code, like the python library context manager, copy/paste code, etc. This is expected to be a strictly no-behavioral-change commit. Part of T91414: Unify link/append between WM operators and BPY context manager API, and cleanup usages of `BKE_library_make_local`. Maniphest Tasks: T91414 Differential Revision: https://developer.blender.org/D13222
2021-11-22Cleanup: Make parameter const (BKE_brush_curve_strength_clamped).Jeroen Bakker
2021-11-22Cleanup: use simple data member instead of callbackJacques Lucke
This really doesn't have to be a callback currently, since it is always the same `CPPType` for a socket type.
2021-11-19Geometry Nodes: Support custom instance attributesErik
Adds an attribute provider for instance attributes. A new domain `ATTR_DOMAIN_INSTANCE` is implemented. Instance attributes are not yet realized correctly. Differential Revision: D13149
2021-11-19Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-11-19Merge branch 'blender-v3.0-release'Bastien Montagne
Conflicts: source/blender/blenkernel/BKE_blender_version.h source/blender/blenloader/intern/versioning_300.c
2021-11-19Asset Preferences: disallow single file as asset librarySybren A. Stüvel
Asset libraries should be directories on disk. By manually entering a file path it was possible to have a single blend file as asset library, but that was not a designed-for situation, and it doesn't play well with the asset catalog system.
2021-11-19Cleanup: typos in commentsPhilipp Oeser
2021-11-19LibOverrides: Refactor how diffing of RNA collections is handled.Bastien Montagne
Original implementation was a quick prototype which should have never landed as-is in master. It had very limiting constraints and did not allow for any real further development. This commit fixes the internal implementation to make more sensible, maintainable and evolutive. NOTE: This commit introduces another forward-incompatibility in the Blender file format: Files saved after this commit won't open properly in older versions of blender regarding local inserted constraints or modifiers into overrides of linked data. NOTE: Technical details: The 'anchor' item name/index is now stored in `subitem_reference_` members, and the actual 'source' item name/index is stored in `subitem_local_` members of the override property operation data. Previously, only the `subitem_local_` members were used, storing the anchor item name/index, and assuming the 'source' item was always the next in the list. Milestone I of T82160. Maniphest Tasks: T82160 Differential Revision: https://developer.blender.org/D13282
2021-11-19Merge branch 'blender-v3.0-release'Omar Emara
2021-11-19Cleanup: fix typos in comments and docsBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D13264
2021-11-19Fix (unreported) wrong behavior of constraints in liboverrides.Bastien Montagne
All constraints were 'made local', including the ones comming from the reference linked object.
2021-11-18Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-11-18Fix T92442: undo removal of Eevee cryptomatte accurate mode optionBrecht Van Lommel
The Cycles accurate mode was removed, but the Eevee option for this has a different meaning and should not have been removed. The Eevee accurate makes cryptomatte accumulate for every sample, which Cycles has always done regardless of any option.
2021-11-18Fix: error when materializing curve point attributeJacques Lucke
Differential Revision: https://developer.blender.org/D13271
2021-11-17Cleanup: use same function for updating internal links for all nodesJacques Lucke
Previously, node types had a callback that creates internal links. Pretty much all nodes used the same callback though. The exceptions are the reroute node (which probably shouldn't be mutable anyway) and some input/output nodes that are not mutable. Removing the callback helps with D13246, because it makes it easier to reason about which internal links are created and when they change. In the future, the internal links should be part of the node declaration.
2021-11-17Cleanup: change node socket availability in a single placeJacques Lucke
This cleans up part of the code that still set the flag manually. Also, this change helps with D13246 because it makes it easier to tag the node tree as changed when the availability of a socket changed.
2021-11-17Fix T90412: Inconsistency in mask strip colorRichard Antalik
This seems to be oversight in 271231f58ee3 where strip color was defined only for light theme.
2021-11-17Merge branch 'blender-v3.0-release'Brecht Van Lommel
2021-11-17Cleanup: compiler warningsBrecht Van Lommel
2021-11-16Merge branch 'blender-v3.0-release'Hans Goudey
2021-11-16Fix T92857: Deadlock in geometry nodes curve multi-threadingHans Goudey
The spline code, especially Bezier splines, often make use of lazily evaluation and caching. In order to do that, they use mutex locks. When multi-threading, this can lead to problems. Further detail can be found in rBfcc844f8fbd0d1. To fix the deadlock, isolate the task before multi-threading when holding a lock. Differential Revision: https://developer.blender.org/D13229
2021-11-16Merge branch 'blender-v3.0-release'Sergey Sharybin
2021-11-16Fix crash on freeing hair systemSybren A. Stüvel
Fix a crash when a hair system's `ParticleSettings` ID datablock was linked from another file but couldn't be found. This results in default settings, with `type = PART_EMITTER`, where the particle data still has a non-NULL `hair` pointer. Previously, copies of such a particle system would NOT copy hair data for non-hair particle systems, hence the pointer of the copy pointed to the original data, which got freed (at least) twice upon closing the blend file. This is now fixed by always copying the hair data, regardless of the particle system type. Reviewed by: mont29 Differential Revision: https://developer.blender.org/D13245
2021-11-16Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-11-16Tests: fix memory leak of GHOST system pathsSybren A. Stüvel
Dispose of GHOST system paths when tearing down `BlendfileLoadingBaseTest` and some other test cases. This prevents a memory leak. A better solution would be to rework Blender's initialisation & teardown structure, but that's outside the scope of this fix. No functional changes to Blender.
2021-11-16Geometry Nodes: refactor virtual array systemJacques Lucke
Goals of this refactor: * Simplify creating virtual arrays. * Simplify passing virtual arrays around. * Simplify converting between typed and generic virtual arrays. * Reduce memory allocations. As a quick reminder, a virtual arrays is a data structure that behaves like an array (i.e. it can be accessed using an index). However, it may not actually be stored as array internally. The two most important implementations of virtual arrays are those that correspond to an actual plain array and those that have the same value for every index. However, many more implementations exist for various reasons (interfacing with legacy attributes, unified iterator over all points in multiple splines, ...). With this refactor the core types (`VArray`, `GVArray`, `VMutableArray` and `GVMutableArray`) can be used like "normal values". They typically live on the stack. Before, they were usually inside a `std::unique_ptr`. This makes passing them around much easier. Creation of new virtual arrays is also much simpler now due to some constructors. Memory allocations are reduced by making use of small object optimization inside the core types. Previously, `VArray` was a class with virtual methods that had to be overridden to change the behavior of a the virtual array. Now,`VArray` has a fixed size and has no virtual methods. Instead it contains a `VArrayImpl` that is similar to the old `VArray`. `VArrayImpl` should rarely ever be used directly, unless a new virtual array implementation is added. To support the small object optimization for many `VArrayImpl` classes, a new `blender::Any` type is added. It is similar to `std::any` with two additional features. It has an adjustable inline buffer size and alignment. The inline buffer size of `std::any` can't be relied on and is usually too small for our use case here. Furthermore, `blender::Any` can store additional user-defined type information without increasing the stack size. Differential Revision: https://developer.blender.org/D12986
2021-11-16Cleanup: Use C++ matrix identity constructorHans Goudey
2021-11-15Merge branch 'blender-v3.0-release'Richard Antalik
2021-11-15Fix T91992: Incorrect clip strip image sizeRichard Antalik
When proxy size lower than 100% is used, clip strips are rendered with incorrect image size. This is because if proxies aren't enabled in movieclip, it automatically falls back on rendering original media. Sequencer doesn't have knowledge about this and since 9c99292a16df it assumes that image is proxy, because it explicitly requested this size. Check movieclip flag to see if proxies are enabled. Reviewed By: sergey Differential Revision: https://developer.blender.org/D13080
2021-11-15Cleanup: remove unnecessary functionsJacques Lucke
Those functions were more useful when `FieldInferencingInterface` was still declared further down in `node.cc`.
2021-11-15Merge branch 'blender-v3.0-release'Hans Goudey