Пример #1
0
 def __init__(self, name=None):
     self.light = None
     ActuatorCreator.__init__(self, name, "morse.actuators.light.Light",
                              "light")
     self.light = Spot("LightSpot")
     self.append(self.light)
     self.properties(Emit=True)
Пример #2
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
                              "morse.actuators.waypoint.Waypoint",
                              "waypoint")
     self.properties(Target="")
     # append 2 Radar with logic
     self.add_lr_radars()
Пример #3
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
         "morse/actuators/waypoint",
         "WaypointActuatorClass", "waypoint")
     self.properties(Target = "")
     # append 2 Radar with logic
     self.add_lr_radars()
Пример #4
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.light.Light",\
                              "light")
     light = Spot("LightSpot")
     self.append(light)
     self.properties(emit=True)
Пример #5
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.light.Light",\
                              "light")
     light = Spot("LightSpot")
     self.append(light)
     self.properties(emit = True)
Пример #6
0
 def __init__(self, name=None):
     self.light = None
     ActuatorCreator.__init__(self, name,
                              "morse.actuators.light.Light",
                              "light")
     self.light = Spot("LightSpot")
     self.append(self.light)
     self.properties(Emit=True)
Пример #7
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.properties(mode="play")
     #self.select()
     bpymorse.add_actuator(type="SOUND", name="MORSE_SOUND")
     actuator = self._bpy_object.game.actuators[-1]
     controller = self._bpy_object.game.controllers[-1]
     controller.link(actuator=actuator)
Пример #8
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.properties(mode="play")
     #self.select()
     bpymorse.add_actuator(type="SOUND", name="MORSE_SOUND")
     actuator = self._bpy_object.game.actuators[-1]
     controller =  self._bpy_object.game.controllers[-1]
     controller.link(actuator=actuator)
Пример #9
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, "morse/actuators/keyboard", \
                              "KeyboardActuatorClass", "armature_actuator")
     self.properties(Speed = 1.0)
     obj = bpymorse.get_context_object()
     # replace Always sensor by Keyboard sensor
     sensor = obj.game.sensors[-1]
     sensor.type = 'KEYBOARD'
     # need to get the new Keyboard Sensor object
     sensor = obj.game.sensors[-1]
     sensor.use_pulse_true_level = True
     sensor.use_all_keys = True
Пример #10
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.keyboard.Keyboard",\
                              "keyboard")
     self.properties(Speed=1.0)
     obj = bpymorse.get_context_object()
     # replace Always sensor by Keyboard sensor
     sensor = obj.game.sensors[-1]
     sensor.type = 'KEYBOARD'
     # need to get the new Keyboard Sensor object
     sensor = obj.game.sensors[-1]
     sensor.use_pulse_true_level = True
     sensor.use_all_keys = True
Пример #11
0
    def __init__(self, name=None, index=0):
        """ Create a new Joystick controller

        :param index: Which joystick to use
        :type index:  int in [0, 7], default 0
        """
        ActuatorCreator.__init__(self, name)
        self.mark_unexportable()
        obj = bpymorse.get_context_object()
        # replace Always sensor by Joystick sensor
        sensor = obj.game.sensors[-1]
        sensor.type = 'JOYSTICK'
        # need to get the new Joystick Sensor object
        sensor = obj.game.sensors[-1]
        sensor.use_pulse_true_level = True
        sensor.joystick_index = index
        sensor.event_type = 'AXIS'
        sensor.use_all_events = True
Пример #12
0
    def __init__(self, name=None, index=0):
        """ Create a new Joystick controller

        :param index: Which joystick to use
        :type index:  int in [0, 7], default 0
        """
        ActuatorCreator.__init__(self, name)
        self.mark_unexportable()
        obj = bpymorse.get_context_object()
        # replace Always sensor by Joystick sensor
        sensor = obj.game.sensors[-1]
        sensor.type = 'JOYSTICK'
        # need to get the new Joystick Sensor object
        sensor = obj.game.sensors[-1]
        sensor.use_pulse_true_level = True
        sensor.joystick_index = index
        sensor.event_type = 'AXIS'
        sensor.use_all_events = True
Пример #13
0
    def __init__(self, name=None, armature_name=None, model_name=None):
        """ Initialize an armature

        Either `armature_name` or `model_name` or both must be specified.
        

        :param armature_name: Armature object name
        :param model_name: Armature model name, if any
        """

        if not armature_name and not model_name:
            raise MorseBuilderError(
                "You need to specify either the name of "
                "an armature or a Blender model in order to create an "
                "armature actuator."
            )

        if model_name:
            ActuatorCreator.__init__(
                self,
                name,
                action=ComponentCreator.USE_BLEND,
                blendfile=model_name,
                blendobject=armature_name,
                make_morseable=True,
            )

        else:
            ActuatorCreator.__init__(
                self, name, action=ComponentCreator.LINK_EXISTING_OBJECT, blendobject=armature_name, make_morseable=True
            )

        self.ik_targets = []

        # the user may have created IK constraints on the armature, without
        # setting an IK target. In that case, we add such a target
        for bone in self._bpy_object.pose.bones:
            for c in bone.constraints:
                if c.type == "IK" and c.ik_type == "DISTANCE":
                    if not c.target:
                        self.create_ik_targets([bone.name])
