diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-10-15 18:19:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-10-15 18:19:11 +0400 |
commit | 4fa17b2eb4b26b5447d4ee05eb2060651c329145 (patch) | |
tree | 3e3d9cd53f799cc67189cb1a0e6927959a44b5eb /source/blender | |
parent | 565316909ec71c8f98b2fee150737ed2defe2902 (diff) |
pyconstraints doTarget function was getting an uninitialized matrix.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index b3f84e700f0..020350d9e6f 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -1690,14 +1690,14 @@ short get_constraint_target_matrix (bConstraint *con, short ownertype, void *own } /* if the script doesn't set the target matrix for any reason, fall back to standard methods */ - if (BPY_pyconstraint_targets(data, mat) < 1) { - if (data->tar) { - constraint_target_to_mat4(data->tar, data->subtarget, mat, CONSTRAINT_SPACE_WORLD, con->tarspace); + if (data->tar) { + constraint_target_to_mat4(data->tar, data->subtarget, mat, CONSTRAINT_SPACE_WORLD, con->tarspace); + if (BPY_pyconstraint_targets(data, mat) >= 1) { valid = 1; } - else - Mat4One(mat); } + if (!valid) + Mat4One(mat); } break; case CONSTRAINT_TYPE_CLAMPTO: |