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-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-05Spelling: Predefined, Look Up, No OneHarley Acheson
Fixes 18 misspellings of 'predefined', 'Look Up', 'Lookup', and 'No One'. Differential Revision: https://developer.blender.org/D9466 Reviewed by Hans Goudey
2020-11-03Add a callback to `IDTypeInfo` to allow preservation of some data accross ↵Bastien Montagne
memfile undos This is essentially adding that new callback, and using it only for already existing Scene's 3DCursor. Note that the place where this is called has been moved again, after all have been lib-linked, such that those callbacks may also work on ID pointers. Maniphest Tasks: T71759 Differential Revision: https://developer.blender.org/D9237
2020-10-26Pose: Add a 'pose_ensure' new utils that only rebuilds if needed.Bastien Montagne
Avoids having to spread the check logic everywhere in the code.
2020-10-21Fix (studio-reported) Armature: bug in handling of custom bone transform.Bastien Montagne
This specific pose channel pointer was not handled at all during rebuilding of poses, meaning that it could end up pointing at some freed pchan.
2020-10-19Spelling: Then Versus ThanHarley Acheson
Corrects incorrect usages of the words 'then' and 'than'. Differential Revision: https://developer.blender.org/D9246 Reviewed by Campbell Barton
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-10-08Cleanup/refactor: move default init of armature to proper place.Bastien Montagne
2020-10-08Cleanup/refactor: `BKE_libblock_alloc` -> `BKE_id_new` in ID creation code.Bastien Montagne
Better use higher-level code from common ID management when possible. Helps to de-duplicate logic, and reduces outside usages of more 'dangerous' functions. Note that we could get rid of many of those `BKE_<id_type>_add` functions now, but on the other hand several of those take extra parameters and perform additional actions, so think we can keep them all for now as 'non-standard ID specific creation functions'.
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
2020-10-07Refactor `BKE_id_copy` to return the new ID pointer.Bastien Montagne
No reasons to keep the new ID pointer as parameter here. Part of T71219.
2020-10-02Fix T81345: part three, armature `free_data` was not handling editbones ↵Bastien Montagne
properly. Armature freeing would not correctly free its editbone IDProperties. Add a utils to free the whole list of edit bones, and properly handle their potential IDProperties.
2020-10-02Fix T81345, part two: crash in depsgraph when freeing COW armature.Bastien Montagne
Freeing of bones' IDproerties from Armature `free_data` callback would always attempt to do user refcounting, which should never be done from that code. This would generate crashes in depsgraph/COW context e.g.
2020-10-02Fix T81345: Part one: Missing handling of ID pointers from EditBone ↵Bastien Montagne
IDProperties. So far data management code would simply fully ignore potential ID pointers in custom properties of edit bones (which are a copy of those from regular `Bone`). This would lead to all kind of issues, among which refcounting inconsistencies, missing clearing of data uppon deletion, etc.
2020-09-10Refactor: move Armature .blend I/O to IDTypeInfo callbacksJacques Lucke
2020-09-09Cleanup: use bool instead of intJacques Lucke
2020-08-28IDTypeInfo: add .blend file io callbacksJacques Lucke
This is part of T76372. It adds the `blend_write`, `blend_read_data`, `blend_read_lib` and `blend_read_expand` which correspond to the various steps when reading and writing .blend files. Having these callbacks allows us to decentralize the blenloader code a lot more. This has the affect that code related to any specific ID type is less scattered. Reviewers: mont29 Differential Revision: https://developer.blender.org/D8670
2020-08-04Merge branch 'blender-v2.90-release'Sergey Sharybin
2020-08-04Pose channel: Add session UUIDSergey Sharybin
Allows to identify pose channels more reliably than by the pointer.
2020-08-02Cleanup: pass const matricesCampbell Barton
Also order return matrices last.
2020-08-02Cleanup: pass const matricesCampbell Barton
Also order return matrices last.
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-07-21Fix T78994: Clear selected pose doesn't work without animationHans Goudey
It looks like the code left this as a todo, but the basic solution is to add an extra parameter to BKE_bose_rest to check whether bones are selected before reseting them. I also corrected the operator description which said it acted on only selected bones even when there is an option to turn that off. The "act on selected" is generally implied for Blender's operators anyway. Differential Revision: https://developer.blender.org/D8319
2020-07-03Cleanup: Blendkernel, Clang-Tidy else-after-return fixes (incomplete)Sybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. Not all warnings are addressed in this commit. No functional changes.
2020-06-12Cleanup: split object data deform functions into their own filesCampbell Barton
Move armature/curve functions into their headers, they were previously in BKE_lattice.h
2020-06-12Cleanup: use doxy sections for armature.cCampbell Barton
2020-06-12Cleanup: minor changes to deform functionsCampbell Barton
- Use 'float (*)[3]' to avoid casts. - Remove unnecessary float[3] copy in gpencil_deform_verts. - Use MEM_SAFE_FREE - Use const arguments.
2020-06-12Cleanup: split deform functions that take target object-dataCampbell Barton
Prefer meaningful function names over redundant NULL arguments. Also clarify variable names as it wasn't obvious the object-data is part of the object target.
2020-06-12Cleanup: use BKE_ prefix for deform functionsCampbell Barton
2020-05-19Merge branch 'blender-v2.83-release'Philipp Oeser
2020-05-19Fix T76689: Armature layers not indicating the existence of bonesSybren A. Stüvel
From what I can see, there are two issues at play in {T76689} and its merged-in report {T76590}: - In Blender ≤ 2.79 the bone layer dots were updated in the draw code. This ensured the info was up to date before drawing. This is no longer possible, as the drawing code uses evaluated objects, and those should not be written to. This has been addressed in rB709f126e8143 by calling the update function explicitly in various places in the code. The problem is that this wasn't added to all necessary spots. - When in edit mode, changes are made to the edit bones but not to the 'actual' bones (this is synced when exiting edit mode). This causes undo to mess up the layer indicators. I think both issues can be addressed by having the dependency graph update the used layer info as part of the armature evaluation. This will make the undo system work properly, and allows the removal of some `BKE_armature_refresh_layer_used()` from various places. There is still the issue that there are two functions (`BKE_armature_refresh_layer_used()` and `ED_armature_edit_refresh_layer_used()`) that are both responsible for updating `bArmature::layer_used`. This is a trickier thing to solve, though, as the definition of the `EditBone` struct resides in the armature editor module. This means that blenkernel can't iterate over edit bones, but on the other hand the dependency graph shouldn't call any editor functions either. This is why I left the `ED_armature_edit_refresh_layer_used()` calls untouched. The downside of recalculating `layer_used` from the dependency graph (at least in the way that I did it now) is that it is called every time a user moves a bone in pose mode. This frequency of updates is not necessary. Differential Revision: https://developer.blender.org/D7709
2020-05-12Refactor: Move armature foreach_id to new IDTypeInfo structure.Bastien Montagne
2020-04-06Fix T75418: Outliner Blender File view has UNKNOWN category for armaturesPhilipp Oeser
Typo in rB57daecc2cf88. Maniphest Tasks: T75418 Differential Revision: https://developer.blender.org/D7346
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: split `BKE_anim.h` and `anim.c` into smaller piecesSybren A. Stüvel
The files are now split up into the following sections: - `BKE_anim_path.h` and `anim_path.c` for path/curve functions. - `BKE_anim_visualization.h` and `anim_visualizationanim_path.c` for animation visualization (mostly motion paths). - `BKE_duplilist.h` for DupliList function declarations. These were already implemented in `object_dupli.c`, so they were rather out of place being declared in `BKE_anim.h` in the first place. No functional changes.
2020-04-03Cleanup: use tern 'sync' instead of 'synchronization' for function namesCampbell Barton
This is a common, unambiguous abbreviation already used throughout the code-base.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-11Cleanup: spellingCampbell Barton
2020-03-09Cleanup: Move `BKE_animdata_free()` call out of each IDType free data.Bastien Montagne
This has been long standing TODO... Note that remaining usages of BKE_xxx_delete should all be carefully checked for and utilmately nuked in favor of `BKE_id_delete()`, think we still have quiet a few bugs hidden in those (code seems to usually assume those functions do a full ID deletion, which is not the case).
2020-03-06Cleanup: Armature: Move to IDTypeInfo, and remove unused BKE API.Dalai Felinto
2020-03-06Cleanup: use 'BKE_' prefix for BKE_deform API callsCampbell Barton
- Use 'BKE_object_defgroup' prefix for object functions. - Rename 'defvert_verify_index' to 'defvert_ensure_index' since this adds the group if it isn't found.
2020-03-06Cleanup: spellingCampbell Barton
2020-03-04Refactor ID make local to use a single flag parameter.Bastien Montagne
Instead of using anonymous booleans flags, also allows to keep the same behavior in all cases, without needing special handling from calling code for our beloved oddballs object proxies...
2020-03-04Cleanup: ID make local: remove `id_in_bmain` argument.Bastien Montagne
This info is now stored in ID tags themselves, so no need to pass an extra anonymous boolean parameter around, yay!
2020-03-04Cleanup: Rename 'make local' functions to new scheme.Bastien Montagne
Also removed some only used locally from the header, `BKE_lib_id.h` is already way too big, no need to overload it with unused things.
2020-02-11Fix T56108: Crash editing corrupted vertex groupsCampbell Barton
While the file in this report had corrupted values, this is avoidable without adding any extra overhead. Use unsigned vertex group indices since we don't need negative values, this is an alternative to checking they aren't negative in many places. Vertex group values over INT_MAX is still considered invalid, so any accidental unsigned wrapping won't be silently ignored.
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-01-19Fix T73117: B-Bone twist weirdness in chains with sharp bends.Alexander Gavrilov
When computing the roll value coming from the handle bone, the code was using some strange unexplained math. It probably works fine when the difference with the 'zero roll' orientation is pure twist, like is the case when called from mat3_to_vec_roll. However, it appears to break when significant swing is involved. The issue is fixed by using the proper Swing+Twist decomposition utility function that was added in a recent version for drivers.
2019-12-06Cleanup: clang-formatCampbell Barton