diff options
author | Joshua Leung <aligorith@gmail.com> | 2013-11-05 05:44:38 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2013-11-05 05:44:38 +0400 |
commit | 7a10bacaf9261d39e6bd1f244e4b8fc1eb99d8ea (patch) | |
tree | 6990a6415e0d1d1bef86a22e8422213c1c8b01ad | |
parent | 98be88653d43ee04990f7ee7413b7475aef0eea2 (diff) |
Bugfix [#36203] Transformation bone constraint breaks Track To / Dumped Track
Limited crazy-space constraint correction for Transform constraint to only get
applied when only rotating bones with such constraints.
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index ce346c7952d..cfc78a0e0ef 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -4715,13 +4715,12 @@ static bool constraints_list_needinv(TransInfo *t, ListBase *list) if ((con->flag & CONSTRAINT_DISABLE) == 0 && (con->enforce != 0.0f)) { /* (affirmative) returns for specific constraints here... */ /* constraints that require this regardless */ - if (ELEM6(con->type, + if (ELEM5(con->type, CONSTRAINT_TYPE_CHILDOF, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO, CONSTRAINT_TYPE_OBJECTSOLVER, - CONSTRAINT_TYPE_FOLLOWTRACK, - CONSTRAINT_TYPE_TRANSFORM)) + CONSTRAINT_TYPE_FOLLOWTRACK)) { return true; } @@ -4734,6 +4733,15 @@ static bool constraints_list_needinv(TransInfo *t, ListBase *list) if ((data->flag & ROTLIKE_OFFSET) && (t->mode == TFM_ROTATION)) return true; } + else if (con->type == CONSTRAINT_TYPE_TRANSFORM) { + /* Transform constraint needs it for rotation at least (r.57309), + * but doing so when translating may also mess things up [#36203] + */ + + if (t->mode == TFM_ROTATION) + return true; + /* ??? (t->mode == TFM_SCALE) ? */ + } } } } |