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-10-14Cleanup: use const for eventsCampbell Barton
2017-08-30Fix T52588: Shape key value driver variables of duplicated object sets refer ↵Bastien Montagne
to old objects. Regression since 2.78, to be backported to 2.79.
2017-08-08Cleanup: mostly namings in `make_object_duplilist_real` code.Bastien Montagne
2017-08-08Fix T52260: Blender 2.79 Objects made duplicates real still refer armature ↵Bastien Montagne
proxy. New code was handling correctly ID's internal references to self, but not references between 'made real' different objects... Regression, to be backported in 2.79.
2017-07-21Fix T52136: Blender segfault (stack overflow most certainly) when converting ↵Bastien Montagne
to mesh. Stupid mistake in own recent refactor.
2017-07-03Fix T51883: Wrong matrix computation in "Make Duplicates Real"Luca Rood
2017-06-15Fix/workaround 'convert object' messing up linked data.Bastien Montagne
'Convert To...' Object operation has very weird effect of actually working at obdata level, not object level, which means *all* objects (even unselected/hidden/in other scenes/...) using same obdata will be converted to new selected type. IMHO this is very bad behavior, but... not a bug really, so do not change this for now. But at least, do not do that when working on some linked data, else it leaves Blend file in invalid (incoherent) state until next reload. So workaround for now is to enforce the 'Keep Original' option when some linked object/obdata is affected by the operation. Also fixed somewhat broken usercount handling in Curve->Mesh part.
2017-04-19Fix T51243: Delete Globally won't work with Datablock ID Properties.Bastien Montagne
That's a quick hack to address that specific case, new pointer IDProp actually enlights a generic problem - datablocks using themselves - which is not really handled by current code, would consider this not-so-urgent TODO though.
2017-03-17Mesh Convert: remove meaningless modifier checkCampbell Barton
Meshes w/o modifiers wouldn't have their derived mesh applied. Check was to avoid crash but its in fact meaningless, since the modifier might be disabled, or there may be virtual modifiers.
2017-03-17Fix T50950: Converting meshes fails w/ booleanCampbell Barton
2017-02-27Fix memory leak when making duplicates real and parent had constraintsSergey Sharybin
Thanks Bastien for help!
2017-01-04Fix T50369: Objects can't be deleted from scene when using "link group ↵Bastien Montagne
objects to scene" Main issue here was that in old usercount system 'user_real' did simply not allow that kind of thing to work. With new pait of 'USER_EXTRA' tags, it becomes possible to handle the case correctly, by merely refining checks about indirectly use objects whene removing them from a scene. Incidently, found another related bug, 'link group objects to scene' was not incrementing objects' usercount - bad, very very bad!
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-22Fix T49718: Wrong "Make Duplicates Real" behavior with "Keep Hierarchy"Luca Rood
All objects were being parented to a single instance of each parent object, instead of their respective instances, when using dupliverts or dupligroups. Behavior was caused by the `persistent_id[0]` (vertex/face id) being ignored when computing `parent_gh` hash, which caused all instances to have the same hash, and thus only the first one was included. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D2370
2016-11-04Fix (unreported) asserts in `make_object_duplilist_real()`.Bastien Montagne
Code would try to add multiple time the same key in `parent_gh` (for this ghash a lot of dupliobjects may generate same key). Was making the tool unusable in debug builds. Also optimise things a bit by avoiding creating parent_gh when only `use_base_parent` is set.
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-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-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-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-07-01"Fix" crash when deleting linked object which has indirect usages.Bastien Montagne
This is in fact very hairy situation here... Objects are only refcounted by scenes, any other usage is 'free', which means once all object instanciations are gone Blender considers it can delete it. There is a trap here though: indirect usages. Typically, we should never modify linked data (because it is essencially useless, changes would be ignored and ost on next reload or even undo/redo). This means indirect usages are not affected by default 'safe' remapping/unlinking. For unlinking preceeding deletion however, this is not acceptable - we are likely to end with a zero-user ID (aka deletable one) which is still actually used by other linked data. Solution choosen here is double: I) From 'user-space' (i.e. outliner, operators...), we check for cases where deleting datablocks should not be allowed (indirect data or indirectly used data), and abort (with report) if needed. II) From 'lower' level (BKE_library_remap and RNA), we also unlink from linked data, which makes actual deletion possible and safe. Note that with previous behavior (2.77 one), linked object would be deleted, including from linked data - but then, once file is saved and reloaded, indirect usage would link back the deleted object, without any instanciation in scene, which made it somehow virtual and unreachable... With new behavior, this is no more possible, but on the other hand it means that in situations of dependency cycles (two linked objects using each other), linked objects become impossible to delete (from user space). Not sure what's best here, behavior with those corner cases of library linking is very poorly defined... :(
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-06-06Fix T48582: Rigidbody simulation issue with new depsgraphSergey Sharybin
Being granular means we need to re-build depsgraph a bit more often.. The issue was caused by rigidbody requiring some special nodes to handle physics which were not created with just tagging object for update.
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-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.
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-05Fix T37879: Default UV generation for mesh primitives.Bastien Montagne
Adds default-generated UVs to mesh primitives (cone, cylinder, icosphere, uvsphere, cube, circle, grid) when they are added to the scene, since some of them can be pretty awkward to unwrap manually. Original patch: Liam Mitchell (CommanderCorianderSalamander). Main review work: Campbell Barton (campbellbarton). Finalization, fixes and cleanup: Bastien Montagne (mont29). Reviewers: mont29, #mesh_modeling, campbellbarton Reviewed By: mont29, campbellbarton Subscribers: lkruel, campbellbarton, michaelknubben, kevindietrich Maniphest Tasks: T37879 Differential Revision: https://developer.blender.org/D481
2015-12-01Fix T46900: Inset Faces Thickness & Depth Do Not Use Scene Units (i.e. ↵Bastien Montagne
Imperial). Was the case of several Mesh operators actually (and probably others, but cannot check everything). Added `RNA_def_property_float_distance` helper, avoids having to set PROP_DISTANCE subtype explicitly each time...
2015-11-23Cleanup: use `rna_enum_` prefix for RNA enumsCampbell Barton
Definitions could shadow local vars.
2015-11-18Cleanup: editor api namingCampbell Barton
- use ED_ prefix for api calls - use ED_*_select_pick for mouse selection (was already done in parts)
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-10-08Cleanup: remove unused fluidsim membersCampbell Barton
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-21Fix/Cleanup possibility to type insane values in 'add' operators options.Bastien Montagne
Our 'hard limit' values was too often max_int/float here, mis-typing could lead to crash (or infinite hanging) of Blender, see e.g. http://blender.stackexchange.com/questions/32790/blender-forces-computer-to-reboot-after-mistyping-extreme-value-for-resolution-i
2015-05-12Depsgraph: Add utility function to tag pose for recalcSergey Sharybin
Currently this function only tags pose itself, totally matching previous behavior. But this will be needed in the future once new dependency graph is landed, because of it's granular nature which relies on the fact that pose channels are all up to date when building the graph. Should be no functional changes so far.
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-03-13Add argument to DM_to_mesh() function to take ownership over the DMSergey Sharybin
The idea is pretty simple: instead of making temporary copy of all the related custom data layers just pass the ownership from the DM to the mesh. This is really handy in cases when you've got DM which you need to convert to Mesh datablock and wouldn't need that DM after conversion anyway. Foe example, render database conversion, exporters and even Modifier Apply will benefit from this option. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D1127
2015-03-06Fix metaball->mesh removing all metas in the sceneCampbell Barton
Assumed the entire scene used the one motherball.
2015-02-20RNA: use 1/0 for object layersCampbell Barton
internal api Consistency.
2015-02-17RNA API: reuse property lookupsCampbell Barton
2015-02-09Fix T43498: New curves fails /w radius & rotationCampbell Barton
Scaling matrix assumed no rotation, also remove unused apply_diameter arg.
2015-01-31Compiler warning: double-promotionCampbell Barton
2014-12-17Fix T42932: Drag&Drop of groups from the outliner was using undefinedLukas Tönne
event->mval. Calculating from event->x/y like object drag/drop does works. Also fixed a missing notifier of the object instancing operator.
2014-12-12cleanup: disallow NULL arg to uvedit_aspectCampbell Barton
also some typo's
2014-12-08Fix T42838: Make dupli's real use_hierarchy failsCampbell Barton
Regression since the dupli-object refactor.