diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-01-23 23:12:20 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-01-29 18:47:24 +0300 |
commit | e7c90438e014f5c2f951ec965db20eea1bd783fa (patch) | |
tree | e3bf86b6d85e2b92da5aaab70a9703d960979a17 /source/blender/blenloader/intern | |
parent | 18c88eac171a814f94142d442494ea6f5eeeab02 (diff) |
Fix T73054: Add DNA defaults for pose_ik_segments
This fixes the crash with pose_ik_segments = 0 in old files.
Some files were saved with the property set to 0, so the versioning code
won't work in that cases. I also changed that to fix the crash in those
files.
Reviewed By: brecht
Maniphest Tasks: T73054
Differential Revision: https://developer.blender.org/D6663
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 6d4dd98729a..afe0d728934 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -4356,8 +4356,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } /* Pose brush IK segments. */ - if (!DNA_struct_elem_find(fd->filesdna, "Brush", "int", "pose_ik_segments")) { - for (Brush *br = bmain->brushes.first; br; br = br->id.next) { + for (Brush *br = bmain->brushes.first; br; br = br->id.next) { + if (br->pose_ik_segments == 0) { br->pose_ik_segments = 1; } } |