feat: started to handle dependency
This commit is contained in:
parent
8b23d2bc09
commit
08ce2d5cee
@ -211,7 +211,7 @@ def register():
|
|||||||
|
|
||||||
bpy.types.WindowManager.session = bpy.props.PointerProperty(
|
bpy.types.WindowManager.session = bpy.props.PointerProperty(
|
||||||
type=SessionProps)
|
type=SessionProps)
|
||||||
|
bpy.types.ID.uuid = bpy.props.StringProperty(default="")
|
||||||
bpy.context.window_manager.session.load()
|
bpy.context.window_manager.session.load()
|
||||||
save_session_config(bpy.context.window_manager.session,bpy.context)
|
save_session_config(bpy.context.window_manager.session,bpy.context)
|
||||||
operators.register()
|
operators.register()
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 69df1e1f4962151079fff5017038d7f9acd1afef
|
Subproject commit 212dca0825568427ef409a7a9236044ad6f7782b
|
20
operators.py
20
operators.py
@ -64,6 +64,23 @@ context = None
|
|||||||
# client_data[0][1]['active_objects'] = []
|
# client_data[0][1]['active_objects'] = []
|
||||||
# client.set(client_key, client_data[0][1])
|
# 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
|
# TODO: cleanup
|
||||||
def init_supported_datablocks(supported_types_id):
|
def init_supported_datablocks(supported_types_id):
|
||||||
global client
|
global client
|
||||||
@ -71,8 +88,7 @@ def init_supported_datablocks(supported_types_id):
|
|||||||
for type_id in supported_types_id:
|
for type_id in supported_types_id:
|
||||||
if hasattr(bpy.data,type_id):
|
if hasattr(bpy.data,type_id):
|
||||||
for item in getattr(bpy.data,type_id):
|
for item in getattr(bpy.data,type_id):
|
||||||
print(item)
|
add_datablock(item)
|
||||||
client.add(item)
|
|
||||||
|
|
||||||
|
|
||||||
# def default_tick():
|
# def default_tick():
|
||||||
|
1
ui.py
1
ui.py
@ -199,6 +199,7 @@ class SESSION_PT_outliner(bpy.types.Panel):
|
|||||||
# Property area
|
# Property area
|
||||||
# area_msg = row.box()
|
# area_msg = row.box()
|
||||||
client_keys = operators.client.list()
|
client_keys = operators.client.list()
|
||||||
|
client_keys = operators.client.list()
|
||||||
if client_keys and len(client_keys) > 0:
|
if client_keys and len(client_keys) > 0:
|
||||||
col = layout.column(align=True)
|
col = layout.column(align=True)
|
||||||
for item in sorted(client_keys, key=get_client_key):
|
for item in sorted(client_keys, key=get_client_key):
|
||||||
|
Loading…
Reference in New Issue
Block a user