More constraints bugfixes:

* Action constraints on some older files (namely mancandy) should now get correctly loaded. Wrong check for subversion number was being used
* Removed unneeded version patches
This commit is contained in:
Joshua Leung
2007-07-24 10:24:25 +00:00
parent 65f4cb14c1
commit c8273f4f9e

View File

@@ -6535,7 +6535,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
if (main->subversionfile < 3) {
if (main->versionfile != 244 || main->subversionfile < 3) {
for(ob = main->object.first; ob; ob= ob->id.next) {
ListBase *list;
list = &ob->constraints;
@@ -6551,15 +6551,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
switch (curcon->type) {
case CONSTRAINT_TYPE_ACTION:
{
bActionConstraint *data= (bActionConstraint *)curcon->data;
/* 'data->local' used to mean that target was in local-space */
if (data->local)
curcon->tarspace = CONSTRAINT_SPACE_LOCAL;
}
break;
case CONSTRAINT_TYPE_LOCLIMIT:
{
bLocLimitConstraint *data= (bLocLimitConstraint *)curcon->data;
@@ -6608,15 +6599,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
curcon->tarspace = CONSTRAINT_SPACE_LOCAL;
}
break;
case CONSTRAINT_TYPE_LOCLIMIT:
{
bLocLimitConstraint *data= (bLocLimitConstraint *)curcon->data;
/* old limit without parent option for objects */
if (data->flag2)
curcon->ownspace = CONSTRAINT_SPACE_LOCAL;
}
break;
case CONSTRAINT_TYPE_STRETCHTO:
{
bStretchToConstraint *data= (bStretchToConstraint *)curcon->data;