fix(client): only dump usefull infos

This commit is contained in:
Swann Martinez 2019-04-29 16:39:11 +02:00
parent 3cd2e71c46
commit 5e7ac95228
No known key found for this signature in database
GPG Key ID: 414CCAFD8DA720E1
4 changed files with 6 additions and 6 deletions

View File

@ -239,6 +239,7 @@ class RCFClientAgent(object):
if value == 'None':
# try to dump from bpy
# logging.info(key)
value = helpers.dump(key)
value['id'] = self.id.decode()
if value:

View File

@ -131,7 +131,7 @@ def load_mesh(target=None, data=None, create=False):
target.id = data['id']
else:
logger.info("Mesh can't be loaded")
logger.debug("Mesh can't be loaded")
def load_object(target=None, data=None, create=False):
@ -365,7 +365,7 @@ def dump(key):
elif target_type == 'Collection':
data = dump_datablock(target, 4)
elif target_type == 'Scene':
data = dump_datablock(target, 4)
data = dump_datablock_attibute(target,['name','collection','id','camera','grease_pencil'], 4)
return data

View File

@ -54,7 +54,7 @@ class RCFMessage(object):
@classmethod
def recv(cls, socket):
"""Reads key-value message from socket, returns new kvmsg instance."""
key, id, body = socket.recv_multipart()
key, id, body = socket.recv_multipart(zmq.NOBLOCK)
key = key.decode() if key else None
id = id if id else None
body = umsgpack.unpackb(body) if body else None

View File

@ -203,7 +203,7 @@ def sync():
if item.id == 'None':
item.id= bpy.context.scene.session_settings.username
key = "{}/{}".format(datatype, item.name)
client_instance.queue.put(key)
client_instance.add(key)
return .2
@ -570,8 +570,7 @@ def depsgraph_update(scene):
# selected_objects = helpers.get_selected_objects(scene)
# if len(selected_objects) > 0:
# for update in updates:
# update_key = "{}/{}".format(update.id.bl_rna.name, update.id.name)