diff options
author | Yuki Shirakawa <shirakawa> | 2021-05-11 12:22:41 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-05-11 12:31:58 +0300 |
commit | fc5bf09fd88c331b568c5b485bb0e487179ecb44 (patch) | |
tree | 1fb6e32ec8ad3699dca241c9224b4fe69f67135c /source/blender/blenloader | |
parent | a02be602f9cb1e5c5e38de5b1553829b9aa58b56 (diff) |
Rigging: Add transform for custom bone shapes
Add translation/rotation/scale parameters for custom bones shapes. The
new scale is a 3D vector `custom_shape_scale_xyz`, and replaces the
`custom_shape_scale` float.
Reviewed By: #animation_rigging, sybren, zeddb
Differential Revision: https://developer.blender.org/D10974
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 182231b5878..ae2371402e4 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -21,6 +21,7 @@ #define DNA_DEPRECATED_ALLOW #include "BLI_listbase.h" +#include "BLI_math_vector.h" #include "BLI_utildefines.h" #include "DNA_brush_types.h" @@ -95,5 +96,15 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) */ { /* Keep this block, even when empty. */ + if (!DNA_struct_elem_find(fd->filesdna, "bPoseChannel", "float", "custom_scale_xyz[3]")) { + LISTBASE_FOREACH (Object *, ob, &bmain->objects) { + if (ob->pose == NULL) { + continue; + } + LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) { + copy_v3_fl(pchan->custom_scale_xyz, pchan->custom_scale); + } + } + } } } |