Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2008-09-19 16:43:21 +0400
committerJoshua Leung <aligorith@gmail.com>2008-09-19 16:43:21 +0400
commit6f9a254d61d037a624bd631b2c12bbacd2e7c67c (patch)
tree512eade29911e9f5a65931a7990bbd206c1ff24d
parentef8a1dccc726f6212e23b1c1978c2e0a2baf5a47 (diff)
PyConstraints:
Basic (non-python) target evaluation still occurs when scriptlinks are disabled.
-rw-r--r--source/blender/blenkernel/intern/constraint.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index efb03b71438..99cf58e8e5a 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -1872,7 +1872,7 @@ static void pycon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintT
{
bPythonConstraint *data= con->data;
- if ((G.f & G_DOSCRIPTLINKS) && VALID_CONS_TARGET(ct)) {
+ if (VALID_CONS_TARGET(ct)) {
/* special exception for curves - depsgraph issues */
if (ct->tar->type == OB_CURVE) {
Curve *cu= ct->tar->data;
@@ -1886,7 +1886,10 @@ static void pycon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintT
* this matrix if it needs to do so
*/
constraint_target_to_mat4(ct->tar, ct->subtarget, ct->matrix, CONSTRAINT_SPACE_WORLD, ct->space, con->headtail);
- BPY_pyconstraint_target(data, ct);
+
+ /* only execute target calculation if allowed */
+ if (G.f & G_DOSCRIPTLINKS)
+ BPY_pyconstraint_target(data, ct);
}
else if (ct)
Mat4One(ct->matrix);
@@ -1896,6 +1899,7 @@ static void pycon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targ
{
bPythonConstraint *data= con->data;
+ /* only evaluate in python if we're allowed to do so */
if ((G.f & G_DOSCRIPTLINKS)==0) return;
/* currently removed, until I this can be re-implemented for multiple targets */