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
This commit is contained in:
Dalai Felinto 2014-05-22 13:38:51 -03:00
parent a8a5d68bb5
commit 2bfc3debd9
Notes: blender-bot 2023-02-14 10:40:05 +01:00
Referenced by commit 7f089afc8b, Bake-API: relaxing in the check for scale uniformity
Referenced by issue #40156, Cycles Baking and applyRotation issues
1 changed files with 8 additions and 2 deletions

View File

@ -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 {