mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-02 00:34:26 +08:00
19 lines
718 B
Python
19 lines
718 B
Python
from UM.Backend.Command import Command
|
|
from UM.plugins.UMBackendEngine.Commands.TransferMeshCommand import TransferMeshCommand
|
|
|
|
class TransferMeshesCommand(Command):
|
|
def __init__(self):
|
|
super(TransferMeshesCommand,self).__init__()
|
|
|
|
def send(self, meshes):
|
|
self._socket.sendCommand(0x00200000,len(meshes)) # Tell other side that n meshes are going to be sent.
|
|
command = TransferMeshCommand(self._socket)
|
|
for mesh in meshes:
|
|
command.send(mesh)
|
|
|
|
def recieve(self, num_meshes):
|
|
meshes = []
|
|
command = TransferMeshCommand(self._socket)
|
|
for x in range(0,num_meshes):
|
|
meshes.append(command.recieve())
|
|
return meshes |