Merge branch 'master' into ik

This commit is contained in:
JannisX11 2020-09-12 16:19:13 +02:00
commit 6e5f5c16c1

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