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
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2020-12-11 19:17:39 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2021-06-18 18:56:03 +0300
commit682a74e0909ba4e669a3f282b3bc5da0ae81e4da (patch)
tree85aecf8652ddc680973a8cf9eed3a5b60b8a36d7 /source/blender/blenloader/intern/versioning_270.c
parentaee04d496035c2b11b640a91b2e7eca86e878cf2 (diff)
Armature: add B-Bone Y scale channel and extra flag fields to DNA.
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
Diffstat (limited to 'source/blender/blenloader/intern/versioning_270.c')
-rw-r--r--source/blender/blenloader/intern/versioning_270.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 289092f7f19..776f6c54363 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -263,8 +263,8 @@ static void do_version_action_editor_properties_region(ListBase *regionbase)
static void do_version_bones_super_bbone(ListBase *lb)
{
LISTBASE_FOREACH (Bone *, bone, lb) {
- bone->scale_in_x = bone->scale_in_y = 1.0f;
- bone->scale_out_x = bone->scale_out_y = 1.0f;
+ bone->scale_in_x = bone->scale_in_z = 1.0f;
+ bone->scale_out_x = bone->scale_out_z = 1.0f;
do_version_bones_super_bbone(&bone->childbase);
}
@@ -1268,8 +1268,8 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (ob->pose) {
LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
/* see do_version_bones_super_bbone()... */
- pchan->scale_in_x = pchan->scale_in_y = 1.0f;
- pchan->scale_out_x = pchan->scale_out_y = 1.0f;
+ pchan->scale_in_x = pchan->scale_in_z = 1.0f;
+ pchan->scale_out_x = pchan->scale_out_z = 1.0f;
/* also make sure some legacy (unused for over a decade) flags are unset,
* so that we can reuse them for stuff that matters now...