Armature speed ups, Part I

--------------------------

Major speed up for armatures during times when you aren't
posing a figure.

Background: the calculation of poses generated by actions and the
calculation of displists were getting somewhat out of sync.
This was being remedied by 'clearing the constraint done flag'
of the pose channels and recalculating the displists every time
the 3d view was redrawn, making life slow and unpleasant.
Commenting out the code that was doing this, then reinserting
the 'clearing the constraint done flag' at the right times
made things a bit more perky.
This commit is contained in:
Chris Want
2004-01-02 23:29:34 +00:00
parent 251c11cca1
commit a5a01ed549
8 changed files with 197 additions and 10 deletions

View File

@@ -774,3 +774,58 @@ bConstraintChannel *add_new_constraint_channel(const char* name)
void add_influence_key_to_constraint (bConstraint *con){
printf("doesn't do anything yet\n");
}
Object *get_con_target(bConstraint *constraint)
{
/*
* If the target for this constraint is target, return a pointer
* to the name for this constraints subtarget ... NULL otherwise
*/
switch (constraint->type) {
case CONSTRAINT_TYPE_ACTION:
{
bActionConstraint *data = constraint->data;
return data->tar;
}
break;
case CONSTRAINT_TYPE_LOCLIKE:
{
bLocateLikeConstraint *data = constraint->data;
return data->tar;
}
break;
case CONSTRAINT_TYPE_ROTLIKE:
{
bRotateLikeConstraint *data = constraint->data;
return data->tar;
}
break;
case CONSTRAINT_TYPE_KINEMATIC:
{
bKinematicConstraint *data = constraint->data;
return data->tar;
}
break;
case CONSTRAINT_TYPE_TRACKTO:
{
bTrackToConstraint *data = constraint->data;
return data->tar;
}
break;
case CONSTRAINT_TYPE_LOCKTRACK:
{
bLockTrackConstraint *data = constraint->data;
return data->tar;
}
break;
case CONSTRAINT_TYPE_FOLLOWPATH:
{
bFollowPathConstraint *data = constraint->data;
return data->tar;
}
break;
}
return NULL;
}