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
2020-12-15Asset System: "Mark Asset" & "Clear Asset" operators and UI integrationJulian Eisel
This makes it possible to turn data-blocks into assets and back into normal data-blocks. A core design decision made for the asset system is that not every data-block should be an asset, because not every data-block is made for reuse. Users have to explicitly mark data-blocks as assets. Exposes "Mark Asset" and "Clear Asset" in Outliner context menus (currently ID Data submenu) and button context menus. We are still not too happy with the names, they may change. This uses the new context members to pass data-blocks to operators, added in af008f553293 and 0c1d4769235c. Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9717 Reviewed by: Brecht Van Lommel
2020-12-15Asset System: Data-block asset metadata storage, reading and APIJulian Eisel
Asset metadata is what turns a regular data-block into an asset. It is a small data-structure, but a key part of the technical design of the asset system. The design foresees that asset data-blocks store an `ID.asset_data` pointer of type `AssetMetaData`. This data **must not** have dependencies on other data-blocks or data-block data, it must be an independent unit. That way we can read asset-metadata from .blends without reading anything else from the file. The Asset Browser will use this metadata (together with the data-block name, preview and file path) to represent assets in the file list. Includes: * New `ID.asset_data` for asset metadata. * Asset tags, description and custom properties. * BKE code to manage asset meta-data and asset tags. * Code to read asset data from files, without reading IDs. * RNA for asset metadata (including tags) Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9716 Reviewed by: Bastien Montagne, Brecht Van Lommel
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-11-12Merge branch 'blender-v2.91-release' into masterBastien Montagne
2020-11-12Fix T82466: Library Overrides: overrides disappear when appending.Bastien Montagne
`BKE_library_make_local` was not properly checking for tags and/or libs in liboverrides case.
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-03Add a callback to `IDTypeInfo` to allow preservation of some data accross ↵Bastien Montagne
memfile undos This is essentially adding that new callback, and using it only for already existing Scene's 3DCursor. Note that the place where this is called has been moved again, after all have been lib-linked, such that those callbacks may also work on ID pointers. Maniphest Tasks: T71759 Differential Revision: https://developer.blender.org/D9237
2020-10-21Fix 'Make Local' operation to support liboverrides.Bastien Montagne
One can now use 'make local' from the Outliner or the 3DView to also fully localize overrides of linked data.
2020-10-19Spelling: Loose Versus LoseHarley Acheson
Corrects incorrect usages of the word 'loose' when 'lose' was required. Differential Revision: https://developer.blender.org/D9243 Reviewed by Campbell Barton
2020-10-07Refactor `BKE_id_copy` to return the new ID pointer.Bastien Montagne
No reasons to keep the new ID pointer as parameter here. Part of T71219.
2020-10-07Refactor `BKE_id_copy_ex` to return the new ID pointer.Bastien Montagne
Note that possibility to pass the new ID pointer as parameter was kept, as this is needed for some rather specific cases (like in depsgraph/COW, when copying into already allocated memory). Part of T71219.
2020-10-07Refactor: Remove `BKE_XXX_localize()`, in favor of using regular ID copying ↵Bastien Montagne
code. Besides the NodeTree case (which remains unchanged), the localize code is only used in one place (to generate previews of shading data-blocks). This commit introduces a new `LIB_ID_CREATE_LOCAL` option for ID creation/copying, which essentially implements the behavior of the removed `BKE_XXX_localize()` functions into regular mainstream ID copy code. When this option is set: - new ID is tagged with `LIB_TAG_LOCALIZED`; - Some ID copying callbacks have specific behaviors, mainly the root nodetree of shading IDs gets duplicated with specialized `ntreeLocalize()` function. Note that I would not consider getting rid of `ntreeLocalize` for now, this function is recursive, which should ideally never happen within ID management copying code (this introduces all kind of complications). No behavioral change expected from this commit.
2020-10-07Silence CLOG error about usercount of deprecated IPO IDs.Bastien Montagne
2020-10-03Cleanup: Remove/replace C standard library assert() and header usagesJulian Eisel
We have our own assert implementation, `BLI_assert()` that is prefered over the C standard library one. Its output is more consistent across compilers and makes termination on assert failure optional (through `WITH_ASSERT_ABORT`). In many places we'd include the C library header without ever accessing it.
2020-08-29Cleanup: spellingCampbell Barton
2020-08-28Merge branch 'blender-v2.90-release' into masterBastien Montagne
2020-08-28Fix T80104: Crash on making material local.Bastien Montagne
Problem is again with the embedded data, we want to make those local together with their owner ID, but sometimes we are actually dealing with copies here, which are inheritently already local. Code did not considered that possibility before, leading to access to a NULL `lib` pointer. This should also be back-ported to 2.83 LTS release. Maniphest Tasks: T80104 Differential Revision: https://developer.blender.org/D8731
2020-08-28Refactor: move Mesh .blend I/O to IDTypeInfo callbacksJacques Lucke
I'm also adding `BKE_id_blend_write`, so that it can be accessed outside of `readfile.c`.
2020-08-25Merge branch 'blender-v2.90-release'Philipp Oeser
2020-08-25Fix T80016: Shape key animation is linked when duplicating objectRed Mser
Fix T80016 Caused by a typo in rB7b1c406b5431ce65d84ddb5f2c53977c25c18373 Reviewed By: mont29, dfelinto Maniphest Tasks: T80016 Differential Revision: https://developer.blender.org/D8693
2020-08-07Cleanup: Blenkernel, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. No functional changes.
2020-07-23Fix T79162: 'prop_search' includes ID prefix in string propertiesCampbell Barton
Regression from d6cefef98f87a This also fixes an unreported issue where finding an exact match wasn't being detected for items that contained an ID prefix.
2020-07-09Implement T77959: Never duplicate linked data during deep-copy.Bastien Montagne
Note that this behavior is enforced on user level for now, but on code side it is controlled with a flag, which should make it easy to refine that behavior if needed. Only exception is when we duplicate a linked ID directly (then we assume user wants a local deep-copy of that linked data, and we always also duplicate linked sub-data-blocks). Note that this commit also slightly refactor the handling of actions of animdata, by simplifying `BKE_animdata_copy_id_action()` and adding an explicit new `BKE_animdata_duplicate_id_action()` to be used during ID duplication (deep copy). This also allows us to get rid of the special case for liboverrides.
2020-06-30Cleanup: LibOverride: Replace raw pointers checks by proper macros.Bastien Montagne
This is cleaner, but also crucial to avoid weird issues when behaviors of those checks are modified...
2020-06-29UI: Show library status icons in search menus, rather than letter prefixJulian Eisel
Rather than a `L` (linked), `O` (overridden) or `M` (missing) prefix for the name, show the existing library status icons. See D7999 for screenshots. Note that when using preview icons, or if the search menu contains items with own icons (e.g. brush icons), we still fallback to the prefix solution. Zero or fake user is still indicated with a prefix. Differential Revision: https://developer.blender.org/D7999 Reviewed by: Bastien Montagne, William Reynish
2020-06-29Fix ID_swap not keeping original recalc flags.Bastien Montagne
Note that we might be missing more things there still, maybe some tags e.g. should also be swapped?
2020-06-27Docs: correct invalid doxygen params & referencesCampbell Barton
2020-06-25Cleanup: spellingCampbell Barton
2020-06-23Cleanup: rename Library.filepath to filepath_absCampbell Barton
Make it clear that this is the absolute path, allow the 'name' to be renamed to 'filepath'. Rename is safe since this is only for run-time.
2020-06-17ID Duplicate: Factorize a lot the code.Bastien Montagne
Now that we have a uniform consistent behavior in all our ID duplicate funtions, we can easily factorize it greatly. Code gets cleaner, smaller, and less error-prone. Note that ultimately, this duplicate/deep copy behavior could be added as a callback of IDTypeInfo. We could also rethink the duplicate flags (some data, even some obdata, like Lattice, are not coverred currently). And so on. But at least code should now be much more easily maintainable and extendable.
2020-06-15Fix T77774: New undo code broken by 'make local' behavior.Bastien Montagne
This is actually a nice issue due to too much optimization... * Making an ID local just reuse the linked one whenever possible, instead of actually making a copy of it. * Therefore, the collection containing that ID is seen as unchanged, since the pointer itself remained the same. * But on undo step, there is no way to reuse that local object, which then gets deleted, and linked one gets re-created - at a different address. * Collection, however, since unchanged, is not updated at all and thus keeps reference to the to-be-deleted local object, instead of the linked one. * Issue gets even worse with viewlayers, this leads to the crash. To address this, this patch adds a 'virtual' update flags that does nothing in update case, but will ensure that the affected IDs using the one made local are properly detected as changed across the relevant undo step. Note that the recalc flags were chosen mostly for a logical reason, and also because they are already properly dealt with and cleared by undo code, so this looks like the optimal solution. Reviewed By: brecht Maniphest Tasks: T77774 Differential Revision: https://developer.blender.org/D8006
2020-06-13Cleanup: spellingCampbell Barton
2020-06-10Enable (deep) copy of overrides.Bastien Montagne
This commit enables basic copy of overrides on generic ID level, as well as from (deep) copy operators for objects and collections. So e.g. if your linked overridden caracter is in a collection, you can now (from the outliner) Duplicate that override collection to get a new overriding copy of the character. We still need operators (new or modifying existing ones) to handle that from 3DView e.g. Note that deep copy code for objects/collections (and incidently animdata) had to be modified to avoid duplicating/making local IDs that remain linked ones being used by overrides ones.
2020-06-10UI: Show library names grayed out and right-aligned in menusJulian Eisel
Should separate the data-block name better from the library name and improve readability.
2020-05-25Merge branch 'blender-v2.83-release'Bastien Montagne
Conflicts: source/blender/blenkernel/intern/lib_id.c
2020-05-25Cleanup: ID makelocal code: remove useless and confusing debug code.Bastien Montagne
Thing is, user code should not have the responsibility to check that libquery is valid. Such checks are only source of confusion and errors as nobody will think about finding and updating them in some obscure specific area of the code...
2020-05-25Libquery: Refactor: add bmain to data passed to callback.Bastien Montagne
No reason to enforce defining own callback user data for something that controlling has already available...
2020-05-25Fix T76997: bad handling of embedded IDs in partial append.Bastien Montagne
Code dealing with embedded data was pre-existing proper generic handling of those by `BKE_library_foreach_ID_link()` - and was never updated for scene's master collection it would seem... Note that such fix/refactor is a bit risky at this point in the release cycle, but on the other end previous situation was really broken. So finger crossed. :|
2020-05-25Fix T76997: bad handling of embedded IDs in partial append.Bastien Montagne
Code dealing with embedded data was pre-existing proper generic handling of those by `BKE_library_foreach_ID_link()` - and was never updated for scene's master collection it would seem... Note that such fix/refactor is a bit risky at this point in the release cycle, but on the other end previous situation was really broken. So finger crossed. :|
2020-05-15Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-15Fix duplicate ID's being created when appending/linkingCampbell Barton
This removes grease pencil brush creation/dat-block delete on load, since this causes duplicate data-blocks. Add assert to prevent this happening in the future since the error is isn't obvious.
2020-05-13Merge branch 'blender-v2.83-release'Bastien Montagne
2020-05-13Fix T76646: Crash when changing Size in Add Cube pop-up in some cases.Bastien Montagne
Remove resetting of ID uuid session counter, it is not really needed anymore, and not trivial to do this properly everytime. Thanks @brecht for investigating this.
2020-04-21Merge branch 'blender-v2.83-release'Bastien Montagne
2020-04-21Fix T75893: Undo causes crash with "Load UI" disabled.Bastien Montagne
We need to re-generate a new session uuid for the UI-related data-blocks that are kept across file reading, when load UI is disabled. Otherwise there will be several IDs with same uuid, which is an ensured way to crash in new undo code.
2020-04-21Cleanup: remove unused includesBrecht Van Lommel
2020-04-17Cleanup: use colon after doxygen parameters, spellingCampbell Barton
2020-04-14Cleanup: spellingCampbell Barton
2020-04-10Fix T74815: Shapekeys animation is blocked after second append of the same ↵Bastien Montagne
object. Logic to handle shepkeys datablocks in helper in 'make local' code that checks which ID should be copied, and which can be directly made local, was wrong.
2020-04-09Silence assert on ID usercount for deprecated IPO.Bastien Montagne
We do not really care about those, so just avoid the noise when loading very old files... Re T75389.