diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2014-05-22 20:38:51 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2014-05-22 22:05:02 +0400 |
commit | 2bfc3debd90ac0176e62de37d7aeea1a5316e658 (patch) | |
tree | f6a3f439189d6cf3822229cd2c403896febc0748 /source/blender/editors/object/object_bake_api.c | |
parent | a8a5d68bb548dae30a1790169ba8d8a09fe811ea (diff) |
Bake-API: throws error if highpoly object(s) doesn't have uniform scale (fix T40156)
The real fix would be to support non-uniform scaled highpoly objects.
For more information see 8d29739
Diffstat (limited to 'source/blender/editors/object/object_bake_api.c')
-rw-r--r-- | source/blender/editors/object/object_bake_api.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 88e41ead329..57e29b1b992 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -508,13 +508,19 @@ static int bake( if (ob_iter == ob_low) continue; + if (ob_iter->size[0] != ob_iter->size[1] || ob_iter->size[1] != ob_iter->size[2]) { + BKE_reportf(reports, RPT_ERROR, + "Selected objects need to have uniform scale. Apply Scale to object \"%s\"", + ob_iter->id.name + 2); + goto cleanup; + } + + tot_highpoly ++; } if (tot_highpoly == 0) { BKE_report(reports, RPT_ERROR, "No valid selected objects"); - op_result = OPERATOR_CANCELLED; - goto cleanup; } else { |