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-07-17Extend a bit 'NO_MAIN'/'NO_USER_REFCOUNT'/etc. flags to ID allocation itself.Bastien Montagne
No real reason we keep this only to copying, creating ID outside of database is handy as well! Also, add helpers to add/remove an ID from Main, and to set/clear its 'user refcounting' status. Those will be useful in future complex ID manipulation cases (like static override...).
2017-07-08Move Group and ParticleSettings to new copying system.Bastien Montagne
Also fix several mistakes from previous commits.
2017-07-08Rename new `BKE_<foo>_copy_ex` to `BKE_<foo>_copy_data`.Bastien Montagne
Those are not actually copying the ID, only its internal subdata (and other ID-specific handling). Generic processing common to all ID copying is done by `BKE_id_copy_ex()`!
2017-07-06Change a bit ideas behind new copying code, now ID-specific copying never ↵Bastien Montagne
handles usercount. Makes things much simpler, and more consistent. Also fix issue with new copying and bloody nodetrees, using same hack as in original ntree copying code to detect 'root' ntrees that shall never be put into bmain :(((((((
2017-06-22Add remaining 'new copying' for obdata ID types.Bastien Montagne
2017-06-20Make object copying fully compatible/aware of new copy flag system.Bastien Montagne
(continuation of previous WIP commit, sorry about that one :/ ). This commits changes quite a few things, distributing new copying flags into sub-data copying code (mostly concerns ID refcounting or not). It also removes ID refcounting handling from Modifiers' copy callback (this was ugly from the start, proved to be problematic in current master, and generally bad practice). This is now done by calling code. Also, it brings back ID refcounting handling to main BKE_library's copy code, which means in generic ID copying lower-level IDType-specific copy code should not use it at all. Support at lower-level remains needed though, unfortunately, to cope with partial copying tools etc.
2017-06-16Fleshing a bit new copy logic (using Object datablock as Guinea pig).Bastien Montagne
2017-06-14Make whole ID copying code use const source pointer.Bastien Montagne
Noisy change, but safe, and better do it sooner than later if we are to rework copying code. Also, previous commit shows this *is* useful to catch some mistakes.
2017-05-04Fix missing usercount update of poselib when copying Object.Bastien Montagne
Still finding such missing cases... :(
2017-04-26Fix race condition invalidating object data's bounding boxSergey Sharybin
2017-02-14`BKE_boundbox_ensure_minimum_dimensions` is no longer necessaryGermano Cavalcante
The bug T46099 no longer applies since the addition of `dist_squared_to_projected_aabb_simple` Has also been added comments that relates to an occlusion bug with the ruler. I'll investigate this.
2017-01-31Fix compilation error: too few arguments to function call.Kévin Dietrich
D2492 by @tomjpsun.
2017-01-31Use the same solution to test the pixel distance to the AABB, with BoundBoxGermano Cavalcante
The previous solution took arbitrary values to determine if the mouse was near or not to the Bound Box (it simply scaled the Bound Box). Now the same function that detected the distance from the BVHTree nodes to the mouse is used in the Bound Box
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-29Remove `BKE_boundbox_ray_hit_check`Germano Cavalcante
Remove `BKE_boundbox_ray_hit_check` since it is no longer being used and can be easily replaced by `isect_ray_aabb_v3_simple`
2017-01-09Fix for T50373: lattices should not be able to get subsurf modifiersPhilipp Oeser
Reviewers: mont29 Reviewed By: mont29 Subscribers: sergey Differential Revision: https://developer.blender.org/D2449
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-19Fix T50078: Vertex Groups not copied over when making proxy.Luca Rood
Reviewers: mont29 Reviewed By: mont29 Differential Revision: https://developer.blender.org/D2368
2016-10-13Proxy appending: re-establish link to proxies when they are made localSybren A. Stüvel
This allows appending of an entire scene from another blend file into this one, even when that blend file contains proxified armatures. This replaces the approach from commit 1cdc54dc7db85766. Thanks @sergey for the help.
2016-10-05Fix T49501: Animations imported via alembic render with wrong or no motion blurSergey Sharybin
2016-09-23Fix T49430: append scene with gamelogic broken.Bastien Montagne
In fact, it was the whole remapping process that was broken in logic bricks area, due to terrible design of links between those bricks... Object copying was also broken in that case, fixed as well. To be backported to 2.78. Note that issue was actually probably there since ages, hidden behind dirty hacks used in previous append code (though likely visible in some corner cases). Listen kids: do not, never, ever, do what has been done for links between logic bricks. Never. Ever. Even as pure runtime data it would have been bad, but as stored data...
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-07-25Cleanup: factorize the 'ensure local' part of datablock copy into a single ↵Bastien Montagne
BKE_id_copy_ensure_local function.
2016-07-21Refactor/deduplicate even more make_local code (and fix part of T48907).Bastien Montagne
Turns out most BKE_foo_make_local datablock-specific functions are actually doing exactly the same thing, only two currently need special additional operations (object and brush ones). So added a BKE_id_make_local_generic instead of copying same code over and over. Also, changed a bit how make_local works in case we are localizing a whole library. We need to do the 'remap' step (from old linked ID to new local one) in the second loop, otherwise we miss some dependencies. This fixes main part of T48907.
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-11Remove usercount handling from BKE_id_expand_local.Bastien Montagne
Idea looked good, but we have too much custom situations here (some half-fake-sub-ID being copied with their 'owner', animdata, etc.), let's let datablock copy functions handle that themselves. Also allows to safely call BKE_id_expand_local from all copy functions now (only when copying linked data).
2016-07-11Cleanup: remove call to BKE_id_lib_local_paths() in make_local functions.Bastien Montagne
This one is already called by matching copy functions, no need to call it twice!
2016-07-11Use new generic BKE_id_expand_local() for make_local() for object.Bastien Montagne
2016-07-11Fix (unreported) memory leak when making local linked databock which has a ↵Bastien Montagne
preview image. Also cleaned-up/synchronized code across al ID types that support preview.
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_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-09Minor fix/cleanup to object's make_local.Bastien Montagne
2016-07-08Refactor/enhance BKE_object_make_local().Bastien Montagne
Now using modern features from libquery/libremap areas. Also, it should handle much better cases where localized ID was also indirectly used by non-refcounting users (typical case: object used as modifier/constraint/whatever target from another linked object, previous code would not take those into account and just localize original object instead of making a local copy. Would result in local object used by linked one, which would be partially 'undone' on next file reload... Crappy behavior). And it fixes some obvious errors too (nullifying all proxy pointers unconditionnaly, some missing refcounted usages cases in extern_local_object(), etc.).
2016-07-06Cleanup/simplify/fixes BKE_object_is_libdata and BKE_object_obdata_is_libdata.Bastien Montagne
Removed checks for ob->proxy from the equation, you can totally have proxy objects linked into another .blend file!
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-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-05-18Fix missing modifiers for mesh objectsSergey Sharybin
All modifiers for all non-lattice objects were disabled after recent commit.
2016-05-18Fix T47737: Lattice crashes w/ smooth modifierPhilipp Oeser
Add flag for modifiers that support lattice
2016-04-04Cycles: Make curves modified by a taper object with modifier considered a ↵Sergey Sharybin
deform modified That might consider a bit more objects to be considered deform modified, but it covers common case of using taper object without require of doing recursive checks. In worst case it'll be just some extra synchronization time, no render time difference will happen for false-positive because of extra checks happening in Cycles.
2016-04-01Cycles: Support deformation motion blur for curves deformed by taperSergey Sharybin
2016-02-11Fix T47387: Cycles Point Density Render IssuesSergey Sharybin
2016-01-09Fix broken build from rBd7da51b727725Bastien Montagne
Please avoid specialized typed enums in headers as widely used as BKE_object.h, we do not want to include DNA_modifiers_type.h everywhere...
2016-01-09Smoke, Dynamic Paint: de-duplicate object subframe update function.Kévin Dietrich
As in the title. In the smoke version, there was also an extra 'for_render' parameter that wasn't used, and wasn't used by the callers either, so it was removed altogether. Reviewers: brecht Reviewed By: brecht Subscribers: brecht Differential Revision: https://developer.blender.org/D1718
2016-01-04Fix T47038: Particles in Particle Edit Mode get added in completely wrong ↵Bastien Montagne
location. It also fixes another issue (crash) related to symmetric editing. Quite involved, we (try to!) fix complete broken logic of parts of particle code, which would use poly index as tessface one (or vice-versa). Issue most probably goes back to BMesh integration time... This patch mostly fixes particle editing mode: - Adding/removing particles when using generative modifiers (like subsurf) should now work. - Adding/removing particles with a non-tessellated mesh (i.e. one having ngons) should also mostly work. - X-axis-mirror-editing particles over ngons does not really work, not sure why currently. - All this in both 'modes' (with or without using modifier stack for particles). Tech side: - Store a deformed-only DM in particle modifier data. - Rename existing DM to make it clear it's a final one. - Use deformed-only DM's tessface2poly mapping to 'solve' poly/tessface mismatches. - Make (part of) mirror-editing code able to use a DM instead of raw mesh, so that we can mirror based on final DM when editing particles using modifier stack (mandatory, since there is no way currently to find orig tessface from an final DM tessface index). Note that this patch is not really nice and clean (current particles are beyond hope on this side anyway), it's more like some urgency bandage. Whole crap needs complete rewrite anyway, BMesh's polygons make it really hard to work with current system (and looptri would not help much here). Also, did not test everything possibly affected by those changes, so it needs some users' testing & validation too. Reviewers: psy-fi Subscribers: dfelinto, eyecandy Maniphest Tasks: T47038 Differential Revision: https://developer.blender.org/D1685
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-11-24Fix T46816: Vert/Edge snap fails at edge of boundsCampbell Barton
2015-11-10Correct order-of-freeing error from last commitCampbell Barton
2015-11-10Fix T46720: Crash applying subsurf modifierCampbell Barton
Freeing a modifier that had data in the derived mesh could crash (applying or removing).
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