Пример #14
0
    def __init__(self, name=None, armature_name=None, model_name=None):
        """ Initialize an armature

        Either `armature_name` or `model_name` or both must be specified.
        

        :param armature_name: Armature object name
        :param model_name: Armature model name, if any
        """

        if not armature_name and not model_name:
            raise MorseBuilderError("You need to specify either the name of " \
                    "an armature or a Blender model in order to create an " \
                    "armature actuator.")

        if model_name:
            ActuatorCreator.__init__(self,
                                     name,
                                     action=ComponentCreator.USE_BLEND,
                                     blendfile=model_name,
                                     blendobject=armature_name,
                                     make_morseable=True)

        else:
            ActuatorCreator.__init__(
                self,
                name,
                action=ComponentCreator.LINK_EXISTING_OBJECT,
                blendobject=armature_name,
                make_morseable=True)

        self.ik_targets = []

        # the user may have created IK constraints on the armature, without
        # setting an IK target. In that case, we add such a target
        for bone in self._bpy_object.pose.bones:
            for c in bone.constraints:
                if c.type == 'IK' and c.ik_type == 'DISTANCE':
                    if not c.target:
                        self.create_ik_targets([bone.name])
Пример #15
0
 def __init__(self):
     ActuatorCreator.__init__(self)
Пример #16
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.teleport.Teleport",\
                              "teleport")
Пример #17
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.properties(Speed=1.0, Manual=False, Tolerance=0.01)
     # append PanBase with its logic
     self.append_meshes(['PanBase', 'TiltBase'])
Пример #18
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self,
                              name,
                              action=ComponentCreator.USE_BLEND,
                              make_morseable=False)
     self.properties(Speed=1.0)
Пример #19
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "uhri_sim.actuators.moosteleport.Moosteleport",\
                              "moosteleport")
Пример #20
0
 def __init__(self):
     ActuatorCreator.__init__(self)
     self.properties(classpath="morse.actuators.mocap_control.MocapControl")
Пример #21
0
 def __init__(self):
     ActuatorCreator.__init__(self)
Пример #22
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.steer_force.SteerForce",\
                              "steer_force")
Пример #23
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
         "morse.actuators.stabilized_quadrotor.StabilizedQuadrotor",\
         "stabilized_quadrotor")
Пример #24
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "ranger_sim.actuators.eyes.Eyes",\
                              "eyes")
Пример #25
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
         "morse.actuators.rotorcraft_attitude.RotorcraftAttitude",\
         "rotorcraft_attitude")
Пример #26
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.orientation.Orientation",\
                              "orientation")
Пример #27
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.mocap_control.MocapControl",\
                              "mocap_control")
Пример #28
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.destination.Destination",\
                              "destination")
Пример #29
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.mark_unexportable()
Пример #30
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.v_omega.MotionVW",\
                              "v_omega")
Пример #31
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.force_torque.ForceTorque",\
                              "force_torque")
Пример #32
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.mark_unexportable()
Пример #33
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.teleport.Teleport",\
                              "teleport")
Пример #34
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "bham_cs_sim.actuators.slidingdoor.SlidingDoor",\
                              "SlidingDoor")
Пример #35
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.v_omega.MotionVW",\
                              "v_omega")
Пример #36
0
    def __init__(self, name=None):
        ActuatorCreator.__init__(self, name)

        self.frequency(1000)
Пример #37
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
         "morse.actuators.v_omega_diff_drive.MotionVWDiff",
         "v_omega_diff_drive")
Пример #38
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.append_meshes(['white_plane', 'arplane', 'arplane.back'])
Пример #39
0
 def __init__(self):
     ActuatorCreator.__init__(self)
     self.properties(classpath="morse.actuators.mocap_control.MocapControl")
Пример #40
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.properties(Target="")
     # append 2 Radar with logic
     self.add_lr_radars()
Пример #41
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
             action = ComponentCreator.USE_BLEND,
             make_morseable = False)
     self.properties(Speed = 1.0)
Пример #42
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.properties(Speed = 1.0, Manual = False, Tolerance = 0.01)
     # append PanBase with its logic
     self.append_meshes(['PanBase', 'TiltBase'])
Пример #43
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
Пример #44
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self,
                              name,
                              action=ActuatorCreator.USE_BLEND,
                              make_morseable=False)
     self.properties(Angle=60.0, Distance=0.5)
Пример #45
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.properties(Target = "")
     # append 2 Radar with logic
     self.add_lr_radars()
Пример #46
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.force_torque.ForceTorque",\
                              "force_torque")
Пример #47
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(
         self, name, "morse.actuators.v_omega_diff_drive.MotionVWDiff",
         "v_omega_diff_drive")
Пример #48
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.parameters = {}
Пример #49
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.orientation.Orientation",\
                              "orientation")
Пример #50
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
         "morse.actuators.rotorcraft_attitude.RotorcraftAttitude",\
         "rotorcraft_attitude")
Пример #51
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
         "morse.actuators.rotorcraft_waypoint.RotorcraftWaypoint",\
         "rotorcraft_waypoint")
Пример #52
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
                 action = ActuatorCreator.USE_BLEND,
                 make_morseable = False)
     self.properties(Angle = 60.0, Distance = 0.5)
Пример #53
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "videoray_sim.actuators.vomegazdiffdrive.Vomegazdiffdrive",\
                              "vomegazdiffdrive")
Пример #54
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.xy_omega.MotionXYW",\
                              "xy_omega")
Пример #55
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.xy_omega.MotionXYW",\
                              "xy_omega")
Пример #56
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.append_meshes(['white_plane', 'arplane', 'arplane.back'])
Пример #57
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.destination.Destination",\
                              "destination")
Пример #58
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
Пример #59
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.mocap_control.MocapControl",\
                              "mocap_control")