feat(rcf.net_operators): Vector transmission is now working

This commit is contained in:
Swann 2019-02-14 10:30:33 +01:00
parent c3e935081e
commit 67c5976c74
No known key found for this signature in database
GPG Key ID: B02D0B41F8B6D2EE

View File

@ -19,12 +19,15 @@ def refresh_window(msg):
def patch_scene(msg):
path = msg.key.split('/')
value = None
object = getattr(bpy.data,path[0])[path[1]]
attribute = getattr(getattr(bpy.data,path[0])[path[1]],path[2])
print(type(attribute))
print("attribute: {}".format(attribute))
if type(attribute) == mathutils.Vector:
attribute = array2vector(msg.body)
#attribute = array2vector(msg.body)
value = array2vector(msg.body)
setattr(object,path[2],value)
def vector2array(v):
return [v.x,v.y,v.z]