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
2022-03-31Cleanup: spelling, trailing space for comment-blocksCampbell Barton
2022-03-29LibOverride: Rename 'delete hierarchy' to 'clear hierarchy', add 'clear ↵Bastien Montagne
single' operations. 'Delete' was a confusing name, even though it would delete the overrides it would replace them by linked data. Adding the 'single' version of that operation made it even more confusing, since often it has to keep the override ID for sakes of hierarchy, and just reset it and turn it back into a non-editable system override. Ref: {T95707}.
2022-03-29LibOverride: Add initial System Override flag.Bastien Montagne
This merely adds the flag, exposes it in RMA, and uses it in some of the most common 'is editable' checks (RNA, `BASE_EDITABLE` macro...). Next step: do_version and defining systemoverrides at creation. Ref: {T95707}.
2022-02-25LibOverrides: fix handling of hierarchy root in complex cases.Bastien Montagne
This affects essentially the Outliner 'create hierarchy' tool currenlty. Previously code did not handle properly hierarchy root in case overrides where created from a non-root ID (e.g. an object inside of a linked collection), and in case additional partial overrides were added to an existing partially overrided hierarchy. Also did some renaming on the go to avoid using 'reference' in override context for anything else but the reference linked IDs.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-10LibOverride: Fix/improve handling of hierarchy root in tagged creation.Bastien Montagne
Decouple the reference (linked) root ID and the hierarchy (override) root ID. Previous code was assuming that the reference ID was always also tagged for override creation, which is true in current master, but cannot be assumed in general (and won't be true with partial resync anymore). Also add asserts to validate conditions that the reference/hierarchy_root variables must meet.
2022-02-08LibOverride: Add 'hierarchy root ID' info.Bastien Montagne
This change will make handling of liboverrides hierarchies (especially resyncing) much easier and efficient. It should also make it more resilient to 'degenerate' cases, and allow proper support of things like parenting an override to another override of the same linked data (e.g. a override character parented to another override of the same character). NOTE: this commit only implements minimal changes to add that data and generate it for existing files on load. Actual refactor of resync code to take advantage of this new info will happen separately.
2022-02-02LibOverride: Add 'owner library' info to some liboverride code.Bastien Montagne
This will help when dealing with liboverrides from other library files, e.g for resync or proxies conversion. This commit only affects proxy conversion. Part of T91671.
2022-01-14Cleanup: spelling in comments, C++ style comments for disabled codeCampbell Barton
Also ensure space at end of comment.
2022-01-07LibOverrides: small refactor of resync main public function.Bastien Montagne
Simplify signature of `BKE_lib_override_library_resync` and make it a shallow wrapper around new internal `lib_override_library_resync` that can then be easily extended for other internal needs. Not functional changes expected here.
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2022-01-06Cleanup: spelling in commentsCampbell Barton
2022-01-05Fix T94650: LibOverride: Bad handling of (auto)resync in case of single ↵Bastien Montagne
override. Overrides that are not created as part of an override hierarchy should not be handled through (auto)resync at all. users are responsible to hanlde those updates if they need it. This is achieved by flagging overrides created outside of a hierarchical process accordingly, and skipping them during resync process.
2021-12-14Cleanup: resolve parameter mis-matches in doc-stringsCampbell Barton
Renamed or removed parameters which no longer exist.
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-09-28Fix T89400: Possible to delete objects used by overrides of collections.Bastien Montagne
This should not be allowed in general, added some initial call to check when user is allowed to delete a data to search for mandatory override usages...
2021-09-24LibOverride: Add utils to convert all proxies to overrides.Bastien Montagne
2021-07-16Cleanup: sort struct declarationsCampbell Barton
2021-06-28LibOverride: Fix crash in ShapeKeys when making a mesh override local.Bastien Montagne
Weird 'embedded for overrides' flag of embedded IDs (including ShapeKeys in override context) was not properly cleaned up when making an override fully local. Reported by studio, thanks. @jbakker should be backported to 2.93LTS if possible.
2021-06-23Revert "Revert "Enhanced stats/reports for blendfile reading.""Bastien Montagne
This reverts commit rB3a48147b8ab92, and fixes the issues with linking etc. Change compared to previous buggy commit (rBf8d219dfd4c31) is that new `BlendFileReadReports` reports are now passed to the lowest level function generating the `FileData` (`filedata_new()`), which ensures (and asserts) that all code using it does have a valid non-NULL pointer to a `BlendFileReadReport` data. Sorry for the noise, it's always when you think a change is trivial and do not test it well enough that you end up doing those kind of mistakes...
2021-06-22Revert "Enhanced stats/reports for blendfile reading."Brecht Van Lommel
This change crashes library linking operators, related tests and probably more. This reverts commit f8d219dfd4c31a918e33cb715472d91a5cd3fd51. Ref D11583
2021-06-22Enhanced stats/reports for blendfile reading.Bastien Montagne
Add direct user feedback (as a warning report) to user when recursive resync of overrides was needed. And some timing (as CLOG logs) about main readfile process steps. This is essentially adding a new BlendFileReadReport structure that wraps BKE_reports list, and adds some extra info (some timing, some info about overrides and (recursive) resync, etc.).
2021-06-03LibOverride: Add `override_hierarchy_create`to ID's RNA API.Bastien Montagne
2021-05-26LibOverride: add recursive resync.Bastien Montagne
Recursive resync means also resyncing overrides that are linked from other library files into current working file. Note that this allows to get 'working' files even when their dependencies are out of sync. However, since linked data is never written/saved, this has to be re-done every time the working file is loaded, until said dependencies are updated properly. NOTE: This is still missing the 'report' side of things, which is part of a larger task to enhance reports regarding both linking, and liboverrides (see T88393). ---------- Technical notes: Implementing this proved to be slightly more challenging than expected, mainly because one of the key aspects of the feature was never done in Blender before: manipulating, re-creating linked data. This ended up moving the whole resync code to use temp IDs out of bmain, which is better in the long run anyway (and more aligned with what we generally want to do when manipulating temp ID data). It should also give a marginal improvement in performances for regular resync. This commit also had to carefully 'sort' libraries by level of indirect usage, as we want to resync first the libraries that are the least directly used, i.e. libraries that are most used by other libraries.
2021-05-07LibOverride: Add proper reports when deleting user-edited overrides as part ↵Bastien Montagne
of resync. Logs are not enough here, we need proper warning visible for the user.
2021-04-08LibOverride: Fix several issues with resync code.Bastien Montagne
This commit essentially touches to post-processing of collections and objects after resync itself has been done, to ensure their proper instantiation in the scene: - Remove a lot of the process in resync case (resynced data are assumed to be already instantiated in the scene, unlike override creation case). - For auto-resync, only do post-processing once after all overrides have been resynced (doing it after each individual resynced was causing a lot of instantiation glitches, with a lot of unwanted extra objects and collections being added to the master collection). It also deals in a much more reliable way with detection of objects missing from the scene, by using the new `BKE_scene_objects_as_gset` utils. As a bonus this makes auto-resync process slightly faster (only by a few percents, but that's always good to get).
2021-03-29Overrides: API to create an override template.Jeroen Bakker
This is functionality that isn't accessible via the user interface. The API allows the creation and modification of an override template that holds rules that needs to be checked when overriding the asset. The API is setup that it cannot be changed after creation. Later on when the system is more mature we will allow changing overrides operations. NOTE: This is an experimental feature and should not be used in productions. Reviewed By: mont29, sebbas Differential Revision: https://developer.blender.org/D10792
2021-03-19LibOverride: Stash away 'leftover' objects/collections from auto-resync process.Bastien Montagne
Instead of storing those in scne's master collection, which is fairly annoying, we now add them to a (hidden) specific collection. Easy to ignore, or check and cleanup.
2021-03-15LibOverride: Add checks to address some degenerate blend file casesBastien Montagne
Attempt to work around some full-corruption cases created at the studio. Not clear how those were created, so not really fixing anything here, just detecting and 'solving' as best as possible some high corruption of local overrides. This is good to have in general anyway, might help prevent further corruption to happen too.
2021-03-12LibOverride: Add a new operation to Outliner to enforce resync of hierarchies.Bastien Montagne
This is basically done by ignoring override operations from old override affecting ID pointer properties, when the new (destination) one is not NULL. Fix T86501: New object added to overridden collection doesn't show up in linking file on Resync. This is more of a work-around actually, since there is no real way to fix the issue in a fully automated and consistent way, it is caused by older blender files being saved with 'broken' overrides. WARNING: This cannot ensure that some purposedly edited/overridden ID pointer properties won't be lost in the process.
2021-03-11LibOverride: Add second part of auto-resync code.Bastien Montagne
`BKE_lib_override_library_main_resync` uses `LIB_TAG_LIB_OVERRIDE_NEED_RESYNC` tags set by RNA override apply code, and perform detection for the remaining cases (those were new overrides need to be created for data that was not present before in the library). And then it actually resync all needed local overrides. Part of T83811 & D10649.
2021-03-11LibOverride: Add a utils to check if override has been user-edited.Bastien Montagne
Part of T83811 & D10649.
2021-01-25LibOverride: refactor of relationships handling in library overrides.Bastien Montagne
First step towards a better handling of relationships between IDs in override context, especially when a resync is needed. First, introduce a new flag to override operations, `IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE`, for ID pointers. It keeps track of whether an RNA ID pointer has been kept to its 'natural overriden ID' (in override hierarchy context), or has actually been re-assigned to some other data-block. Second, refactor how we deal with relationships between IDs in override hierarchy code, especially in resync case. This will fixe several cases listed in T83811, especially the case where an ID pointer to an existing override needs to be updated to a new one due to a matching change in linked data.
2020-12-28UI: List library overrides in the OutlinerJulian Eisel
Having a centeral place to find a list of all library overrides should be useful for managing production scenes where library overrides are used a lot. This change adds the individually overridden properties of a data-block under the data-block itself. Just how we show modifiers, constraints or pose channels there. This way we can also expose library override operations/options better in future. There's also a filter option for the library overrides now, so they can be hidden. It is only available in the View Layer display mode though, like the other filter options. One internal change this has to do is adding more informative return values to undo pushes and the library override functions called by it. That way we can send a notifier when library overrides change for the Outliner to know when to rebuild the tree. Differential Revision: https://developer.blender.org/D7631 Reviewed by: Andy Goralczyk, Bastien Montagne, William Reynish
2020-12-16LibOverride: Better handling of missing linked data during resync.Bastien Montagne
We do not generate overrides for missing data-blocks (aka placeholder ones) anymore, and properly delete the remaining old overrides of those during the resync process. This should prevent constant 'missing data-blocks' messages when opening blend files with overrides whose libraries have beed edited. Issue reported by @andy from Blender studio, thanks.
2020-09-30Cleanup: sort struct declarationsCampbell Barton
2020-09-23LibOverride: Add operator to convert a proxy object into an override.Bastien Montagne
In the end the process is surpringly simple, we only need to manually convert the proxy itself into an override (which is trivial), and then run common code with the default 'make override' operation. Fix T81059: Add operator to convert proxies to library overrides.
2020-08-20LibOverride: Add 'delete and use linked data' operation.Bastien Montagne
This will re-link all usages of a library override data-block (including all of its override dependencies) to its reference linked IDs, and delete those liboverrides. As usual, it is available in the ID sub-menu of the outliner context right-click menu. Part of T76555.
2020-08-19LibOverride: Add initial version of 'resync' operation.Bastien Montagne
Available from the usual ID submenu in the Outliner context menu. The goal of this operator is to re-create the override from the linked data, while preserving existing defined overrides. This allows to update local opverrides when relations between datablocks are changed in source library linked data. Part of T76555.
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-08-05Cleanup: missing 'initialize' -> 'init' from previous cleanupCampbell Barton
2020-07-23LibOverride: Add core functions to reset a library override.Bastien Montagne
This means that we delete all override properties except for those over ID pointers *if* the assigned pointer matches the linked data hierarchy. Then we reload affected datablocks.
2020-07-15LibOverride: move most of 'complete override creation' from ED_object to ↵Bastien Montagne
BKE_lib_override. This code is fairly complex and can be used in more places, better not duplicate that logic and just have it in BKE area.
2020-07-14Cleanup: function name not following its module conventions.Bastien Montagne
2020-07-14LibOverride: Move code tagging reauired dependencies of an override into BKE.Bastien Montagne
This is fairly generic code that can be re-used in other places.
2020-07-13LibOverride: Cleanup: Remove option to disable library overrides.Bastien Montagne
Code is mature enough now to not need this anymore, people who do not want to use liboverrides can just not create them.
2020-06-19LibOverride: Cleanup: remove unused parameter.Bastien Montagne
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-04-16Fix T75730: Properly remove unused override properties/operations.Bastien Montagne
While code is supposed to handle gracefully invalid override operations, it is much cleaner to avoid those completely.