forked from LeenkxTeam/LNXSDK
Patch_2
This commit is contained in:
@ -16,11 +16,13 @@
|
||||
#
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
from typing import Any, Dict, Optional, Tuple
|
||||
|
||||
import bpy
|
||||
import os
|
||||
|
||||
import lnx.assets
|
||||
import lnx.assets as assets
|
||||
import lnx.log as log
|
||||
import lnx.make_state
|
||||
import lnx.material.cycles_functions as c_functions
|
||||
@ -1003,7 +1005,12 @@ def make_texture(
|
||||
wrd = bpy.data.worlds['Lnx']
|
||||
max_size = int(wrd.lnx_max_texture_size)
|
||||
if max_size > 0 and image is not None:
|
||||
original_filepath = filepath
|
||||
filepath = resize_texture_if_needed(image, filepath, max_size)
|
||||
|
||||
if filepath != original_filepath:
|
||||
resized_filename = lnx.utils.extract_filename(filepath)
|
||||
tex['file'] = lnx.utils.safestr(resized_filename)
|
||||
|
||||
# Link image path to assets
|
||||
# TODO: Khamake converts .PNG to .jpg? Convert ext to lowercase on windows
|
||||
|
||||
Reference in New Issue
Block a user