Merge branch 'main' into viseme-dev

This commit is contained in:
Yusarina
2024-07-22 22:25:12 +01:00
committed by GitHub
8 changed files with 109 additions and 9 deletions
+17
View File
@@ -0,0 +1,17 @@
import bpy
# Importers which don't need much code should be added here, however if a importer needs alot of code
# Like the PMX and PMD importers, they should be added to their own files.
# FBX Importer settings borrowed form Cat's Blender Plugin
def import_fbx(filepath):
try:
bpy.ops.import_scene.fbx(
filepath=filepath,
automatic_bone_orientation=False,
use_prepost_rot=False,
use_anim=False
)
except (TypeError, ValueError) as e:
print(f"Error importing FBX: {str(e)}")
+19 -5
View File
@@ -12,6 +12,8 @@ def register() -> None:
default=default_language,
update=update_language
)
bpy.types.Scene.avatar_toolkit_language_changed = bpy.props.BoolProperty(default=False)
bpy.types.Scene.mouth_a = bpy.props.StringProperty(
name=t("Scene.mouth_a.label"),
@@ -34,8 +36,20 @@ def register() -> None:
)
def unregister() -> None:
del bpy.types.Scene.avatar_toolkit_language
del bpy.types.Scene.mouth_a
del bpy.types.Scene.mouth_o
del bpy.types.Scene.mouth_ch
del bpy.types.Scene.shape_intensity
if hasattr(bpy.types.Scene, "avatar_toolkit_language"):
del bpy.types.Scene.avatar_toolkit_language
if hasattr(bpy.types.Scene, "avatar_toolkit_language_changed"):
del bpy.types.Scene.avatar_toolkit_language_changed
if hasattr(bpy.types.Scene, "mouth_a"):
del bpy.types.Scene.mouth_a
if hasattr(bpy.types.Scene, "mouth_o"):
del bpy.types.Scene.mouth_o
if hasattr(bpy.types.Scene, "mouth_ch"):
del bpy.types.Scene.mouth_ch
if hasattr(bpy.types.Scene, "shape_intensity"):
del bpy.types.Scene.shape_intensity
-1
View File
@@ -113,4 +113,3 @@ def toposort(deps_dict):
deps_dict = {value : deps_dict[value] - sorted_values for value in unsorted}
return sorted_list