diff options
author | Chris Want <cwant@ualberta.ca> | 2004-01-03 02:29:34 +0300 |
---|---|---|
committer | Chris Want <cwant@ualberta.ca> | 2004-01-03 02:29:34 +0300 |
commit | a5a01ed549b837596790a917d11983e93f381c1b (patch) | |
tree | 968eac00a3e5268faaa770c4613604883cface6a /source/blender/src/editconstraint.c | |
parent | 251c11cca15cc1ae2736546167edd47bd30a2485 (diff) |
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.
Diffstat (limited to 'source/blender/src/editconstraint.c')
-rw-r--r-- | source/blender/src/editconstraint.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/source/blender/src/editconstraint.c b/source/blender/src/editconstraint.c index 999a4d5f444..702e6a82573 100644 --- a/source/blender/src/editconstraint.c +++ b/source/blender/src/editconstraint.c @@ -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; +} |