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
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-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-12-12Cleanup: Rename BKE_libblock_relink, and move it to BKE_library_remap.hBastien Montagne
Was a waaaaayyyyy to much generic name for such a specific func, renamed to much more descriptive BKE_libblock_relink_to_newid(). In near future (few weeks, to limit as much as possible silent mismatch in branches), will rename BKE_libblock_relink_ex to BKE_libblock_relink, this is the real generic data-block relinking func!
2016-11-30Cleanup id->newid usage, initial work.Bastien Montagne
This aims at always ensuring that ID.newid (and relevant LIB_TAG_NEW) stay in clean (i.e. cleared) state by default. To achieve this, instead of clearing after all id copy call (would be horribly noisy, and bad for performances), we try to completely remove the setting of id->newid by default when copying a new ID. This implies that areas actually needing that info (mainly, object editing area (make single user...) and make local area) have to ensure they set it themselves as needed. This is far from simple change, many complex code paths to consider, so will need some serious testing. :/
2016-11-04Fix T49905: Segfault when copying object data of linked object.Bastien Montagne
We have to clear `newid` of all datablocks, not only object ones. Note that this whole stuff is still using some kind of older, primitive 'ID remapping', would like to see whether we can replace it with new, more generic one, but that's for another day.
2016-11-01Fix T49856: Blender 2.78 crashes after loading data from a blendfileBastien Montagne
Issue here was that py API code was keeping references (pointers) to the liniked data-blocks, which can actually be duplicated and then deleted during the 'make local' process... Would have like to find a better way than passing optional GHash to get the oldid->newid mapping, but could not think of a better idea.
2016-10-24Fix T49827L Crash linking material while in Material viewport shading modeSergey Sharybin
Material linking might and does change the way how drawObject is calculated but does not tag drawObject for recalculation in any way. Now use dependency graph to tag draw object for reclaculation. Currently do this using OB_RECALC_DATA taq since tagging is not very granular yet. In the future we can introduce ore granular tagging in the new dependency graph easily. Simple and safe for 2.78a.
2016-09-19UI Messages: Consistent spelling of term "data-block"Julian Eisel
Was using a bunch of different spellings, mostly "data-block" though, so went with that one (would have been my #1 choice anyway ;) )
2016-09-03Fix T49229: ID user decrement error when deleting group instance twice.Bastien Montagne
Another great example of inconsistency in usercount handling - dupli_group was considered as refcounted by readfile.c code (and hence by library_query.c one, which is based on it), but not by editor/BKE_object code, which never increased group's usercount when creating an instance of it etc. To be backported to 2.78.
2016-08-12Depsgraph: Tag relations for update when making datablocks single userSergey Sharybin
This is mainly required for the new dependency graph where non-object datablocks are a part of dependency graph. This solves issue when making mesh shared by multiple objects a single user one.
2016-08-07Fix local view editing broken after changing object's layer from non-local viewJulian Eisel
Wasn't copying back local view bytes to object after changing layer. Steps to reproduce were: * Split 3D view in default startup.blend * Enter local view in one of the 3D views * Move default cube to different layer *in the other 3D view* (the one that's not in local view) * Try transforming object from 3D View that's in local view (should lag)
2016-08-06Fix T49028: crash when copying a scene without grease pencil data.Kévin Dietrich
2016-08-04Grease Pencil v2 BranchAntonio Vazquez
Improve current Grease Pencil in order to get a better 2D animation tool. More info in WIKI pages: https://wiki.blender.org/index.php/User:Antoniov Reviewed By: Severin, aligorith, campbellbarton Patch by @antoniov, with edits by @Severin. Differential Revision: https://developer.blender.org/D2115
2016-07-14Add option to id_make_local to force localization of datablock, even if not ↵Bastien Montagne
used locally. Will be used by link/append code.
2016-07-10Cleanup/Refactor: pass Main pointer to all ID copy functions.Bastien Montagne
Also allows us to get rid of a few _copy_ex() versions...
2016-07-09Refactor/enhance BKE_lattice_make_local(), and add BKE_lattice_copy_ex() ↵Bastien Montagne
that takes a Main as parameter. Now using modern features from libquery/libremap areas. Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-09Refactor/enhance BKE_mball_make_local(), and add BKE_mball_copy_ex() that ↵Bastien Montagne
takes a Main as parameter. Now using modern features from libquery/libremap areas. Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-09Refactor/enhance BKE_curve_make_local(), and add BKE_curve_copy_ex() that ↵Bastien Montagne
takes a Main as parameter. Now using modern features from libquery/libremap areas. Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-08Refactor: pass Main to id_make_local.Bastien Montagne
Totally stupid to not pass it, and then let (some) BKE_foo_make_local() use G.main! Note: unused for now, much more refactoring still to come in make_local area!
2016-07-08Rework/split test_object_materials().Bastien Montagne
Now test_object_materials only handles one object. New test_all_objects_materials checks the whole bmain->object list for cases where it is actually needed. Should avoid some useless looping over all objects!
2016-07-06Replace of (id->lib != NULL) check by meaningful macro.Bastien Montagne
Idea is to replace hard-to-track (id->lib != NULL) 'is linked datablock' check everywhere in Blender by a macro doing the same thing. This will allow to easily spot those checks in future, and more importantly, to easily change it (see work done in asset-engine branch). Note: did not touch to readfile.c, since there most of the time 'id->lib' check actually concerns the pointer, and not a check whether ID is linked or not. Will have a closer look at it later. Reviewers: campbellbarton, brecht, sergey Differential Revision: https://developer.blender.org/D2082
2016-06-24Fix T48725: UI message typo.Bastien Montagne
2016-04-29Fix T48290: Hook fails after deleting geometryCampbell Barton
Now CD_SHAPEKEY_INDEX customdata is stored in edit-mode when hooks and vertex parents are used. This also fixes a bug where undo would loose key-index data. Move to structs for BM_mesh_bm_to/from_me to avoid passing many argument, which mostly aren't used.
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-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-03-14Fix T47787: When performing operation 'Make single user' -> 'obj&data', ↵Bastien Montagne
object could be removed from group. Similar cause as in T47482, we used to have poor handling of 'user_one' cases of ID usage, leading to inconsistent behavior depending on order of operations e.g. Here, was object used by a group but not linked in any scene - once linked in scene, their usercount would be 2, leading to 'making single copy', when it's actually not needed. We now have better control here, so let's use it! Note that other ID 'make single user' code will likely need similar fix (Images, etc.). Safe to be backported to 2.77.
2016-02-253D View: correct menu for moving out of local-viewCampbell Barton
Also name more clearly
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-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-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-03Fix T46913: Crash adding hook to linked mesh dupliCampbell Barton
Follow up to T46738, we need to tag the object data for recalculation.
2015-11-23Cleanup: shadowing (editors)Campbell Barton
2015-11-11Cleanup: replace more direct id->us handling by calls to BKE_library API.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-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-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-07-09Curve selection, de-duplicate & cleanupCampbell Barton
2015-07-02DerivedMesh: cleanup & minor edirsCampbell Barton
- place return args last position - move crazyspace function out of DerivedMesh header - use bool for args - flow control on own lines to ease debugging
2015-06-23Fix T45051: Curve parent bug.Bastien Montagne
PARCURVE is deprecated parting type, should never have been exposed to user! Not a regression, but safe enough for final 2.75 imho.
2015-05-04Add name argument to data creation API callsCampbell Barton
Was adding then renaming, unnecessarily.
2015-04-04Cleanup: use BKE_animdata_* prefixCampbell Barton
2015-02-23RNA: use 1/0 for move layers operatorDalai Felinto
internal api Consistency. For the records, I suspect there are still a few cases of this. I found this by chance (moving an object to a different layer), and I ran into the previous one (fixed by Campbell) as well (by adding a cube). Anyways, since it only happens when building with crash on asserts is not a big issue. But by the time we change RNA to use bool instead of int it would be nice to do a call for test to prevent those breaks.
2015-01-29Followup for previous commit: fix mismatches between menu entry and shortcut ↵Bastien Montagne
properties. For now, did most of the changes in menu entries (i.e. py space UI scripts). Note we do not get 100% same results as previously, but current situation is globally better than previous one, though the whole system to retrieve shortcuts remains a bit weak...
2015-01-11Cleanup: quite some harmless but noisy warnings from gcc...Bastien Montagne
2014-11-11UI Refactor T41640Campbell Barton
Make the UI API more consistent and reduce confusion with some naming. mainly: - API function calls - enum values some internal static functions have been left for now
2014-10-28Fix T41041: 'Delete keyframe' removes markers tooCampbell Barton
Operators that trigger UI events (but nothing else) were using 'CANCELLED' making it impossible to tell if an invoke function failed, or opened a menu.
2014-10-21Fix T42324: Curve deform modifier from mesh edge doesnt work properlySergey Sharybin
Curve parent requires valid path to exist for curve. If the path is disabled in the curve settings, displist evaluation will check the dependency graph whether the path is needed for parenting. The issue was that changing relations in the scene chagned need of the curve path but nothing tagged the curve to update it's path. For now use direct call of DAG_id_tag_update from set_parent(). In the bright future we might detect such a need in flush automatically in the depsgraph.
2014-10-11CleanupCampbell Barton
2014-10-10Cleanup: tabs in empty lines.Bastien Montagne
2014-10-10Cleanup (no functional changes):Bastien Montagne
* int -> bool where possible * Use const where possible * Get rid of magic numbers * Add/tweak a few UI tips * A few other misc changes.