Blender import improvement
This commit is contained in:
@@ -8,7 +8,7 @@ import shutil
|
||||
from mathutils import Vector, Matrix
|
||||
from math import radians, pi
|
||||
|
||||
sys.path.insert(0, os.getcwd() + "/assets/blender/scripts")
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
from settings import ExportMappingFemale, ExportMappingMale, ExportMappingMaleBabyShape, ExportMappingMaleEdited
|
||||
|
||||
basepath = os.getcwd()
|
||||
@@ -181,8 +181,9 @@ def extra_linear(angle, offset):
|
||||
|
||||
for mapping in [ExportMappingFemale(), ExportMappingMale(), ExportMappingMaleBabyShape(), ExportMappingMaleEdited()]:
|
||||
if not os.path.exists(mapping.blend_path):
|
||||
print("Skipping mapping: " + mapping.blend_path)
|
||||
continue
|
||||
#for mapping in [ExportMappingFemale()]:
|
||||
print("Processing mapping: from: " + mapping.blend_path + " to: " + mapping.gltf_path)
|
||||
print("Initializing...")
|
||||
bpy.ops.wm.read_homefile(use_empty=True)
|
||||
print("Preparing driver setup...")
|
||||
@@ -258,6 +259,7 @@ for mapping in [ExportMappingFemale(), ExportMappingMale(), ExportMappingMaleBab
|
||||
export_morph_tangent=True,
|
||||
export_lights=False,
|
||||
export_skins=True)
|
||||
print("exported to: " + mapping.gltf_path)
|
||||
|
||||
bpy.ops.wm.read_homefile(use_empty=True)
|
||||
time.sleep(2)
|
||||
|
||||
@@ -7,11 +7,12 @@ import glob
|
||||
import shutil
|
||||
from mathutils import Vector, Matrix
|
||||
from math import radians, pi
|
||||
|
||||
if bpy.app.version[0] == 3:
|
||||
sys.path.insert(0, os.getcwd() + "/assets/blender/scripts/mixamo/3.6")
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/mixamo/3.6")
|
||||
if bpy.app.version[0] == 4:
|
||||
sys.path.insert(0, os.getcwd() + "/assets/blender/scripts/mixamo/4.3")
|
||||
sys.path.insert(0, os.getcwd() + "/assets/blender/scripts")
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/mixamo/4.3")
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
from vrm import rename
|
||||
if bpy.app.version[0] == 3:
|
||||
from mixamo import mixamo_rig
|
||||
|
||||
Reference in New Issue
Block a user