refactor: clean

This commit is contained in:
Swann Martinez
2019-04-26 17:18:55 +02:00
parent cbf24384d6
commit 951af9dae4
4 changed files with 4 additions and 3 deletions

View File

@ -9,6 +9,7 @@ from enum import Enum
from random import randint from random import randint
import copy import copy
import queue import queue
lock = threading.Lock() lock = threading.Lock()
try: try:

View File

@ -30,6 +30,7 @@ def get_target(region, rv3d, coord):
return [target.x, target.y, target.z] return [target.x, target.y, target.z]
def get_target_far(region, rv3d, coord, distance): def get_target_far(region, rv3d, coord, distance):
target = [0, 0, 0] target = [0, 0, 0]

View File

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

View File

@ -212,7 +212,6 @@ def unregister_ticks():
# OPERATORS # OPERATORS
class session_join(bpy.types.Operator): class session_join(bpy.types.Operator):
bl_idname = "session.join" bl_idname = "session.join"
@ -351,7 +350,7 @@ class session_create(bpy.types.Operator):
net_settings = context.scene.session_settings net_settings = context.scene.session_settings
server = subprocess.Popen( server = subprocess.Popen(
['python', 'server.py'], shell=False, stdout=subprocess.PIPE) ['python', 'server.py'], shell=False, stdout=subprocess.PIPE)
time.sleep(0.1) # time.sleep(0.1)
bpy.ops.session.join() bpy.ops.session.join()