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
2019-07-02Cleanup: move comments onto own lines to avoid breaking linesCampbell Barton
2019-06-15Cleanup: Rename: Static Override -> Library Override.Bastien Montagne
Better to make internal code naming match official/UI naming to some extent, this will reduce confusion in the future. This is 'breaking' scripts and files that would use that feature, but since it is not yet officially supported nor exposed in 2.80, as far as that release is concerned, it is effectively a 'no functional changes' commit.
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-02Cleanup: remove author/date info from doxy headersCampbell Barton
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2018-09-24Merge branch 'master' into blender2.8Brecht Van Lommel
2018-09-24Spelling fixes in comments and descriptions, patch by luzpaz.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D3719
2017-11-29Merge ID static override, part I: core changes in DNA, BKE and .blend ↵Bastien Montagne
read/write. See https://developer.blender.org/D2417 for details. Note that since static overrides rely heavily on RNA, this commit is essentially invisible from user PoV, more in next commits.
2017-06-26Fix T51902: Severe problem with relocating linked libraries when using proxies.Bastien Montagne
Fix is a bit ugly, but cannot think of another solution for now, at least this **should** not break anything else. And now I go find myself a very remote, high and lonely mountain, climb to its top, roar "I hate proxies!" a few times, and relax hearing the echos...
2017-05-05Add a new LOOPBACK flag to libquery's callbacks.Bastien Montagne
That one tags those ugly little 'from' ID pointers (shape keys and proxies), which point back from used to user ID, and require a lot of special care in data-block management...
2017-04-13Datablock ID PropertiesAlexander Romanov
The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Python_Nodes|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks. This functionality is implemented for `PointerProperty` and now such properties can be created with Python. In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch. Original author: @artfunkel Alexander (Blend4Web Team) Reviewers: brecht, artfunkel, mont29, campbellbarton Reviewed By: mont29, campbellbarton Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne Maniphest Tasks: T37754 Differential Revision: https://developer.blender.org/D113
2017-01-31Cleanup: use 'cb_flag', not 'cd_flag' for library_query callbacks.Bastien Montagne
`cd_flag` tends to be used for CustomData flags in mesh area, while for library_query those are rather callback flags...
2017-01-31Cleanup: Rename callback flags from library_query to `IDWALK_CB_...`Bastien Montagne
Better to have clear way to tell whether flag is parameter for BKE_library_foreach_ID_link(), parameter for its callback function, or return value from this callback function.
2017-01-31Optimization: pass Main to BKE_library_foreach_ID_link() and use its relations.Bastien Montagne
Use Main->relations in BKE_library_foreach_ID_link(), when possible (i.e. IDWALK_READONLY is set), and if the data is available of course. This is quite minor optimization, no sensible improvements are expected, but does not hurt either to avoid potentially tens of looping over e.g. objects constraints and modifiers, or heap of drivers...
2017-01-31Fix missing non-ID nodetrees in ID relationships built from library_query.cBastien Montagne
This shall fix both existing code (bpy mapping, and local/lib usages checks), and new Main->relations generation.
2016-11-12Fix renaming error in last commitCampbell Barton
2016-11-12Minor naming cleanup.Bastien Montagne
2016-11-12Enhance BKE_library_make_local() to make it much quicker in complex cases.Bastien Montagne
Basic idea is to split first loop in two, and run checks before making anything actually local, to detect data-blocks that we can directly make local (because we are sure they are only used by already/future local datablocks). This allows to avoid a lot of overhead in later 'cleanup' steps of this function, here with barbershop shot it's four times quicker (from 190s to 48s). We are still far from the instantaneous results of MakeLocal in 2.77, but in that version main characters lose their connection to their armature and remain static after makelocal, so guess new code is still better. ;) There are probably more optimizations possible here, but would rather polish this area of code once we get rid of proxies, those really make it a nightmare to work on.
2016-10-19Fix T49775: Appending data with internal dependency cycles prevents correct ↵Bastien Montagne
clearing of linked data-blocks. This is not a simple fix, but imho still needs to be backported to 2.78a...
2016-07-08Initial fix for proxy issues regarding new libquery/libremap ID handling code.Bastien Montagne
libquery now passes an extra flag info to the callback, in case that specific ID usage is considered as indirect. In most cases, it's just set from ID_IS_LINKED_DATABLOCK() result on datablock owner, but in proxy object case we also consider ob->data, materials and pose usages as indirect. Does not fixes all issues yet, but should already make behavior with proxy object saner.
2016-07-07libquery: add new 'BKE_library_idtype_can_use_idtype()' helper.Bastien Montagne
This should allow us to avoid a lot of useless processing when iterating over the whole main database (unlink/remap/usages checks/etc.). Note that some ID types report they can use any type for now, due to fuzzyness/indefined nature of some usages (like constraints/modifiers/game logic, or ID pointer of nodes...). Maybe we could address this (like e.g. adding defines in relevant headers to restrict ID types used by constraints, by modifiers, etc.). But don’t think this is top priority for now.
2016-07-07Extend libquery checks to test wether an ID is used locally and/or indirectly.Bastien Montagne
2016-07-01"Fix" crash when deleting linked object which has indirect usages.Bastien Montagne
This is in fact very hairy situation here... Objects are only refcounted by scenes, any other usage is 'free', which means once all object instanciations are gone Blender considers it can delete it. There is a trap here though: indirect usages. Typically, we should never modify linked data (because it is essencially useless, changes would be ignored and ost on next reload or even undo/redo). This means indirect usages are not affected by default 'safe' remapping/unlinking. For unlinking preceeding deletion however, this is not acceptable - we are likely to end with a zero-user ID (aka deletable one) which is still actually used by other linked data. Solution choosen here is double: I) From 'user-space' (i.e. outliner, operators...), we check for cases where deleting datablocks should not be allowed (indirect data or indirectly used data), and abort (with report) if needed. II) From 'lower' level (BKE_library_remap and RNA), we also unlink from linked data, which makes actual deletion possible and safe. Note that with previous behavior (2.77 one), linked object would be deleted, including from linked data - but then, once file is saved and reloaded, indirect usage would link back the deleted object, without any instanciation in scene, which made it somehow virtual and unreachable... With new behavior, this is no more possible, but on the other hand it means that in situations of dependency cycles (two linked objects using each other), linked objects become impossible to delete (from user space). Not sure what's best here, behavior with those corner cases of library linking is very poorly defined... :(
2016-06-22ID-Remap - Step one: core work (cleanup and rework of generic ID datablock ↵Bastien Montagne
handling). This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock was pretty much impossible, except for a few special cases. Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite a few ID usages were missed or wrongly handled that way). One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling by using library_query utils to allow generic handling of those, which is now the case (now, generic ID links handling is only "knwon" from readfile.c and library_query.c). This commit also adds backends to allow live replacement and deletion of datablocks in Blender (so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one, or NULL one in case of unlinking). This will allow nice new features, like ability to easily reload or relocate libraries, real immediate deletion of datablocks in blender, replacement of one datablock by another, etc. Some of those are for next commits. A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core. Though it was tested rather deeply, being totally impossible to check all possible ID usage cases, it's likely there are some remaining issues and bugs in new code... Please report them! ;) Review task: D2027 (https://developer.blender.org/D2027). Reviewed by campbellbarton, thanks a bunch.
2016-04-01Cleanup: style/spellingCampbell Barton
2016-03-24Rework library_query foreach looper - add optional recursivity.Bastien Montagne
This commit: * Fixes bad handling of 'stop iteration' (by adding a status flag, so that we can actually stop in helper functions too, and jumping to a finalize label instead of raw return, to allow propper clean up). * Adds optional recursion into 'ID tree' - callback can also decide to exclude current id_pp from recursion. Note that this implies 'readonly', modifying IDs while recursing is not something we want to support! * Changes callback signature/expected behavior: return behavior is now handled through flags, and 'parent' ID of id_pp is also passed (since it may not always be root id anymore). Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D1869
2016-01-06'users of ID' py API.Bastien Montagne
This mainly adds bpy.data.user_map() method, which goes over the whole Main database to build a mapping (dict) {ID: {users_of_that_ID}}. Very handy to check and debug ID usages, but could also be really valuable for py addons creating temporary scenes, or some exporters, etc. Note: current code in master's libquery misses some IDs (and reports some it should not, like nodetrees), this is fixed in id-remap but still needs serious review before going to master. This basically means that current bpy.data.user_map() **will not** report a complete and exhaustive state of dependencies between IDs. Should work OK in most cases though. Original work/idea comes from id-remap branch, was heavily reworked by @campbellbarton and myself for master. Reviewers: campbellbarton, sergey Differential Revision: https://developer.blender.org/D1678
2015-10-08Fix T46386: Duplicate fails updating driver linksCampbell Barton
Duplicate wasn't updating links, so duplicatinvg a objects would still point to the originals for curve-taper, texmesh, drivers. Use generic id-looper to handle replacing data.
2015-10-08Add USER flags to BKE_library_foreach_ID_linkCampbell Barton
This way callbacks can know if adjusting user-count is needed.
2014-03-28Fix T37599: Crash making linked objects local and undoSergey Sharybin
Root of the issues comes to the fact that it's possible to produce a situation when library object data uses local object. This is actually forbidden and not supported by .blend IO. Made it so Make Local wouldn't produce such an unsupported states. Reviewers: brecht Differential Revision: https://developer.blender.org/D372