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
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.
2015-01-06cleanup: warningsCampbell Barton
2014-09-22Corrent recent commit: off by one errorCampbell Barton
2014-09-22Correct MAX_LIBARRAY define, assert when its wrongCampbell Barton
2014-07-23Fix for mixup in startup.blend data init when userprefs.blend was missingCampbell Barton
Rename UI_init_userdef_factory to BLO_update_defaults_userpref_blend This closely matches BLO_update_defaults_startup_blend so makes sense for them to be together.
2014-07-21GSOC 2013 paintAntony Riakiotakis
Yep, at last it's here! There are a few minor issues remaining but development can go on in master after discussion at blender institute. For full list of features see: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting Thanks to Sergey and Campbell for the extensive review and to the countless artists that have given their input and reported issues during development.
2014-07-16Cleanup: Adhere to our naming convention for BKE_linestyle.h APICampbell Barton
2014-07-02Fix T40364: Texture images are not properly displayed in the material ↵Sergey Sharybin
preview in BI when using SSS Blender Internal only uses materials with non-zero user counter for SSS and new mutable libblock copy was keeping users counter at zero. Now it sets user counter to 1, which is a bit of arguable decision, but which also kind of makes sense -- meaning callee owns the copied block.
2014-06-26Forgot this in previous commitSergey Sharybin
2014-06-26Replace Main->lock with an anoynous structure pointerSergey Sharybin
This way it's not needed to include BLI_threads.h from the BKE_main.h which helps avoiding adding PThreads includes to each library which uses Main on Windows. From the API point of view it's now MainLock* and to lock or unlock the main you're to use BKE_main_(un)lock(). This solves compilation error on Windows with SCons.
2014-06-24Make main library safe(er) for the threaded usageSergey Sharybin
Added a lock to the Main which is getting acquired and released when modifying it's lists. Should not be any functional changes now, it just means Main is now considered safe without worrying about locks in the callee.
2014-05-09Fix T40108: Copying materials leaves a shared Action datablock in nestedLukas Tönne
bNodeTree blocks. This was broken by rB6e99fb0 (own commit). I expected the `do_action` argument to be of no importance in this case due to node trees using material animation, but this is not the case. Anyway, this patch adds back a do_action to the BKE_libblock_copy_nolib function as well to restore the previous behavior.
2014-05-03Patch D246: Texture Marks for freestyle strokes, written and contributed by ↵Tamito Kajiyama
Paolo Acampora. Reviewers: brecht, kjym3, #freestyle Reviewed By: brecht, kjym3 Differential Revision: https://developer.blender.org/D246
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-26Code cleanup: use 'const' for arrays (blenkernel)Campbell Barton
2014-04-22Code cleanup: replace int with boolean.Tamito Kajiyama
2014-04-20Fix error making datablock with fake user local, the user count would be ↵Brecht Van Lommel
wrong afterwards.
2014-03-21Fix T39209: Localizing materials could cause heisenbug with concurrentSergey Sharybin
depsgraph updates. Material datablocks were localized by first making a regular datablock copy, which always gets inserted into the bmain list, and then removing it again from bmain. Problem is that this localization happens in preview threads, which can run while the depsgraph is also updating GPU materials. In case the copying of materials takes any amount of time, this can cause the depsgraph call to material_changed to use an invalid, localized material and access invalid GPUMaterial lists which have already been freed for the actual material. Solution is to not add localized datablocks to the bmain lists in the first place. bmain should be totally immutable during preview or render threads.