feat: initial support for new scenes
This commit is contained in:
parent
5949e3c5cc
commit
8f95158f08
@ -281,13 +281,9 @@ class BlScene(BlDatablock):
|
||||
bl_icon = 'SCENE_DATA'
|
||||
bl_reload_parent = False
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.diff_method = DIFF_JSON
|
||||
|
||||
def _construct(self, data):
|
||||
instance = bpy.data.scenes.new(data["name"])
|
||||
instance.uuid = self.uuid
|
||||
return instance
|
||||
|
||||
def _load_implementation(self, data, target):
|
||||
|
@ -1025,8 +1025,15 @@ def depsgraph_evaluation(scene):
|
||||
logging.error(e)
|
||||
else:
|
||||
continue
|
||||
|
||||
|
||||
# A new scene is created
|
||||
elif isinstance(update.id, bpy.types.Scene):
|
||||
ref = session.get(reference=update.id)
|
||||
if ref:
|
||||
ref.resolve()
|
||||
else:
|
||||
scn_uuid = session.add(update.id)
|
||||
session.commit(scn_uuid)
|
||||
session.push(scn_uuid, check_data=False)
|
||||
def register():
|
||||
from bpy.utils import register_class
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user