feat: started to handle dependency
This commit is contained in:
+1
-1
@@ -211,7 +211,7 @@ def register():
|
||||
|
||||
bpy.types.WindowManager.session = bpy.props.PointerProperty(
|
||||
type=SessionProps)
|
||||
|
||||
bpy.types.ID.uuid = bpy.props.StringProperty(default="")
|
||||
bpy.context.window_manager.session.load()
|
||||
save_session_config(bpy.context.window_manager.session,bpy.context)
|
||||
operators.register()
|
||||
|
||||
+1
-1
Submodule libs/replication updated: 69df1e1f49...212dca0825
+18
-2
@@ -64,6 +64,23 @@ context = None
|
||||
# client_data[0][1]['active_objects'] = []
|
||||
# client.set(client_key, client_data[0][1])
|
||||
|
||||
def add_datablock(datablock):
|
||||
global client
|
||||
child=None
|
||||
|
||||
if hasattr(datablock,"data"):
|
||||
child = add_datablock(datablock.data)
|
||||
|
||||
if datablock.uuid and client.exist(datablock.uuid) :
|
||||
return datablock.uuid
|
||||
else:
|
||||
new_uuid = client.add(datablock,childs=child)
|
||||
datablock.uuid = new_uuid
|
||||
return new_uuid
|
||||
|
||||
|
||||
|
||||
|
||||
# TODO: cleanup
|
||||
def init_supported_datablocks(supported_types_id):
|
||||
global client
|
||||
@@ -71,8 +88,7 @@ def init_supported_datablocks(supported_types_id):
|
||||
for type_id in supported_types_id:
|
||||
if hasattr(bpy.data,type_id):
|
||||
for item in getattr(bpy.data,type_id):
|
||||
print(item)
|
||||
client.add(item)
|
||||
add_datablock(item)
|
||||
|
||||
|
||||
# def default_tick():
|
||||
|
||||
@@ -199,6 +199,7 @@ class SESSION_PT_outliner(bpy.types.Panel):
|
||||
# Property area
|
||||
# area_msg = row.box()
|
||||
client_keys = operators.client.list()
|
||||
client_keys = operators.client.list()
|
||||
if client_keys and len(client_keys) > 0:
|
||||
col = layout.column(align=True)
|
||||
for item in sorted(client_keys, key=get_client_key):
|
||||
|
||||
Reference in New Issue
Block a user