Minor modifications to simplify the code in evaluate_constraint.

The "Stick" feature will need more work as it gives bad results when skipping frames, jumping around on the timeline and when going backward in time.

Suggestion: Would be nice if it could use the local space too, not just global space planes.
This commit is contained in:
2005-09-07 00:11:39 +00:00
parent c1155c6a4d
commit 1dba65e296
7 changed files with 215 additions and 1 deletions

View File

@@ -260,6 +260,12 @@ char *get_con_subtarget_name(bConstraint *con, Object *target)
if (data->tar==target) return data->subtarget;
}
break;
case CONSTRAINT_TYPE_MINMAX:
{
bMinMaxConstraint *data = con->data;
if (data->tar==target) return data->subtarget;
}
break;
case CONSTRAINT_TYPE_LOCKTRACK:
{
bLockTrackConstraint *data = con->data;
@@ -368,6 +374,24 @@ static void test_constraints (Object *owner, const char* substring)
break;
}
if ( (data->tar == owner) &&
(!get_named_bone(get_armature(owner),
data->subtarget))) {
curcon->flag |= CONSTRAINT_DISABLE;
break;
}
}
break;
case CONSTRAINT_TYPE_MINMAX:
{
bMinMaxConstraint *data = curcon->data;
if (!exist_object(data->tar)){
data->tar = NULL;
curcon->flag |= CONSTRAINT_DISABLE;
break;
}
if ( (data->tar == owner) &&
(!get_named_bone(get_armature(owner),
data->subtarget))) {