fix(rcf): panel regisration

This commit is contained in:
Swann Martinez
2019-04-01 16:14:21 +02:00
parent 3946b87f83
commit f10a546585
3 changed files with 83 additions and 84 deletions

View File

@ -27,7 +27,8 @@ def register():
net_ecs.register()
def unregister():
bsyncio.unregister()
net_ui.unregister()
net_operators.unregister()
net_ecs.unregister()
bsyncio.unregister()

View File

@ -460,7 +460,6 @@ def mesh_tick():
def object_tick():
obj = get_update("Object")
if obj:
@ -541,7 +540,6 @@ class session_join(bpy.types.Operator):
drawer = net_draw.HUD(client_instance=client)
register_ticks()
# bpy.ops.session.draw('INVOKE_DEFAULT')
return {"FINISHED"}
@ -727,7 +725,6 @@ classes = (
session_create,
session_settings,
session_remove_property,
session_draw_clients,
session_snapview,
)
@ -742,16 +739,17 @@ def depsgraph_update(scene):
if client.status == net_components.RCFStatus.CONNECTED:
if scene.session_settings.active_object:
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:
add_update(c[1].id.bl_rna.name, c[1].id.name)
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:
add_update(c[1].id.bl_rna.name, c[1].id.name)
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':
data_name = c[1].id.name
if c[1].id.bl_rna.name == "Object":
if data_name in bpy.data.objects.keys():

View File

@ -14,6 +14,7 @@ class SessionSettingsPanel(bpy.types.Panel):
def draw(self, context):
layout = self.layout
if hasattr(context.scene, 'session_settings'):
net_settings = context.scene.session_settings
scene = context.scene
@ -117,7 +118,7 @@ class SessionUsersPanel(bpy.types.Panel):
class SessionPropertiesPanel(bpy.types.Panel):
"""Creates a Panel in the scene context of the properties editor"""
bl_label = "NET properties"
bl_idname = "SCENE_PT_layout"
bl_idname = "SCENE_PT_SessionProps"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "scene"
@ -131,6 +132,7 @@ class SessionPropertiesPanel(bpy.types.Panel):
def draw(self, context):
layout = self.layout
if hasattr(context.scene,'session_settings'):
net_settings = context.scene.session_settings
scene = context.scene
# Create a simple row.
@ -163,7 +165,7 @@ class SessionPropertiesPanel(bpy.types.Panel):
class SessionTaskPanel(bpy.types.Panel):
"""Creates a Panel in the scene context of the properties editor"""
bl_label = "NET tasks"
bl_idname = "SCENE_PT_layout"
bl_idname = "SCENE_PT_SessionTasks"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "scene"
@ -176,8 +178,6 @@ class SessionTaskPanel(bpy.types.Panel):
def draw(self, context):
layout = self.layout
scene = context.scene
# Create a simple row.
row = layout.row()