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
2019-04-18Armature: remove remains of the object-level deformation data cache.Alexander Gavrilov
Now that B-Bone shape data is kept in bPoseChannel_Runtime, the armature level cache only holds one quaternion value per bone. It can also be moved to runtime, and the structure removed. This has an additional effect that, as far as I can tell, now the Armature modifier can run as soon as all of the bones it actually needs are done, thus making T59848 a purely depsgraph level problem.
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-04-14Depsgraph: fix hard CTD on dependency cycles through POSE_INIT.Alexander Gavrilov
As reported in T63582, it can cause chan_array to be not ready. To reliably avoid crashing, the only easy way seems to be to create the index during COW -- maybe @sergey has a better idea.
2019-04-13Fix T37500: implement Bendy bone segment deformation interpolation.Alexander Gavrilov
Previously B-Bone deformation mapped every vertex to just one B-Bone segment. This results in abrupt transformation differences between the sides of each threshold plane, reducing the quality of B-Bone deformation and making the use of shape keys impractical. This commit replaces this approach with a linear blend between the two closest segment transformations, effectively representing the B-Bone as two weight-blended plain bones for each vertex. In order to distribute the interpolation more evenly along the bone, segment matrices for deformation are now computed at points between the segments and at the ends of the B-Bone. The computation also uses the true tangents of the Bezier curve for the orientation. The nodes at the end of the bone require some special handling to deal with zero-length Bezier handles caused by a zero ease value. The Copy Transforms constraint now also smoothly interpolates rotation and scaling along the bone shape when enabled. The initial version of the patch was submitted by @Sam200. Differential Revision: https://developer.blender.org/D4635
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
2018-12-20Cleanup: namingCampbell Barton
2018-12-11RNA: provide access to bone parent transform math from Python.Alexander Gavrilov
Applying the effect of bone parent is much more complicated than simple matrix multiplication because of the various flags like Inherit Scale. Thus it is reasonable to provide access to this math from Python for complicated rest pose related manipulations. The simple case of this is handled by Object.convert_space, so the new method is only needed for complex tasks. Differential Revision: https://developer.blender.org/D4053
2018-12-10Cleanup: Variable namingSergey Sharybin
2018-12-02Merge branch 'master' into blender2.8Campbell Barton
2018-12-02Cleanup: BKE b-bone API namingCampbell Barton
Use BKE_pchan_bbone prefix.
2018-11-27RNA: expose access to B-Bone shape data from Python.Alexander Gavrilov
B-Bone shape is a non-trivial computation, so access to the results would be useful for Python scripts working with B-Bones, e.g. rig generation. This exposes both final segment matrices, and the tangent vectors computed from the custom handle bones. Since the handle tangents use the axis+roll orientation math of edit bones, add matrix conversion static methods to Bone. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D3983
2018-11-23Depsgraph: add a new operation node for computing B-Bone segments.Alexander Gavrilov
Computing the shape of a B-Bone is a quite expensive operation, and there are multiple constraints that can access this information in a variety of useful ways. This means computing the shape once per bone and saving it is good for performance. Since the shape may depend on the position of up to two other bones, often in a "cyclic" manner, this computation has to be a separate node with its own dependencies. Reviewers: sergey Differential Revision: https://developer.blender.org/D3975
2018-11-22Cleanup: Use proper module prefix in function namesSergey Sharybin
2018-11-20Speedup rigs with multiple objects deformed by bbonesSergey Sharybin
Previously each of the objects which has armature modifier will request deformation matricies from bbones. Thing is, all those deformations are the same and do not depend on object which is being modified. What's even worse is that this calculation is not cheap. This change makes it so bbones deformation is calculated once and stored in the armature object. After this armature modifiers simply use it. With a rigs we've got here dependency graph evaluation time goes down from 0.02 sec to 0.012 sec. Possible further optimization is to make bbone deformation calculated at the time when bone is calculated. This will avoid an extra threaded loop over all bones.
2018-11-07Depsgraph: Ensure dependency cycle does not clear runtime memorySergey Sharybin
If there was a dependency cycle involved, it was possible that pchan array will be freed before all bones are evaluated. Now clear is done in a dedicated node, which is never a part of dependency cycle.
2018-11-05Cleanup: use boolCampbell Barton
2018-10-31Allow changing B-Bone custom handle references from Pose Mode.Alexander Gavrilov
@jpbouza was rather upset these were made read-only, and unlike parents, it's not that hard to allow changing these Bone fields: all is needed is to carefully refresh the matching fields in the relevant bPoseChannel objects and properly tag update. Reviewers: brecht Differential Revision: https://developer.blender.org/D3870
2018-10-05Add and use a utility for computing B-Bone roll from custom handles.Alexander Gavrilov
This also fixes a stability problem with the start handle due to an incorrect matrix multiplication order.
2018-10-04Fix T56268: display the correct rest shape for B-Bones in Edit Mode.Alexander Gavrilov
The rest shape of B-Bones is actually affected by custom handles or the default connected parent/child mechanism. Ignoring these effects thus leads to the edit mode shape being different from the actual rest pose. This splits the b_bone_spline_setup function that is used to compute the correct rest and pose shape from pose channels into two parts, and applies the data structure independent half to edit mode. In order to access the custom handle settings in Edit Mode, they are moved to Bone and EditBone, while the bPoseChannel fields are downgraded in status to a cache for performance. Also, instead of flags, introduce an enum to specify the handle operation modes, so that new ones could be added later. Reviewers: aligorith, brecht Differential Revision: https://developer.blender.org/D3588
2018-09-24Merge branch 'master' into blender2.8Brecht Van Lommel
2018-09-24Spelling fixes in comments and descriptions, patch by luzpaz.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D3719
2018-08-13Fix dependency graph for constraints depending on B-Bone shape.Alexander Gavrilov
Some constraints have an option to take the final bezier shape of the target B-Bone into account. This shape usually depends on two other bones in addition to the target itself, so the graph should include the relevant dependencies. Reviewers: sergey Differential Revision: https://developer.blender.org/D3591
2018-07-31Fix T56170: Fake dependency cycle in new depsgraph + interleaved armature ↵Sergey Sharybin
update + proxy Make proxy copy result more atomic operation.
2018-07-31Respect ID user count when creating pose on object copySergey Sharybin
This solves wrong user counter of custom shape when duplicating bone few times and then undoing all the duplications.
2018-07-20Fix T55973: [2.8] Crash when 'apply pose as rest pose' when bone scale is 0,0,0.Bastien Montagne
`BKE_pose_rebuild()` should (ideally) always trigger a rebuild of the depsgraph, since it can add or remove posechannels. This function now takes a Main parameter to ensure that related depsgraphes are tagged as dirty (kept it optional, for some corner cases). We should also probably double-check calls to that function, think in theory it should only be called from depsgraph itself? But for now...
2018-06-29Merge branch 'master' into blender2.8Campbell Barton
2018-06-29Cleanup: trailing newlinesCampbell Barton
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenkernelCampbell Barton
2018-05-08Cleanup: whitespace, duplicate includesCampbell Barton
2018-05-03Depsgraph: Make sure evaluated pose channels are pointing to evaluated bonesSergey Sharybin
2018-04-30Cleanup: Move FOREACH_PCHAN_*_IN_OBJECT_*() macros to BKE_armature.hJoshua Leung
This reduces the number of headers we need to import (and/or dependencies on the order of them), as these depend on PBONE_VISIBLE(), which is already in BKE_armature.h
2018-04-16Depsgraph: remove EvaluationContext, pass Depsgraph instead.Brecht Van Lommel
The depsgraph was always created within a fixed evaluation context. Passing both risks the depsgraph and evaluation context not matching, and it complicates the Python API where we'd have to expose both which is not so easy to understand. This also removes the global evaluation context in main, which assumed there to be a single active scene and view layer. Differential Revision: https://developer.blender.org/D3152
2018-04-04Merge branch 'master' into blender2.8Sergey Sharybin
2018-04-04Depsgraph: Only bind ID-data and indices to depsgraph callbacksSergey Sharybin
This is a part of copy-on-write sanitization, to avoid all the checks which were attempting to keep sub-data pointers intact. Point is: ID pointers never change for CoW datablocks, but nested data pointers might change when updating existing copy. Solution: Only bind ID data pointers and index of sub-data. This will make CoW datablock 7update function was easier in 2.8. In master we were only using pose channel pointers in callbacks, this is exactly what this commit addresses. A linear lookup array is created on pose evaluation init and is thrown away afterwards. One thing we might consider doing is to keep indexed array of poses, similar to chanhash. Reviewers: campbellbarton Reviewed By: campbellbarton Subscribers: dfelinto Differential Revision: https://developer.blender.org/D3124
2017-09-25Merge branch 'master' into blender2.8Sergey Sharybin
2017-09-25Fix T52835: When driven IK influence change, ik animation have 1 frame delaySergey Sharybin
2017-08-16Pass EvaluationContext instead of bContextCampbell Barton
2.8x branch added bContext arg in many places, pass eval-context instead since its not simple to reason about what what nested functions do when they can access and change almost anything. Also use const to prevent unexpected modifications. This fixes crash loading files with shadows, since off-screen buffers use a NULL context for rendering.
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-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-07-21Pass EvaluationContext argument everywhereLuca Rood
Note that some little parts of code have been dissabled because eval_ctx was not available there. This should be resolved once DerivedMesh is replaced.
2017-06-14Merge branch 'master' into blender2.8Bastien 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-06-07Manipulators: lamp, camera & force-fieldCampbell Barton
From custom-manipulators branch. These may be improved they work on a basic level.
2017-04-18Merge remote-tracking branch 'origin/master' into blender2.8Dalai Felinto
2017-04-18Depsgraph: Use proper scene to get frame from for pose constraints evaluaitonSergey Sharybin
Spotted by Luca, thanks!