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

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 {