Beispiel #1
0
 def write(self, msg):
     reslot_msg = Sims_pb2.ReslotPlumbbob()
     reslot_msg.sim_id = self._sim_id
     reslot_msg.obj_id = self._obj_id
     reslot_msg.bone = self._bone_hash
     reslot_msg.offset.x = self._offset.x
     reslot_msg.offset.y = self._offset.y
     reslot_msg.offset.z = self._offset.z
     msg.type = protocols.Operation.RESLOT_PLUMBBOB
     msg.data = reslot_msg.SerializeToString()
Beispiel #2
0
 def write(self, msg):
     reslot_msg = Sims_pb2.ReslotPlumbbob()
     reslot_msg.sim_id = self._sim_id
     reslot_msg.obj_id = self._obj_id
     reslot_msg.bone = self._bone_hash
     reslot_msg.offset.x = self._offset.x
     reslot_msg.offset.y = self._offset.y
     reslot_msg.offset.z = self._offset.z
     if self._balloon_offset is not None:
         reslot_msg.balloon_view_offset.x = self._balloon_offset.x
         reslot_msg.balloon_view_offset.y = self._balloon_offset.y
         reslot_msg.balloon_view_offset.z = self._balloon_offset.z
     self.serialize_op(msg, reslot_msg, protocols.Operation.RESLOT_PLUMBBOB)