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:
authorCampbell Barton <ideasman42@gmail.com>2012-04-12 15:50:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-12 15:50:43 +0400
commit405c9d9a95d2298813fbc44c2a119c195931cebe (patch)
tree1be0da28e43553bf82a332a207ccff5e4acc5f0a /source/blender/blenloader
parent7db13b989a2ca49252eeaffeb1cfc9fe61bb03e5 (diff)
code cleanup: remove unused KeyBlock.adrcode
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c58
1 files changed, 12 insertions, 46 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 7c5438997bb..60f4f3c0f31 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6612,31 +6612,6 @@ static void ntree_version_242(bNodeTree *ntree)
}
-
-/* somehow, probably importing via python, keyblock adrcodes are not in order */
-static void sort_shape_fix(Main *main)
-{
- Key *key;
- KeyBlock *kb;
- int sorted= 0;
-
- while (sorted==0) {
- sorted= 1;
- for (key= main->key.first; key; key= key->id.next) {
- for (kb= key->block.first; kb; kb= kb->next) {
- if (kb->next && kb->adrcode>kb->next->adrcode) {
- KeyBlock *next= kb->next;
- BLI_remlink(&key->block, kb);
- BLI_insertlink(&key->block, next, kb);
- kb= next;
- sorted= 0;
- }
- }
- }
- if (sorted==0) printf("warning, shape keys were sorted incorrect, fixed it!\n");
- }
-}
-
static void customdata_version_242(Mesh *me)
{
CustomDataLayer *layer;
@@ -9288,24 +9263,18 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for (key= main->key.first; key; key= key->id.next) {
KeyBlock *kb;
- int index= 1;
-
- /* trick to find out if we already introduced adrcode */
- for (kb= key->block.first; kb; kb= kb->next)
- if (kb->adrcode) break;
-
- if (kb==NULL) {
- for (kb= key->block.first; kb; kb= kb->next) {
- if (kb==key->refkey) {
- if (kb->name[0]==0)
- strcpy(kb->name, "Basis");
- }
- else {
- if (kb->name[0]==0) {
- BLI_snprintf(kb->name, sizeof(kb->name), "Key %d", index);
- }
- kb->adrcode= index++;
+ int index = 1;
+
+ for (kb= key->block.first; kb; kb= kb->next) {
+ if (kb==key->refkey) {
+ if (kb->name[0]==0)
+ strcpy(kb->name, "Basis");
+ }
+ else {
+ if (kb->name[0]==0) {
+ BLI_snprintf(kb->name, sizeof(kb->name), "Key %d", index);
}
+ index++;
}
}
}
@@ -9660,10 +9629,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for (group= main->group.first; group; group= group->id.next)
if (group->layer==0)
group->layer= (1<<20)-1;
-
- /* History fix (python?), shape key adrcode numbers have to be sorted */
- sort_shape_fix(main);
-
+
/* now, subversion control! */
if (main->subversionfile < 3) {
Image *ima;