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
2020-06-12LibOverride: Remove 'auto override' option.Bastien Montagne
Now all overrides are handled that way. Performances of the process look decent enough, even with production characters... If performance issues still arise, we'll investigate other solutions. This should also make T73154 obsolete now.
2020-06-10Cleanup: Remove no more used `ED_object_single_users`.Bastien Montagne
This utils was only used for scenes' full copy, and was using old deprecated ways to deal with ID relations and such. Good riddance!
2020-06-05Cleanup: spellingCampbell Barton
2020-06-02Library Overrides: Don't move collections to Scene Collection when overridingJulian Eisel
When using the "Make Library Override" operator on instance collections, keep the overriden collection in the parent collection of the instance empty. Previoulsy the collection would be added to the scene collection, which was confusing and not what users expected. It was placed there for a reason after all. Part of T76555. Reviewed by: Andy Goralczyk, Bastien Montange. Differential Revision: https://developer.blender.org/D7626
2020-06-02Library Overrides: Unlink instance empty after "Make Library Override"Julian Eisel
Unlink (delete if single-user) collection instance empty once an override is added to the collection through the "Make Library Override" operator. It isn't used as a collection instance anymore then so the emtpy is an annoying left over that has no purpose. Part of T76555. Reviewed by: Andy Goralczyk, Bastien Montange. Differential Revision: https://developer.blender.org/D7626
2020-05-29Cleanup: spelling, correct reference to 'Mesh.mcol'Campbell Barton
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-05-06Fix T76416: Armature Deform parenting option doesn't work with Grease Pencil ↵Philipp Oeser
objects If we parent with type `PAR_ARMATURE` (where vertexgroups are already set up and named correctly according to the corresponding bones), we still need an armature modifier. This just wasnt added. In contrast to meshes [which add their armature modifier early in `ED_object_parent_set`], grease pencil used to do this (adding the armature modifier) in `ED_gpencil_add_armature_weights`. Now split ED_gpencil_add_armature_weights in two: - ED_gpencil_add_armature - ED_gpencil_add_armature_weights (which calls ED_gpencil_add_armature) - use ED_gpencil_add_armature for the PAR_ARMATURE case Maniphest Tasks: T76416 Differential Revision: https://developer.blender.org/D7625
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-04-03Cleanup: Animation, move AnimData API to `anim_data.c`/`BKE_anim_data.h`Sybren A. Stüvel
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData API" section. The code in that section has now been split off, and placed into `BKE_anim_data.h` and `anim_data.c`. All files that used to include `BKE_animsys.h` have been adjusted to only include the animation headers they need (sometimes none). No functional changes.
2020-04-03Cleanup: use abbreviated names for unsigned types in editorsCampbell Barton
2020-03-26Fix crash when make proxy failed to assign a proxyCampbell Barton
2020-03-26Cleanup: use doxy sections & add missing sectionsCampbell Barton
2020-03-23Revert "COW: Edit Mesh: Do not copy the looptris pointer"Germano Cavalcante
The looptri is repeated in the linked Meshes but the pointer is only referenced in the evaluated ones. This reverts commit 64982e213f014123d1b0406cf9ae893910a6a3d3.
2020-03-23COW: Edit Mesh: Do not copy the looptris pointerGermano Cavalcante
No functional changes. Differential Revision: https://developer.blender.org/D7173
2020-03-20Fix T74649: Outliner: Cannot set/clear parent with 'Keep Transforms'Philipp Oeser
Parenting in the outliner via drang and drop would always happen without the 'Keep Transforms' option. Since this is often desired, this adds the ability to hold Alt for doing this to the drop action. Adding the hint to hold Alt to the operator name is not nice, but since the operator name is used for the UI, there doesnt seem to be a nicer way of doing this. If modifier keys are needed back for other actions, spawning a menu instead could be an alternative for the future. Maniphest Tasks: T74649 Differential Revision: https://developer.blender.org/D7120
2020-03-19Cleanup: fix typos in commentsBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D7133
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Objects: add Volume object type, and prototypes for Hair and PointCloudBrecht Van Lommel
Only the volume object is exposed in the user interface. It is based on OpenVDB internally. Drawing and rendering code will follow in another commit. https://wiki.blender.org/wiki/Source/Objects/Volume https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES build option. These are unfinished, and included only to make it easier to cooperate on development in the future and avoid tricky merges. https://wiki.blender.org/wiki/Source/Objects/New_Object_Types Ref T73201, T68981 Differential Revision: https://developer.blender.org/D6945
2020-03-13Multires: Fix Subdivide, Reshape and Apply BaseSergey Sharybin
This change fixes artifacts produced by these operations. On a technical aspect this is done by porting all of the operations to the new subdivision surface implementation which ensures that tangent space used to evaluate modifier and those operations is exactly the same (before modifier will use new code and the operations will still use an old one). The next step is to get sculpting on a non-top level to work, and that actually requires fixes in the undo system.
2020-03-06Cleanup: keyframe API naming, high level keyframe APICampbell Barton
- Split 'verify_fcurve' into two functions: ED_action_fcurve_ensure which adds the f-curve if needed. ED_action_fcurve_find which returns NULL when not found. Callers of ED_action_fcurve_find had unused 'group' argument which has been removed. - Rename verify_adt_action to ED_id_action_ensure It had an argument to add data which was always true, remove this instead of splitting in into a separate function.
2020-03-05Cleanup: redundant castsCampbell Barton
2020-03-05Cleanup: material API namingCampbell Barton
- Use 'BKE_object_material_*', 'BKE_id_material_*' prefix for functions that operate on Object and ID types. - Use '_len' suffix for length (matching BLI naming). - Use '_p' suffix for functions that return a pointer to values where the value would typically be returned. Functions renamed: - BKE_object_material_resize was BKE_material_resize_object - BKE_object_material_remap was BKE_material_remap_object - BKE_object_material_remap_calc was BKE_material_remap_object_calc - BKE_object_material_array_p was BKE_object_material_array - BKE_object_material_len_p was BKE_object_material_num - BKE_id_material_array_p was BKE_id_material_array - BKE_id_material_len_p was BKE_id_material_num - BKE_id_material_resize was BKE_material_resize_id - BKE_id_material_append was BKE_material_append_id - BKE_id_material_pop was BKE_material_pop_id - BKE_id_material_clear was BKE_material_clear_id
2020-03-04Fix T73797: Selection/Editing after Make Single User for Object DataPhilipp Oeser
fails Exposed by rB50d5c03e2d14. This was only a problem when _only_ 'Object Data' was made local. If also e.g. 'Object' or 'Materials' was checked, these were already making sure realations were updated [DEG_relations_tag_update(bmain)]. Now also call DEG_relations_tag_update(bmain) for the 'Object Data' case. I assume the underlying issue is that there is some ID_NEW_REMAP happening in 'single_obdata_users()' -- including that for 'me- >texcomesh', which might be responsible for the glitches in selection/ editing? Also not entirely sure why this wasnt a problem prior to rB50d5c03e2d14.(I assume this was somewhat hidden by the fact this was always called with a default action being nothing, the user would always need to access the redo panel. So this might have been hidden by an Undo step involved?) Maniphest Tasks: T73797 Differential Revision: https://developer.blender.org/D7020
2020-02-13Refactor libquery ID looper callback to take a single parameter.Bastien Montagne
Using a struct here allows to change given parameters to the callbacks without having to edit all callbacks functions, which is always noisy and time consuming.
2020-02-11UI: Use popup dialog for make single user from operator searchCampbell Barton
Use a popup since the default action was to do nothing, the user would always need to access the redo panel. Resolves T73711.
2020-02-10Cleanup: Rename `BKE_library_override_` functions to `BKE_lib_override_library_`Bastien Montagne
pqrt of T72604.
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2020-02-07Fix T73660: Hide envelop option for Grease Pencil weights generationAntonio Vazquez
As this feature is not supported yet, it's better to hide for grease pencil. Differential Revision: https://developer.blender.org/D6777
2020-02-07remove poll for OBJECT_OT_parent_clearPhilipp Oeser
This works on selected_editable_objects, so no active object mandatory. After deletion of the active object and using slection tools such as e.g. box select, the lack of an active object would prevent this operator from being called without good reason. Also cannot think of any other existing poll that would really make sense (Editor type, ...). ref T68975 Maniphest Tasks: T68975 Differential Revision: https://developer.blender.org/D6773
2020-02-05T73589: Code Quality: Renaming on BKE_material.hAntonio Vazquez
Old Name New Name ========= ========= init_def_material BKE_materials_init BKE_material_gpencil_default_free BKE_materials_exit test_object_materials BKE_object_materials_test test_all_objects_materials BKE_objects_materials_test_all give_matarar BKE_object_material_array give_totcolp BKE_object_material_num give_current_material_p BKE_object_material_get_p give_current_material BKE_object_material_get assign_material BKE_object_material_assign assign_matarar BKE_object_material_array_assign give_matarar_id BKE_id_material_array give_totcolp_id BKE_id_material_num assign_material_id BKE_id_material_assign clear_matcopybuf BKE_material_copybuf_clear free_matcopybuf BKE_material_copybuf_free copy_matcopybuf BKE_material_copybuf_copy paste_matcopybuf BKE_material_copybuf_paste BKE_material_init_gpencil_settings BKE_gpencil_material_attr_init BKE_material_add_gpencil BKE_gpencil_material_add BKE_material_gpencil_get BKE_gpencil_material BKE_material_gpencil_default_get BKE_gpencil_material_default BKE_material_gpencil_settings_get BKE_gpencil_material_settings
2020-01-25Cleanup: spellingCampbell Barton
2020-01-24Fix T72083: Object.proxy_collection is been set to linked target objectPhilipp Oeser
even when target is not a collection Looks like this was (accidentally) removed in {rBbe9e469ead22} https://developer.blender.org/ rBbe9e469ead227aee8d4c29b98a125cf599c5c8bb#change-pFg0VUTAHY2q This could also result in a missing update in object_handle_update_proxy, see T72083 for an example. Thx @Macroni investigating! Maniphest Tasks: T72083 Differential Revision: https://developer.blender.org/D6651
2020-01-17Fix memory leak when full-copying a scene after recent changes.Bastien Montagne
Once again, am not exactly sure why that was working before, and not anymore - but in any case, doing that kind of update here is not only useless (since we have to do it at the end of the whole collections/objects duplication and remapping anyway), it is also rather dangerous, as collections are currently in rather invalid states at that point of the code... Note that in ideal world, `BKE_main_collection_sync()` & co would be lazy (setting only a flag, then code actually needing this to be valid again should call some sort of `BKE_main_collection_sync_ensure()`). Then we would not have to worry about such things (and we'd get nice performance improvements in some cases, also in main remapping code, etc.). Food for some refactoring, some day...
2020-01-17Cleanup of previous rBac723db57fd8ba5 commit.Bastien Montagne
Simplify a bit, and remove some now redundant remappings. As a side note, rBac723db57fd8ba5 actually also fixed some unreported issues (missing remappings to new objects/collections in new copied scene, that were not previously handled by the 'custom' code). There are almost certainly still some missing remappings around, though...
2020-01-17Fix T73170: New Scene -> "Full Copy" Crashes Blender.Bastien Montagne
rBac723db57fd8ba5 makes proper remapping of all pointers in Scene... including the object pointers of bases in ViewLayers. Using `BKE_main_collection_sync_remap()` makes sense here anyway (compared to `BKE_main_collection_sync()`, it additionally clears caches in ViewLayers and Collections), this whole code makes a lot of remapping. Note that I do not really understand *why* that was working OK before rBac723db57fd8ba5. I.E. *why* not remapping at all ViewLayers' base object pointers seemed to be OK... This whole collection/viewlayer caching is very hard to follow, and really needs a full rework at some point (just as much as ID copying code in general, and scene copying code in particular, in fact).
2020-01-17Cleanup: remove dead code in full scene copy/make single users area.Bastien Montagne
2020-01-14Fix T71798: Full Copy Scene produce Orphan Data objects.Bastien Montagne
Never treat one of those horrorible 'IDs that are not real IDs' as regular ID, and expect ID management code to do so. Unless there is a very good reason, one should never explicitely pass those fake IDs to ID management code directly. In that specific case, user count is sort of 'disabled' in libquery code, because master collections are not in bmain (`LIB_TAG_NO_MAIN`).
2019-10-10Cleanup: clang-format, spellingCampbell Barton
2019-10-01Fix T66641: Certain drivers fail to copy when copying a full scene.Bastien Montagne
The core of the issue here is that 'make single user' functions still does its own, manual and quite partial, remapping of IDs, which covers all most common cases but cannot consider *all* possible ID usages (especially when it comes to drivers or custom properties, that can essentially point to any kind of data-blocks). This fix is merely a band-aid, there is no way to fully solve this without a complete rewrite of that area of code to make use of modern ID management code.
2019-09-16Fix T64238: Scene Full Copy: Cameras bound to markers does not update.Bastien Montagne
That's exactly why we should get rid of all those 'custom cases' remapping code, it's hard enough to keep a single place (library_query.c) up to date and 100% valid, but having more areas doing their own remapping is just impossible to maintain... Some day...
2019-09-05LibOverride: add a generic macro to check whetehr an ID is overridable.Bastien Montagne
...and use it in code generating library overrides.
2019-09-05LibOverride: give more remapping control to ↵Bastien Montagne
`BKE_override_library_create_from_id()` too. Similar change to the one done for tagged IDs overriding some days ago. We do not always want to remap all local usages of a linked data-block to its new local overriding copy.
2019-09-02Cleanup: get rid of BKE_collection_master() useless accessor.Bastien Montagne
In its current version that was a totally useless extra layer of crap that we can totally avoid. Plus name was bad too.
2019-08-29LibOverride: Create override operator: various fixes.Bastien Montagne
* `make_override_library_exec` was not properly cleaning `LIB_TAG_DOIT` from all IDs in the Main DB. * `BKE_override_library_create_from_tag` was doing dangerous things (like iterating over a BMain listbase while adding items to it...). * It would remap *all* local usages of overridden linked IDs to new overriding local IDs, which was very inconvinient. New handling of remapping now allows to only remap inside of the group of IDs that is being overridden, in other words you can still have e.g. other empties still instancing the same linked collection...
2019-08-25Cleanup: rename mesh looptri/tessface functionsCampbell Barton
Use consistent terminology.
2019-08-23LibOverride: Disable the re-parenting of overriding objects to the ↵Bastien Montagne
instancing empty. Does not seems to be that useful... And it's breaking the objects also 'parented' to an armature through a modifier...
2019-08-23RNA: Cleanup PointerRNA structJacques Lucke
The old layout of `PointerRNA` was confusing for historic reasons: ``` typedef struct PointerRNA { struct { void *data; } id; struct StructRNA *type; void *data; } PointerRNA; ``` This patch updates it to: ``` typedef struct PointerRNA { struct ID *owner_id; struct StructRNA *type; void *data; } PointerRNA; ``` Throughout the code base `id.data` was replaced with `owner_id`. Furthermore, many explicit pointer type casts were added which were implicit before. Some type casts to `ID *` were removed. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5558
2019-08-17Cleanup: spellingCampbell Barton
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz