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-01-06Cleanup: anim, remove `const` declarations from pass-by-value paramsSybren A. Stüvel
Remove `const` from pass-by-value parameters in function declarations. The variables passed as parameters can never be modified by the function anyway, so declaring them as `const` is meaningless. Having the declaration there could confuse, especially as it suggests it does have a meaning, training people to write meaningless code.
2021-12-21Fix T92930: Outliner "Show Active" bone fails in certain situationsPhilipp Oeser
Outliner would frame the armature object instead of the bone if the bone was on a hidden armature layer. Similar to issues reported in e.g. T58068 and T80464, this is due to the fact that `BKE_pose_channel_active` always checks for the armature layer (and returns NULL if a bone is not on a visible armature layer). Now propose to make this layer check **optional** (and e.g. from the Outliner be more permissive). This also introduces `BKE_pose_channel_active_if_layer_visible` which just wraps `BKE_pose_channel_active` with the check being ON. Maniphest Tasks: T92930 Differential Revision: https://developer.blender.org/D13154
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-11-24Animation: allow marking actions as cyclic for Cycle-Aware Keying.Alexander Gavrilov
When a manual frame range is set, allow marking an action as having Cyclic Animation. This does not affect how the action is evaluated, but the Cycle-Aware Keying option will automatically make any newly added F-Curves cyclic. This allows using the option from the start to build the cycle, rather than only for tweaking an existing loop. The curves are made cyclic when they have only one key, either after inserting the first key, or before adding the second one. The latter case avoids the need to manually make the first added curve cyclic after marking a newly added action cyclic. Differential Revision: https://developer.blender.org/D11803
2021-11-24Animation: allow manually setting the intended playback range for actions.Alexander Gavrilov
Some operations, e.g. adding a new action strip to NLA, require knowing the active frame range of an action. However, currently it can only be deduced by scanning the keyframes of the curves within it. This is not ideal if e.g. curves are staggered for overlap. As suggested by Nathan Vegdahl in comments to T54724, this patch adds Action properties that allow manually specifying its active frame range. The settings are exposed via a panel in the Dopesheet and Action Editor. When enabled, the range is highlighted in the background using a striped fill to distinguish it from the solid filled regular playback range. When set, the frame range is used when adding or updating NLA tracks, and by add-ons using `Action.frame_range`, e.g. FBX exporter. Differential Revision: https://developer.blender.org/D11803
2021-11-13Cleanup: spelling in comments, comment block formattingCampbell Barton
2021-11-12Assets: Store Action sub-type in asset metadataSybren A. Stüvel
Blender 3.0 will only support single-frame Actions in the pose library. The goal of this patch is to lay the groundwork for making it possible for the Asset Browser to reject/hide "animation snippet" Action assets. Determining whether an Action has one or more frames (i.e. whether it has a single pose or animation) requires inspecting the Action itself, and thus loading the data-block itself. This would make it impossible to quickly determine from the asset browser. To solve this, the Action is inspected before saving, and a `"is_single_frame"` boolean (well, 0/1 integer) IDProperty is added. Reviewed by: Severin Differential Revision: https://developer.blender.org/D13202
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-04-30Cleanup: rename BKE_pose_channel_{verify => ensure}Campbell Barton
The term `verify` doesn't fit with what this function does and is sometimes used to check data is valid or to control validity checking as with `RNA_define_verify_sdna`. use more common term `ensure`.
2021-04-30Cleanup: rename BKE_pose_channels_hash_{make => ensure}Campbell Barton
Use the term `ensure` since it makes it clear the data is not manipulated if it already exists.
2021-03-30Cleanup: animation, remove `BONE_UNKEYED` flagSybren A. Stüvel
Remove the `BONE_UNKEYED` flag. It was only written (set/cleared) but never actually read. Also remove `framechange_poses_clear_unkeyed()` as its only function was to clear the `BONE_UNKEYED` flag. It wasn't used anywhere either. The only code that used the flag was the `extract_pose_from_action()`, which was removed in 2869ce6cfab3aa4ff471bef6e49ac6fe15426247 (2009). No functional changes.
2021-03-26Animation: action mirror RNA API using pose contentsCampbell Barton
This adds a new RNA method `Action.flip_with_pose(ob)` to flip the action channels that control a pose. The rest-pose is used to properly flip the bones transformation. This is useful as a way to flip actions used in pose libraries, so the same action need not be included for each side. Reviewed By: sybren Ref D10781
2020-12-16Cleanup: sort struct blocksCampbell Barton
2020-11-06Refactor: move Pose .blend I/O to blenkernelJacques Lucke
Ref T76372.
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-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-08-04Pose channel: Add session UUIDSergey Sharybin
Allows to identify pose channels more reliably than by the pointer.
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-20T77086 Animation: Passing Dependency Graph to DriversSybren A. Stüvel
Custom driver functions need access to the dependency graph that is triggering the evaluation of the driver. This patch passes the dependency graph pointer through all the animation-related calls. Instead of passing the evaluation time to functions, the code now passes an `AnimationEvalContext` pointer: ``` typedef struct AnimationEvalContext { struct Depsgraph *const depsgraph; const float eval_time; } AnimationEvalContext; ``` These structs are read-only, meaning that the code cannot change the evaluation time. Note that the `depsgraph` pointer itself is const, but it points to a non-const depsgraph. FCurves and Drivers can be evaluated at a different time than the current scene time, for example when evaluating NLA strips. This means that, even though the current time is stored in the dependency graph, we need an explicit evaluation time. There are two functions that allow creation of `AnimationEvalContext` objects: - `BKE_animsys_eval_context_construct(Depsgraph *depsgraph, float eval_time)`, which creates a new context object from scratch, and - `BKE_animsys_eval_context_construct_at(AnimationEvalContext *anim_eval_context, float eval_time)`, which can be used to create a `AnimationEvalContext` with the same depsgraph, but at a different time. This makes it possible to later add fields without changing any of the code that just want to change the eval time. This also provides a fix for T75553, although it does require a change to the custom driver function. The driver should call `custom_function(depsgraph)`, and the function should use that depsgraph instead of information from `bpy.context`. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D8047
2020-05-08Cleanup: take includes out of 'extern "C"' blocksJacques Lucke
Surrounding includes with an 'extern "C"' block is not necessary anymore. Also that made it harder to add any C++ code to some headers, or include headers that have "optional" C++ code like `MEM_guardedalloc.h`. I tested compilation on linux and windows (and got help from @LazyDodo). If this still breaks compilation due to some linker error, the header containing the symbol in question is probably missing an 'extern "C"' block. Differential Revision: https://developer.blender.org/D7653
2020-03-06Cleanup: Action: Move to IDTypeInfo, and remove unused BKE API.Dalai Felinto
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...
2019-12-17Fix T68665: FCurve group disappear on Curve/Surface object dataSybren A. Stüvel
When going from EDIT to OBJECT mode, Blender updates the object data from the edit-mode data. This took care of renaming FCurves that animate Curve control points when control points are added/removed, but this didn't keep the FCurve groups intact. Since the FCurve groups are tightly connected to the Action channels, it's hard to keep the group pointers intact during this process. Instead of making the code even more complex in an attempt to do that, I implemented a function (`BKE_action_groups_reconstruct()`) that rebuilds the group channel pointers. The call to `action_groups_add_channel()` had to be removed because it updates the the next/prev pointers of the FCurve while we're looping over them, causing infinite loops.
2019-11-29Refactor: Add C++ guard code to headersSergey Sharybin
C++ is used more and more, and it is becoming more and more annoying to keep track of whether header have C++ guard or not. Is easier and more clear to be consistent in all headers and have such guards in all headers.
2019-10-14Cleanup: Fix naming of a functionSergey Sharybin
2019-09-13Cleanup: clang-formatCampbell Barton
2019-07-18Fix T58447: Unselected bone used for constraint targetCampbell Barton
2019-04-18Fix T63332: backup and restore bPoseChannel_Runtime data during COW.Alexander Gavrilov
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-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-15Cleanup: commas at the end of enumsCampbell Barton
Without this clang-format may wrap them onto a single line.
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-14Merge branch 'master' into blender2.8Campbell Barton
2018-11-14Cleanup: comment block tabsCampbell Barton
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-07-31Fix T56170: Fake dependency cycle in new depsgraph + interleaved armature ↵Sergey Sharybin
update + proxy Make proxy copy result more atomic operation.
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-04Merge branch 'master' into blender2.8Sergey Sharybin
2018-05-04Cleanup: Remove G.main from framechange_poses_clear_unkeyed()Sergey 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-18Use macros for looping over pose bonesCampbell Barton
2018-04-17Removing Blender Game Engine from Blender 2.8Dalai Felinto
Folders removed entirely: * //extern/recastnavigation * //intern/decklink * //intern/moto * //source/blender/editors/space_logic * //source/blenderplayer * //source/gameengine This includes DNA data and any reference to the BGE code in Blender itself. We are bumping the subversion. Pending tasks: * Tile/clamp code in image editor draw code. * Viewport drawing code (so much of this will go away because of BI removal that we can wait until then to remove this.