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
2022-03-24Fix T96294: Crash and error with shape key normal calculationHans Goudey
A mistake in the mesh normal refactor caused the wrong mesh to be used when calculating normals with a shape key's deformation. This commit fixes the normal calculation by using the correct mesh, with just adjusted vertex positions, and calculating the results directly into the result arrays when possible. This completely avoids the need to make a local copy of the mesh, which makes sense, since the only thing that changes is the vertex positions. Differential Revision: https://developer.blender.org/D14317
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2022-01-06Cleanup: Spelling/grammar in commentsHans Goudey
2021-12-07Cleanup: remove incorrect/unhelpful commentsCampbell Barton
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-08-20Cleanup: use "free_data" suffix when the argument isn't freedCampbell Barton
Avoid API misuse that caused leaks in T90791 & 2788b0261cb7d33a2f6f2978ff4f55bb4987edae.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-30Cleanup: use const arguments for accessor functionsCampbell Barton
2020-10-08Cleanup/Refactor: Shapekey: Get rid of `BKE_key_copy_nolib()`Bastien Montagne
Once again, no behavioral change expected here.
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-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-07-25Fix T72622: Transform object origin ignores shape keysCampbell Barton
D8367 by @paul2t with edits.
2020-03-06Cleanup: ShapeKey: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-21Cleanup: use const arguments for vertex coordsCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-01Cleanup: Set BKE_key_from_object/_p to take const Object *Dalai Felinto
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-02Cleanup: remove author/date info from doxy headersCampbell Barton
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2019-01-25ShapeKey: add utils to say whether given ID type supports shapekeys.Bastien Montagne
Those kind of checks are handy to have for generic processing...
2018-09-20Put the Radius property of Curve points under shape key control.Alexander Gavrilov
Since shape keys are stored as raw floating point data, this unfortunately requires changes to all code that works with it. An additional complication is that bezier and nurbs control points have different entry size, and can be mixed in the same object (and hence shape key buffer). Shape key entries are changed from: bezier: float v1[3], v2[3], v3[3], tilt, pad, pad; nurbs: float vec[3], tilt; To: bezier: float v1[3], v2[3], v3[3], tilt, radius, pad; nurbs: float vec[3], tilt, radius, pad; The official shape key element size is changed to 3 floats, with 4 elements for bezier nodes, and 2 for nurbs. This also means that the element count is not equal to the vertex count anymore. While searching for all curve Shape Key code, I also found that BKE_curve_transform_ex and BKE_curve_translate were broken. This can be seen by trying to change the Origin of a Curve with keys. Reviewers: campbellbarton, sergey Differential Revision: https://developer.blender.org/D3676
2018-09-12Cleanup: make shapekey functions localCampbell Barton
Were only exposed for the BGE.
2018-06-21Cleanup: remove DM from 'join as shape' operator.Bastien Montagne
Also deduplicated the 'mesh as shapekey' code, we had kind of two funcs doing the same thing here...
2018-06-12Cleanup: remove moar G.main from BKE area.Bastien Montagne
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
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.
2016-07-14Get rid of BKE_key_make_local().Bastien Montagne
This function was only a wrapper around id_clear_lib_data(), and shapekeys are not linkable nor shareable anyway, no point keeping this currently, was only adding confusion about shapekey 'status' as a datatblock.
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-09Add BKE_key_copy_ex() that takes a Main as parameter.Bastien Montagne
2016-07-09Cleanup to shapekeys' make_local (and copy) functions.Bastien Montagne
Mostly pass bmain and do not check for NULL key, keys' make_local is suspiciously simple in fact, but think until those behave like real full-featured IDs, it's doing enough!
2015-10-12Add functions to compute normals (verts, polys and loops ones) for a given ↵Bastien Montagne
shapekey. Title says pretty much everything, we now have BKE and RNA funcs to get vertex, poly and loop normals of a given shapekey. This will be used e.g. in FBX exporter (shapekeys need normal data too). Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1510
2015-10-08BKE_key: add BKE_key_from_id helper functionsCampbell Barton
2015-06-08RNA: Object.shape_key_remove methodCampbell Barton
Python had no ability to remove shape keys Original D1169 from @lichtwerk, with edits
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-01-06Remove slurph shape-key featureCampbell Barton
This is an old option which wasn't working in over a year without complaint.
2014-11-17ShapeKeys: Add `BKE_keyblock_is_basis` to check whether a given keyblock is ↵Bastien Montagne
used a basis by others. Also fix stupid debug-only error in previous commit.
2014-11-17Cleanup: rename `BKE_key_convert/update` to `BKE_keyblock_convert/update`.Bastien Montagne
We are handling a keyblock here, not a whole key(set). Names are alreay a bit confusing, let's be consistent at least.
2014-11-17ShapeKey: Refactor a bit `BKE_key_convert_from_...`Bastien Montagne
Thing is, those functions always reallocate the whole keyblock's data mem, while in some cases we already have right amount of elements, so we can just copy over. Further more, `BKE_key_convert_from_offset`, despite its name, was not making any check nor allocation on keyblock's data elements! So split 'copy' operation itself in `BKE_key_update_from_...`, where no mem checks/operations are performed (only an assert). Only useful in sculpt mode currently, but will be used by fix for T35170 too.
2014-10-21ShapeKeys: rework 'move skey' code, and add options to move to first/last ↵Bastien Montagne
position. Main moving logic is moved to new `BKE_keyblock_move()`, which makes it available from anywhere. In addition, move code was reworked so that it only loops once on whole keyblocks list, and it accepts arbitrary org and dest indices, not only neighbor ones. Partly based on work by revzin (Grigory Revzin) in his soc-2014-shapekey GSoC branch, thanks!
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2013-08-19Optimization and threading fix for shapekeys weights calculationSergey Sharybin
This commit fixes two different issues, which were caused by how weights are being calculated for relative shapekeys. Weights for key block used to saved in KeyBlock DNA structure, which lead to situations when different objects could start writing to the same weights array if they're sharing the same key datablock. Solved this in a way so weights are never stored in KeyBlock and being passed to shapekeys routines as an array of pointers. This way weights are still computed run-time (meaning they're calculated before shapekey evaluation and freed afterwards). This required some changes to GameEngine as well, to make it never cache weights in the key blocks. Another aspect of this commit makes it so weight for a given vertex group is only computed once. So if multiple key blocks are using the same influence vertex group, they'll share the same exact weights array. This gave around 1.7x speedup in test chinchilla file which is close enough to if we've been caching weights permanently in DNA (test machine is dual-code 4 threads laptop, speedup measured in depsgraph_mt branch, trunk might be not so much high speedup). Some further speed is optimization possible, but it could be done later as well. Thanks Brecht for idea of how the things might be solved in really clear way. -- svn merge -r58786:58787 ^/branches/soc-2013-depsgraph_mt
2013-07-19optimization: avoid memcpy with shake key vertex array.Campbell Barton
2013-01-03fix [#33682] Animation not updated when the active shape index isnt setCampbell Barton
2012-10-09code cleanup: make header defines more consistent, JOYSENSOR header guard ↵Campbell Barton
had a typo too.
2012-09-19joining mesh objects now keeps relative key setting of each keyblock. also ↵Campbell Barton
joining absolute shapekeys now sorts by time.