Fix issue with converting to box UV via template

This commit is contained in:
JannisX11 2020-09-07 19:31:41 +02:00
parent 5cec293c90
commit 619078e714

View File

@ -158,7 +158,7 @@ const TextureGenerator = {
var res = options.resolution;
var background_color = options.color;
var texture = options.texture;
var min_size = Project.box_uv ? 0 : 1;
var min_size = (Project.box_uv || options.box_uv) ? 0 : 1;
var res_multiple = res / 16
var templates = [];
var doubles = {};
@ -172,7 +172,7 @@ const TextureGenerator = {
let obj = cubes[i]
if (obj.visibility === true) {
var template = new TextureGenerator.boxUVCubeTemplate(obj, min_size);
if (options.double_use && Project.box_uv && textures.length) {
if (options.double_use && (Project.box_uv || options.box_uv) && textures.length) {
var double_key = [...obj.uv_offset, ...obj.size(undefined, true), ].join('_')
if (doubles[double_key]) {
// improve chances that original is not mirrored