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-07-10Cleanup: spellingCampbell Barton
2020-05-29PyAPI: use bpy_rna_types_capi.c to set type methodsCampbell Barton
Remove use of '_bpy' as an intermediate module to store functions which were then assigned in bpy_types.py.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-11Cleanup: rename 'private' to 'embedded' for sub-data IDs.Bastien Montagne
'Private' can be a rather confusing term, especially when considering its meaning in programming languages. So now root node trees and master collections are 'embedded' IDs instead.
2020-03-06Cleanup: spellingCampbell Barton
2020-02-20Cleanup: use named unsigned types in the Python APICampbell Barton
2020-02-13Py API: Add `orphans_purge` helper to `bpy.data`.Bastien Montagne
Much more convinient than trying to use outliner operator...
2020-02-13Fix (unreported) private/embedded IDs being added to `bpy.data.user_map()` dict.Bastien Montagne
We do not want those here.
2020-02-13Fix (unreported) fully broken `bpy.data.user_map()` helper.Bastien Montagne
The introduction of python instancing for ID data in 2.80 completely broke the 'smart & efficient' hack of using a same py object as key for initial quick check, since rebuilding the RNAPointer in the BPy_StructRNA would actually affect the py instance of the first ID used to generate that py object... TL;DR: No need for this complex and unclear optimization anymore, since we do not actually rebuild a whole py object anymore every time we call `pyrna_id_CreatePyObject()` from a same ID pointer.
2020-02-13Cleanup old special cases from some libquery callbacks.Bastien Montagne
We now have proper flagging for horrible loopback pointers...
2020-02-13Refactor libquery ID looper callback to take a single parameter.Bastien Montagne
Using a struct here allows to change given parameters to the callbacks without having to edit all callbacks functions, which is always noisy and time consuming.
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2019-06-12Cleanup: spelling in commentsCampbell Barton
2019-04-29Cleanup: comments (long lines) in pythonCampbell Barton
2019-04-21Cleanup: comments (mainly long lines)Campbell Barton
Comments after code can cause awkward line breaks.
2019-04-20Cleanup: add missing macros to clang-formatCampbell Barton
2019-04-18Cleanup: add trailing commas to avoid right shiftCampbell 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-03-18Cleanup: Main id looping: add FOREACH_MAIN_LISTBASE macro.Bastien Montagne
We don't want to use flow control like `break` statement into the basic `FOREACH_MAIN_ID` macro, as this is a nested loop. When refined behavior is needed (like breaking whole iteration, or just skipping to next ID type), FOREACH_MAIN_LISTBASE and FOREACH_MAIN_LISTBASE_ID macros should be used instead. Based on D4382 by @campbellbarton (Other potential solution, using flow control macros: D4384).
2019-02-18Fix (unreported) wrong handling of some parameters combination in ↵Bastien Montagne
`bpy.data.user_map()` Would add undesired keys...
2019-02-18ID Management Py API: Fix (unreported) crash in some cases.Bastien Montagne
Would crash when passing some kind of invalid parameters, e.g.: >>>D.user_map(key_types={'brush'})
2019-02-18ID management: use FOREACH_MAIN_ID in some places.Bastien Montagne
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-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.
2019-01-24Fix T60350: Removed objects that are still in the outliner will crash Blender.Bastien Montagne
We need to force UI to fully redraw, BKE_id_delete & co won't do that for us.
2019-01-16Expose batch IDs deletion in python API.Bastien Montagne
Follow-up to previous commit.
2019-01-07Cleanup: fix typo.Bastien Montagne
2018-11-07Cleanup: remove some useless BKE_library and BKE_main includes.Bastien Montagne
Makes it simpler to make some changes... Also fix order of some includes (use alphabetical please).
2018-06-22Cleanup: get rid of last G.main's in bpy area.Bastien Montagne
Essentially 'validating' them as G_MAIN, and adding some asserts in dubious places, that handled IDs are actually in G_MAIN.
2017-11-29Cleanup: rename bpy_util -> bpy_capi_utilsCampbell Barton
This is for internal CAPI use only, avoid confusion w/ bpy.utils module.
2017-10-05PyAPI: fast keyword parsing for bpy modulesCampbell Barton
No functional changes.
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...
2016-09-15Fix Py's IDs user mapping: do not consider ShapeKeys' from here.Bastien Montagne
This is internal pointer helper for scene evaluation and tools, though exposed to bpy API, it can give false 'dependency cycles' in bpy.data.user_map() results. That's followup to rBe007552442634 really, both should be backported to 2.78
2016-09-15Fix Py's IDs user mapping: do not consider proxy_from here.Bastien Montagne
This is internal pointer helper for scene evaluation and tools, it's not exposed to bpy API anyway, and can give false 'dependency cycles' in bpy.data.user_map() results. Found by sybren in his Splode work.
2016-09-13Fix bpy.data.user_map() ignoring unused datablocks.Bastien Montagne
Should be backported to 2.78. Found by Sybren here in studio, thanks!
2016-07-31PyAPI: minor optimization for dictionary creationCampbell Barton
Pass size when its known.
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