Update blender export scripts

This commit is contained in:
2025-01-28 12:39:38 +03:00
parent 6eedf347ba
commit 71b709726e
3 changed files with 139 additions and 41 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python
import os, time
import os, sys, time
import bpy
from math import pi
import glob
@@ -8,31 +8,8 @@ import shutil
from mathutils import Vector, Matrix
from math import radians, pi
class ExportMappingFemale:
blend_path = "assets/blender/" + "vrm-vroid-normal-female.blend"
gltf_path = "godot/character-data/vroid-normal-female.npc"
inner_path = "Object"
objs = ["female", "Body", "Hair", "Face"]
armature_name = "female"
outfile = "tmp-female.blend"
default_action = 'default'
def __init__(self):
self.files = []
for fobj in self.objs:
self.files.append({"name": fobj})
class ExportMappingMale:
blend_path = "assets/blender/" + "vrm-vroid-normal-male.blend"
gltf_path = "godot/character-data/vroid-normal-male.npc"
inner_path = "Object"
objs = ["male", "Body", "Hair", "Face"]
armature_name = "male"
outfile = "tmp-male.blend"
default_action = 'default'
def __init__(self):
self.files = []
for fobj in self.objs:
self.files.append({"name": fobj})
sys.path.insert(0, os.getcwd() + "/assets/blender/scripts")
from settings import ExportMappingFemale, ExportMappingMale
basepath = os.getcwd()
def check_bone(bname):