From 84b074baedd9d472ff2f52759b15f119de4f69c2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 21 Sep 2015 23:49:58 +1000 Subject: Armature drawing: custom shape scale options - Custom scale: Avoids having multiple custom-shapes at different sizes. - Option not to use bones length: So changes in edit-mode don't resize the custom-shape. --- source/blender/blenloader/intern/versioning_270.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 5518b1513f4..1f4aa3c9f3c 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -853,4 +853,19 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } #undef BRUSH_TORUS } + + if (!MAIN_VERSION_ATLEAST(main, 276, 2)) { + if (!DNA_struct_elem_find(fd->filesdna, "bPoseChannel", "float", "custom_scale")) { + Object *ob; + + for (ob = main->object.first; ob; ob = ob->id.next) { + if (ob->pose) { + bPoseChannel *pchan; + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { + pchan->custom_scale = 1.0f; + } + } + } + } + } } -- cgit v1.2.3