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
2021-09-10Anim: Keylist drawing optimization by using arrays.Jeroen Bakker
Change data structure of keylists. Reducing the balancing overhead and therefore increases performance. | **Function** | **Master** | **Patch** | |`draw_summary_channel`| 0.202105s| 0.083874s | When adding items to the keylist it will store it in a linked list. This linked list is accompanied with the length (key_len) and a `last_accessed_column`. last_accessed_column is a cursor that improve the performance when adding new items as they are mostly ordered by frame numbers. last_accessed_column is reset when a new fcurve/mask/... is added to the keylist. Before searching or array access. the listbase needs to be converted to an array. `ED_keylist_prepare_for_direct_access`. After that the caller can use `ED_keylist_find_*` or `ED_keylist_array*` functions. The internal array can also be accessed via the `ED_keylist_listbase` function. The items inside the array link to the previous/next item in the list. Reviewed By: sybren Differential Revision: https://developer.blender.org/D12052
2021-09-04RNA: support extracting names from paths without allocating memoryCampbell Barton
Support extracting identifiers RNA paths into fixed size buffer since the maximum size of the identifier is known all cases. - Add BLI_str_unescape_ex to support limiting the destination buffer. - Add BLI_str_quoted_substr to copy values into a fixed size buffer.
2021-09-01Cleanup: remove redundant strstr callsCampbell Barton
Rely on BLI_str_quoted_substrN to detect if the prefix exists since this function exists early there is no need to check before calling.
2021-08-25Cleanup: skip saving selection properties set in the keymapCampbell Barton
Having settings such as "extend" saved between executions causes keymaps that don't include this setting to remember the value between execution. No longer store this setting for selection operations & remove redundant values from the key-maps, see: T90275.
2021-08-09Cleanup/fixes in UI messages.Bastien Montagne
2021-08-06Cleanup: rename `FileList::asset_library` → `asset_library_ref`Sybren A. Stüvel
In the `FileList` struct, rename the `AssetLibraryReference *asset_library` field to `asset_library_ref` -- it's a description of which asset library is used, and not the asset library itself. This is to make space for a future `AssetLibrary *asset_library` field, which will point to an actual asset library struct/class. No functional changes. Reviewed by: Severin Differential Revision: https://developer.blender.org/D12151
2021-08-06Cleanup: use const result in `ED_keyframes_find_*` functions.Jeroen Bakker
2021-08-06Cleanup: use MEM_SAFE_FREE macroCampbell Barton
2021-08-05Cleanup: remove redundant parenthesisCampbell Barton
2021-08-03Cleanup: Hide implementation details for ED_keyframe_keylist.Jeroen Bakker
For T78995 we want to change the data structure of keylists to improve performance. (Probably a Vector with bin-search capabilities). This patch hides the internal structure of the keylists behind `AnimKeylist` structure. This allows us to change the internals without 'breaking' where it is being used. The change adds functions to create, free, find and walk over the keylist. Reviewed By: sybren Maniphest Tasks: T78995 Differential Revision: https://developer.blender.org/D11974
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-27Cleanup: comment spelling & punctuationYimingWu
2021-07-26Fix: Instantly hide bones after hitting H key in pose slidingChristoph Lendenfeld
When using a pose slider it is possible to hide bones with the 'H' key. Before this patch the screen didn't update, so you had to move the mouse 1 pixel to update. This patch makes it so it updates right away Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D12024 Ref: D12024
2021-07-26Cleanup: clang tidyJacques Lucke
2021-07-24Fix: Remove automatic hiding of bones when using the pose sliderChristoph Lendenfeld
This patch addresses the issue raised in T88340. When entering a pose sliding operator bones would automatically get hidden. While technically not a bug it was decided that it is too confusing. Hiding with 'H' is still possible though, just won't happen automatically Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D11883 Ref: D11883
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-23Animation: Generic Slider implementationChristoph Lendenfeld
Extract the slider gui implemented for the pose slide tools. Generalise it so it can be used by other tools as well. Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D9314 Ref: D9314
2021-07-21Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
2021-07-20Cleanup: Getters for asset-handle dataJulian Eisel
While the asset-handle design is supposed to be temporary (see 35affaa971cf), I prefer keeping the fact that it's nothing but a file entry pointer an implementation detail that is abstracted away. So this introduces getters for the file data we typically access for asset-handles.
2021-07-20Pose Library: remove assumption about Action group namesSybren A. Stüvel
Remove the assumption of the pose library that Action groups are named after the bones in the armature. Even though this assumption is correct when the keys are created by Blender, action groups can be renamed. Keys created by Python scripts can also use arbitrary group names. Since there is more code in Blender making this assumption, and looping over selected bones is also a common occurrence, this commit contains some generic functionality to aid in this: - `BKE_armature_find_selected_bones`: function that iterates over all bones in an armature and calls a callback for each selected one. It returns a struct with info about the selection states (all or no bones selected). - `BKE_armature_find_selected_bone_names(armature)` uses the above function to return a set of selected bone names. - `BKE_pose_find_fcurves_with_bones()` calls a callback for each FCurve in an Action that targets a bone, also passing it the bone name.
2021-07-20Pose backup: convert from C to C++Sybren A. Stüvel
Convert `pose_backup.c` (in C) to `pose_backup.cc` (in C++). This will make future improvements easier. For now, it's the same code with just some additional explicit casts (C++ doesn't allow implicitly casting `void *`), `NULL` changed into `nullptr`, and some other simple changes. No functional changes.
2021-07-20Cleanup: Clang formatAaron Carlisle
2021-07-19Cleanup: Separate keyframes_draw and keyframes_keylist.Jeroen Bakker
The keylist functions are used in other places for none drawing related stuff. Fe pose_slide uses it.
2021-07-15Animation: new pose library based on Asset BrowserSybren A. Stüvel
Introduce new pose library, based on the Asset Browser. Contrary to the old pose library (in `editors/armature/pose_lib.c`), which stored an entire library of poses in an `Action`, in the new library each pose is its own `Action` datablock. This is done for compatibility with the asset browser, and also to make it easier to attach preview images, share datablocks, etc. Furthermore, it opens the door to having animation snippets in the pose library as well. This commit contains the C code for the pose library; in order to fully use it, an addon is required as well (which will be committed shortly).
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-13Refactor: Move vertex group names to object dataHans Goudey
This commit moves the storage of `bDeformGroup` and the active index to `Mesh`, `Lattice`, and `bGPdata` instead of `Object`. Utility functions are added to allow easy access to the vertex groups given an object or an ID. As explained in T88951, the list of vertex group names is currently stored separately per object, even though vertex group data is stored on the geometry. This tends to complicate code and cause bugs, especially as geometry is created procedurally and tied less closely to an object. The "Copy Vertex Groups to Linked" operator is removed, since they are stored on the geometry anyway. This patch leaves the object-level python API for vertex groups in place. Creating a geometry-level RNA API can be a separate step; the changes in this commit are invasive enough as it is. Note that opening a file saved in 3.0 in an earlier version means the vertex groups will not be available. Differential Revision: https://developer.blender.org/D11689
2021-07-13Undo: optimize edit-mode undoCampbell Barton
- Tag the object data instead of the object when decoding (this avoids duplicating mesh object-data on each undo-step). - Calculate face normals as part of multi-threaded tessellation. This gives ~11% speedup with 1.5x million polygons.
2021-07-05Cleanup: spelling in commentsCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-02Constraints: support a new Local Space (Owner Orientation) for targets.Alexander Gavrilov
Add a new transformation space choice for bone constraints, which represent the local transformation of the target bone in the constraint owner's local space. The use case for this is transferring the local (i.e. excluding the effect of parents) motion of one bone to another one, while ignoring the difference between their rest pose orientations. The new option replaces the following setup: * A `child` bone of the `target`, rotated the same as `owner` in rest pose. * A `sibling` bone of the `target`, positioned same as `child` in rest pose and using Copy Transforms in World Space from `child`. * The `owner` bone constraint uses Local Space of `sibling`. (This analogy applies provided both bones use Local Location) Differential Revision: https://developer.blender.org/D9493
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-18Armature: add B-Bone Y scale channel and extra flag fields to DNA.Alexander Gavrilov
In addition to the base bone transformation itself, B-Bones have controls that affect transformation of its segments. For rotation the features are quite complete, allowing to both reorient the Bezier handles via properties, and to control them using custom handle bones. However for scaling there are two deficiencies. First, there are only X and Y scale factors (actually X and Z), while lengthwise all segments have the same scaling. The ease option merely affects the shape of the curve, and does not cause actual scaling. Second, scaling can only be controlled via properties, thus requiring up to 6 drivers per joint between B-Bones to transfer scaling factors from the handle bone. This is very inefficient. Finally, the Z channels are confusingly called Y. This commit adds a B-Bone Y Scale channel and extra B-Bone flag fields to DNA with appropriate versioning (including for F-Curves and drivers) in preparation to addressing these limitations. Functionality is not changed, so the new fields are not used until the following commits. Differential Revision: https://developer.blender.org/D9870
2021-06-13Cleanup: remove redundant NULL check, reduce scopeCampbell Barton
2021-06-11Cleanup: use sentences for pose slide commentsCampbell Barton
2021-06-11Cleanup: pose slider rename region to region_headerChristoph Lendenfeld
Reviewed By: sybren, campbellbarton Ref D11365
2021-06-11Cleanup: pose slider use enum typesChristoph Lendenfeld
use enum types in `tPoseSlideOp` instead of `short` Reviewed By: sybren, campbellbarton Ref D11364
2021-06-11Cleanup: pose slider use strncpyChristoph Lendenfeld
use `STRNCPY` instead of `BLI_strncpy` Reviewed By: sybren, campbellbarton Ref D11363
2021-06-11Cleanup: pose slider data typesChristoph Lendenfeld
- change vec2f to float[2] - pass rctf as pointer - change `const struct rctf` to `const rctf`
2021-06-11Cleanup: pose slider rename "percentage" to "factor"Christoph Lendenfeld
This patch changes occurrences of percentage to factor. There are some usages of percentage left in there on purpose. They are distinguished as follows: - factor is 0-1 float - percentage is 0-100 int Ref D11361 Reviewed by: sybren, campbellbarton
2021-06-10Fix T88546: Pose slider typed input not workingChristoph Lendenfeld
Remove an unnecessary call to pose_slide_mouse_update_percentage That call was overriding the typed value Reviewed By: #animation_rigging, Sybren A. Stüvel Differential Revision: https://developer.blender.org/D11395 Ref D11395
2021-05-17Cleanup: remove commented code, use function to access header regionCampbell Barton
2021-05-17Cleanup: clang-formatCampbell Barton
2021-05-14Cleanup: sort include dirs in CMakeLists.txtSybren A. Stüvel
Sort include dirs in just one file, not a big change (`source/blender/editors/armature/CMakeLists.txt`). No functional changes.
2021-05-14Animation: Pose sliding tools improvementsChristoph Lendenfeld
Improve the "In Betweens" tools: - Push Pose from Rest Pose - Relax Pose to Rest Pose - Push Pose from Breakdown - Relax Pose to Breakdown - Pose Breakdowner These all now use the same new sliding tool: - Actual visual indication of the blending/pushing percentage applied. - Mouse wrapping to allow for extrapolation without having to worry about the initial placement of the mouse. This also means these tools are actually usable when chosen from the menu. - Precision mode by holding {key Shift}. - Snapping to 10% increments by holding {key Ctrl}. - Overshoot protection; by default the tool doesn't allow overshoot (lower than 0% or higher than 100%), and it can be enabled by pressing {key E}. - Bones are hidden while sliding, so the pose itself can be seen more clearly. This can be toggled by pressing {key H} while using the tool. Reviewed By: #animation_rigging, zeddb, sybren, #user_interface, brecht, Severin, looch Maniphest Tasks: T81836 Differential Revision: https://developer.blender.org/D9054
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-04-12UI: Use Consistent name for select mirrorAaron Carlisle
This commit cleans up the RNA names of select mirror operators so that they are all "Select mirror". This makes the select menu in edit/pose mode consistent regardless of object type. Differential Revision: https://developer.blender.org/D7356