fix(rcf): panel regisration
This commit is contained in:
@ -27,7 +27,8 @@ def register():
|
|||||||
net_ecs.register()
|
net_ecs.register()
|
||||||
|
|
||||||
def unregister():
|
def unregister():
|
||||||
bsyncio.unregister()
|
|
||||||
net_ui.unregister()
|
net_ui.unregister()
|
||||||
net_operators.unregister()
|
net_operators.unregister()
|
||||||
net_ecs.unregister()
|
net_ecs.unregister()
|
||||||
|
bsyncio.unregister()
|
||||||
|
|
@ -460,7 +460,6 @@ def mesh_tick():
|
|||||||
|
|
||||||
|
|
||||||
def object_tick():
|
def object_tick():
|
||||||
|
|
||||||
obj = get_update("Object")
|
obj = get_update("Object")
|
||||||
|
|
||||||
if obj:
|
if obj:
|
||||||
@ -541,7 +540,6 @@ class session_join(bpy.types.Operator):
|
|||||||
drawer = net_draw.HUD(client_instance=client)
|
drawer = net_draw.HUD(client_instance=client)
|
||||||
|
|
||||||
register_ticks()
|
register_ticks()
|
||||||
# bpy.ops.session.draw('INVOKE_DEFAULT')
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
@ -727,7 +725,6 @@ classes = (
|
|||||||
session_create,
|
session_create,
|
||||||
session_settings,
|
session_settings,
|
||||||
session_remove_property,
|
session_remove_property,
|
||||||
session_draw_clients,
|
|
||||||
session_snapview,
|
session_snapview,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -742,16 +739,17 @@ def depsgraph_update(scene):
|
|||||||
if client.status == net_components.RCFStatus.CONNECTED:
|
if client.status == net_components.RCFStatus.CONNECTED:
|
||||||
if scene.session_settings.active_object:
|
if scene.session_settings.active_object:
|
||||||
if c[1].is_updated_geometry:
|
if c[1].is_updated_geometry:
|
||||||
print('geometry')
|
print('geometry {}'.format(c[1].id.name))
|
||||||
if c[1].id.name == scene.session_settings.active_object.name:
|
if c[1].id.name == scene.session_settings.active_object.name:
|
||||||
add_update(c[1].id.bl_rna.name, c[1].id.name)
|
add_update(c[1].id.bl_rna.name, c[1].id.name)
|
||||||
elif c[1].is_updated_transform:
|
elif c[1].is_updated_transform:
|
||||||
print('transform')
|
print('transform{}'.format(c[1].id.name))
|
||||||
if c[1].id.name == scene.session_settings.active_object.name:
|
if c[1].id.name == scene.session_settings.active_object.name:
|
||||||
add_update(c[1].id.bl_rna.name, c[1].id.name)
|
add_update(c[1].id.bl_rna.name, c[1].id.name)
|
||||||
else:
|
else:
|
||||||
print('other')
|
print('other{}'.format(c[1].id.name))
|
||||||
# if c[1].id.bl_rna.name == 'Material' or c[1].id.bl_rna.name== 'Shader Nodetree':
|
# if c[1].id.bl_rna.name == 'Material' or c[1].id.bl_rna.name== 'Shader Nodetree':
|
||||||
|
|
||||||
data_name = c[1].id.name
|
data_name = c[1].id.name
|
||||||
if c[1].id.bl_rna.name == "Object":
|
if c[1].id.bl_rna.name == "Object":
|
||||||
if data_name in bpy.data.objects.keys():
|
if data_name in bpy.data.objects.keys():
|
||||||
|
@ -14,6 +14,7 @@ class SessionSettingsPanel(bpy.types.Panel):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
|
if hasattr(context.scene, 'session_settings'):
|
||||||
net_settings = context.scene.session_settings
|
net_settings = context.scene.session_settings
|
||||||
scene = context.scene
|
scene = context.scene
|
||||||
|
|
||||||
@ -117,7 +118,7 @@ class SessionUsersPanel(bpy.types.Panel):
|
|||||||
class SessionPropertiesPanel(bpy.types.Panel):
|
class SessionPropertiesPanel(bpy.types.Panel):
|
||||||
"""Creates a Panel in the scene context of the properties editor"""
|
"""Creates a Panel in the scene context of the properties editor"""
|
||||||
bl_label = "NET properties"
|
bl_label = "NET properties"
|
||||||
bl_idname = "SCENE_PT_layout"
|
bl_idname = "SCENE_PT_SessionProps"
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "scene"
|
bl_context = "scene"
|
||||||
@ -131,6 +132,7 @@ class SessionPropertiesPanel(bpy.types.Panel):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
|
if hasattr(context.scene,'session_settings'):
|
||||||
net_settings = context.scene.session_settings
|
net_settings = context.scene.session_settings
|
||||||
scene = context.scene
|
scene = context.scene
|
||||||
# Create a simple row.
|
# Create a simple row.
|
||||||
@ -163,7 +165,7 @@ class SessionPropertiesPanel(bpy.types.Panel):
|
|||||||
class SessionTaskPanel(bpy.types.Panel):
|
class SessionTaskPanel(bpy.types.Panel):
|
||||||
"""Creates a Panel in the scene context of the properties editor"""
|
"""Creates a Panel in the scene context of the properties editor"""
|
||||||
bl_label = "NET tasks"
|
bl_label = "NET tasks"
|
||||||
bl_idname = "SCENE_PT_layout"
|
bl_idname = "SCENE_PT_SessionTasks"
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "scene"
|
bl_context = "scene"
|
||||||
@ -176,8 +178,6 @@ class SessionTaskPanel(bpy.types.Panel):
|
|||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
scene = context.scene
|
|
||||||
# Create a simple row.
|
# Create a simple row.
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user