feat: reset scene
This commit is contained in:
@@ -70,6 +70,6 @@ class AvatarMainOutput(blender_node.ObjectOps):
|
||||
)
|
||||
|
||||
import global_bpy
|
||||
global_bpy.reset_bpy()
|
||||
global_bpy.set_should_reset_scene(True)
|
||||
|
||||
return {"ui": {"gltfFilename": {filepath.replace(f"{self.output_dir}/", "")}, "SHAPE_FLOW": {SHAPE_FLOW}, "auto_save": {'true' if auto_save else 'false'},}}
|
||||
|
||||
+11
-1
@@ -1,9 +1,19 @@
|
||||
import bpy
|
||||
|
||||
global_bpy = bpy
|
||||
should_reset_scene = True
|
||||
|
||||
|
||||
def set_should_reset_scene(value):
|
||||
global should_reset_scene
|
||||
should_reset_scene = value
|
||||
|
||||
|
||||
def get_bpy():
|
||||
global global_bpy
|
||||
global global_bpy, should_reset_scene
|
||||
if should_reset_scene:
|
||||
reset_bpy()
|
||||
should_reset_scene = False
|
||||
return global_bpy
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user