from .arm.utils import get_sdk_path, krom_paths
This commit is contained in:
parent
ae643ac5b2
commit
117c5358ea
|
@ -2,13 +2,16 @@ import os
|
|||
import shutil
|
||||
import subprocess
|
||||
|
||||
from .arm import assets
|
||||
from .arm.utils import get_sdk_path, krom_paths
|
||||
|
||||
def export_sdf():
|
||||
# if hasattr(bobject.data, 'arm_sdfgen') and bobject.data.arm_sdfgen:
|
||||
# o['sdf_ref'] = 'sdf_' + oid
|
||||
|
||||
if hasattr(bobject.data, 'arm_sdfgen') and bobject.data.arm_sdfgen:
|
||||
# Copy input
|
||||
sdk_path = arm.utils.get_sdk_path()
|
||||
sdk_path = get_sdk_path()
|
||||
sdfgen_path = sdk_path + '/armory/tools/sdfgen'
|
||||
shutil.copy(fp, sdfgen_path + '/krom/mesh.arm')
|
||||
# Extract basecolor
|
||||
|
@ -21,7 +24,7 @@ def export_sdf():
|
|||
# fp_img = bpy.path.abspath(img.filepath)
|
||||
# shutil.copy(fp_img, sdfgen_path + '/krom/mesh.png')
|
||||
# Run
|
||||
krom_location, krom_path = arm.utils.krom_paths()
|
||||
krom_location, krom_path = krom_paths()
|
||||
krom_dir = sdfgen_path + '/krom'
|
||||
krom_res = sdfgen_path + '/krom'
|
||||
subprocess.check_output([krom_path, krom_dir, krom_res, '--nosound', '--nowindow'])
|
||||
|
|
Loading…
Reference in a new issue