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
2016-04-16Removed the ID_PA code used for ParticleSettings.Lukas Tönne
2016-04-13Removed blenkernel particle code.Lukas Tönne
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-03-22Cleanup: styleCampbell Barton
2016-03-14Better fix for T47787 - remove extra user due to 'user_one' as soon as we ↵Bastien Montagne
increase 'real' user count. This has several benefits: * User count remains coherent, regardless of the order in which you use 'user_one' & real refcounting users (i.e. if you add to group, and then link in scene, or the reverse, you now always get same final user count). * Avoids the need to check for potential 'user_one' extra user in count in several places in code (e.g. when making IDs single users...). * Users won't wonder why they cannot make 'single user' and ID even though its user count shows '2'! * readfile.c now always uses code from BKE's library.c when modifying id->us. Which means we can consider (asside from assignment during initialization) that id->us is read-only outside of library.c context. Note that this commit reverts previous one (rB6b1d77a8052b) - please **do not** backport this one in 2.77.
2016-02-22Fix T47482: take II, restore 2.76 behavior regarding groups when deleting an ↵Bastien Montagne
object. Also re-reported through IRC by Thomas Beck (@plasmasolutions), thanks. Though it's not ideal in theory, we have quite poor handling of object datablock currently from user PoV - before this commit, it was not easily possible to get fully rid of an object anymore if you did not removed it from all its groups before deleting it. So for now, restore 2.76 behavior (namely, unlink an object from avaerything in Blender once it is no more used by any scene). Better handling of all this is TODO for later (also related to much more heavy changes done in id-remap branch regarding sanitizing our ID deletion process).
2016-02-20Fix T47482: Own mistake in new handling of 'userone' ID usages when ↵Bastien Montagne
decrementing usercount. Ended up not handling at all 'userone' case, now it increments usercount correctly when needed.
2016-02-15Cleanup: reorganize BKE ID tagging functions.Bastien Montagne
BKE_main_id_tag_/BKE_main_id_flag_ were horrible naming now that we split those into flags (for presistent one) and tags (for runtime ones). Got rid of previous 'tag_' functions behavior (those who were dedicated shortcuts to set/clear LIB_TAG_DOIT), so now '_tag_' functions affect tags, and '_flag_' functions affect flags.
2016-02-12Fix T47379: crash appending materials with node trees.Brecht Van Lommel
2016-01-09Fix (unreported) other joke in our localizing code - setting LIB_TAG_LOCAL tag!Bastien Montagne
This fake tag is zero, so it does not set anything - and it does not clear indirect/extern ones either...
2016-01-09Fix T47121: Image node on linked and localized material loses image after ↵Bastien Montagne
reopening project. Code 'localizing' the node of an ID (a material, here) was kind of a joke, setting id.lib to NULL is not enough, by far! Now calling ntreeMakeLocal(). And ntreeMakeLocal was also missing indirect->extern switch for its directly used IDs, which explains why they were lost after a save/reload. Note that here again, a big part of this 'localizing' code should be made generic using library_query stuff, but this is for id-remap, not current master...
2016-01-04ID: Sanitize handling of 'USER_ONE' (ensure_user) case.Bastien Montagne
Note that this has little impact on current master - yet it allows to fix the 'Image Editor' bug (open image in editor, use same image in texture, delete image from texture, image us is 0 and red in image editor...) and probably a few other similar cases. But that change is mandatory to get a proper handling of ID deletion/reamapping/reloading/etc. as done in id-remap branch. Instead of just adding a user if none already present, new code use two new ID tags to get a three-states status: - Normal: nothing changes. - Needs extra user: we know that ID needs an extra user, so we take of never going down to 0 in 'real' usercount handling. - Has extra user: we do have increased that ID usercount to get our needed extrauser. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D1696
2016-01-04CleanupCampbell Barton
2016-01-04added new "Fake User" option for appending objects, this sets a fake user on ↵Martin Felke
each newly appended item except Groups and Objects.
2015-12-28Cleanup: use BLI_libblock prefix for id functionsCampbell Barton
- test_idbutton -> BLI_libblock_ensure_unique_name (not only used from UI) - BKE_rename_id -> BKE_libblock_rename (always pass valid main) also rename: - name_uiprefix_id -> BKE_id_uiprefix
2015-12-28Changes to rename_id function:Antony Riakiotakis
* Don't copy name before entering new_id function. new_id does that for us already. * Take a main argument to make the function possible to use with different databases * Append BKE_ to rename_id
2015-12-27Split id->flag in two, persistent flags and runtime tags.Bastien Montagne
This is purely internal sanitizing/cleanup, no change in behavior is expected at all. This change was also needed because we were getting short on ID flags, and future enhancement of 'user_one' ID behavior requires two new ones. id->flag remains for persistent data (fakeuser only, so far!), this also allows us 100% backward & forward compatibility. New id->tag is used for most flags. Though written in .blend files, its content is cleared at read time. Note that .blend file version was bumped, so that we can clear runtimeflags from old .blends, important in case we add new persistent flags in future. Also, behavior of tags (either status ones, or whether they need to be cleared before/after use) has been added as comments to their declaration. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D1683
2015-12-01Comment assert in id_us_min, currently we can get zero user count at this point.Bastien Montagne
2015-11-13Tighten checks around unlinkable datablocks becoming LIB_EXTERN.Bastien Montagne
We have currently a gooseberry file (scenes/01_island/01_meet_franck/01_01_01_A/01_01_01_A.anim.blend) that links against two -pre repo libs, which are hence not available for common mortals, and generate warnings and placeholders during load step. Issue is, among those missing (directly) linked datablocks, we have two shapekeys! This should never happen nor be possible at all. I tried understanding how this could happen, with no luck at all, best bet would be some wild/bad call to `id_us_plus()` over those skeys at some point... Anyway, this commit: - Handles a bit better those 'cases that should never happen' at load time. - Adds several checks in ID handling code (and save/load code) to try to detect where/when a non-linkable datablock becomes LIB_EXTERN (i.e. directly linked).
2015-11-11Free libraries last, and not first - most datablocks may have link to those...Bastien Montagne
2015-11-10Cleanup: use func definitions for wm/notifiers/editors ID callbacks.Bastien Montagne
2015-11-10Cleanup: ID usercount: moar checks and factorization. No change in behavior ↵Bastien Montagne
expected.
2015-11-10Cleanup: minor deduplicate of code.Bastien Montagne
2015-11-09Fake user: add BKE_library helpers to set/clear that flag.Bastien Montagne
Since it also involves usercount manipulation, safer and cleaner to do it in BKE_library...
2015-11-09Rework a bit id_us_min, and make it assert on usercount error.Bastien Montagne
2015-11-09Cleanup: avoid incrementing/decrementing id->us outside of BKE_library.Bastien Montagne
We have callbacks for that, they also do some checks and help ensure things are done correctly. Only place where this is assumed not true is blenloader (since here we may affect refcount of library IDs as well...).
2015-11-02Library API: pass Main struct to unlink functionsCampbell Barton
2015-10-22Cleanup: remove script ID-typesCampbell Barton
Unused since 2.4x and unlikely to be reintroduced as ID-types.
2015-10-20First step to handle missing libs/datablocks when reading a file.Bastien Montagne
Idea is, instead of ignoring completely missing linked datablocks, to create void placeholders for them. That way, you can work on your file, save it, and find again your missing data once lib becomes available again. Or you can edit missing lib's path (in Outliner), save and reload the file, and you are done. Also, Outliner now shows broken libraries (and placeholders) with a 'broken lib' icon. Future plans are also to be able to relocate missing libs and reload them at runtime. Code notes: - Placeholder ID is just a regular datablock of same type as expected linked one, with 'default' data, and a LIB_MISSING bitflag set. - To allow creation of such datablocks, creation of datablocks in BKE was split in two step: + Allocation of memory itself. + Setting of all internal data to default values. See also the design task (T43351). Reviewed by @campbellbarton, thanks a bunch! Differential Revision: https://developer.blender.org/D1394
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-08-29Fix missing 'case idx' line in (debug-only & disabled) valgrind-friendly ↵Bastien Montagne
BKE_main_free() code.
2015-08-27Make .blend file thumbnail reading simpler and more coherent, read/store ↵Bastien Montagne
them when reading in background mode. Primary goal of this commit is to fix an annoying issue - when processing and saving .blend files in background mode you lose their thumbnails, since it can only be generated with an OpenGL context. Solution to that is to read .blend thumbnail while reading .blend file (only done in background mode currently), and store it in Main struct. Also, this lead to removing .blend file reading code from thumb_blend (no need to have doublons). We now have a small interface in regular reading code area, which keeps it reasonbaly light by only reading/parsing header info, and first few BHead blocks. This makes code reading .blend thumbnail about 3 to 4 times slower than previous highly specialized one in blend_thumb.c, but overall thumbnail generation of a big .blend files folder only grows of about 1%, think we can bare with it. Finally, since thumbnail is now optionally stored in Main struct, it makes it easy to allow user to define their own custom one (instead of auto-generated one). RNA API for this was not added though, accessing that kind of .blend meta-data has to be rethought a bit on a bigger level first. Reviewers: sergey, campbellbarton Subscribers: Severin, psy-fi Differential Revision: https://developer.blender.org/D1469
2015-08-18Refactor translation code out of blenfontCampbell Barton
- Add blentranslation `BLT_*` module. - moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`). - moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
2015-06-29Fix T45022: Update missing when linking objects with new depsgraphSergey Sharybin
2015-06-16Cleanup: styleCampbell Barton
2015-06-12Fix wrong proxy pointer hanging around after making all localSergey Sharybin
The issue was caused because of the following circumstances: - Making All Local will just iterate all IDs and clear linked flags - It will not do anything with objects which are already local (and since proxy rig is local nothing will be changing it). This commit makes it so id_clear_lib_data() takes care of clearing all related proxy pointers, avoiding situations when proxy rig will point to a local armature. Reviewers: campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1276
2015-06-04Cleanup: clarify order of precedence: &/?Campbell Barton
2015-05-23Cleanup: typosCampbell Barton
2015-05-12Depsgraph: New dependency graph integration commitSergey Sharybin
This commit integrates the work done so far on the new dependency graph system, where goal was to replace legacy depsgraph with the new one, supporting loads of neat features like: - More granular dependency relation nature, which solves issues with fake cycles in the dependencies. - Move towards all-animatable, by better integration of drivers into the system. - Lay down some basis for upcoming copy-on-write, overrides and so on. The new system is living side-by-side with the previous one and disabled by default, so nothing will become suddenly broken. The way to enable new depsgraph is to pass `--new-depsgraph` command line argument. It's a bit early to consider the system production-ready, there are some TODOs and issues were discovered during the merge period, they'll be addressed ASAP. But it's important to merge, because it's the only way to attract artists to really start testing this system. There are number of assorted documents related on the design of the new system: * http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents * http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph There are also some user-related information online: * http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/ * http://code.blender.org/2015/03/more-dependency-graph-tricks/ Kudos to everyone who was involved into the project: - Joshua "Aligorith" Leung -- design specification, initial code - Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes - Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the project and so - Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the issues and recording/writing documentation. - Everyone else who i forgot to mention here :)
2015-05-06Cleanup: use ntreeFromIDCampbell Barton
2015-05-04Cleanup: WM_main_remove_notifier_referenceCampbell Barton
Assumed the `reference` pointer is an ID, currently true, but may not always be. Add a callback specifically for this purpose since cleaning up notifiers and space-types are different operations.
2015-05-04Cleanup: naming for callback wrappersCampbell Barton
2015-04-04Cleanup: use BKE_animdata_* prefixCampbell Barton
2015-03-19Freestyle: pass Main struct to new/copyCampbell Barton
2015-03-18Fix bad memory access freeing viewport which uses movie clipSergey Sharybin
2015-02-10correct last commitCampbell Barton
2015-02-10Fix: Grease Pencil datablocks can be copied using the ID.copy() API method nowJoshua Leung
2015-02-06cleanup: styleCampbell Barton
2015-01-26Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).Bastien Montagne
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
2015-01-08Fix T43159: Copying of linked datablocks using relpath leads to invalid ↵Bastien Montagne
paths in new copies. Simply have to rebase onto main filepath when copying, if source datablock is lib and path is relative. Afaict, only affected Image and Text datablocks. MovieClip would also be a candidate, but has no copy implemented currently.