Exemple #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)
Exemple #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()
Exemple #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()
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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
Exemple #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
Exemple #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
Exemple #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
    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])
Exemple #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])
Exemple #15
0
 def __init__(self):
     ActuatorCreator.__init__(self)
Exemple #16
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.teleport.Teleport",\
                              "teleport")
Exemple #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'])
Exemple #18
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self,
                              name,
                              action=ComponentCreator.USE_BLEND,
                              make_morseable=False)
     self.properties(Speed=1.0)
Exemple #19
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "uhri_sim.actuators.moosteleport.Moosteleport",\
                              "moosteleport")
Exemple #20
0
 def __init__(self):
     ActuatorCreator.__init__(self)
     self.properties(classpath="morse.actuators.mocap_control.MocapControl")
Exemple #21
0
 def __init__(self):
     ActuatorCreator.__init__(self)
Exemple #22
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.steer_force.SteerForce",\
                              "steer_force")
Exemple #23
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
         "morse.actuators.stabilized_quadrotor.StabilizedQuadrotor",\
         "stabilized_quadrotor")
Exemple #24
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "ranger_sim.actuators.eyes.Eyes",\
                              "eyes")
Exemple #25
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
         "morse.actuators.rotorcraft_attitude.RotorcraftAttitude",\
         "rotorcraft_attitude")
Exemple #26
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.orientation.Orientation",\
                              "orientation")
Exemple #27
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.mocap_control.MocapControl",\
                              "mocap_control")
Exemple #28
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.destination.Destination",\
                              "destination")
Exemple #29
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.mark_unexportable()
Exemple #30
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.v_omega.MotionVW",\
                              "v_omega")
Exemple #31
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.force_torque.ForceTorque",\
                              "force_torque")
Exemple #32
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.mark_unexportable()
Exemple #33
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.teleport.Teleport",\
                              "teleport")
Exemple #34
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "bham_cs_sim.actuators.slidingdoor.SlidingDoor",\
                              "SlidingDoor")
Exemple #35
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.v_omega.MotionVW",\
                              "v_omega")
Exemple #36
0
    def __init__(self, name=None):
        ActuatorCreator.__init__(self, name)

        self.frequency(1000)
Exemple #37
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
         "morse.actuators.v_omega_diff_drive.MotionVWDiff",
         "v_omega_diff_drive")
Exemple #38
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.append_meshes(['white_plane', 'arplane', 'arplane.back'])
Exemple #39
0
 def __init__(self):
     ActuatorCreator.__init__(self)
     self.properties(classpath="morse.actuators.mocap_control.MocapControl")
Exemple #40
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.properties(Target="")
     # append 2 Radar with logic
     self.add_lr_radars()
Exemple #41
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
             action = ComponentCreator.USE_BLEND,
             make_morseable = False)
     self.properties(Speed = 1.0)
Exemple #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'])
Exemple #43
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
Exemple #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)
Exemple #45
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.properties(Target = "")
     # append 2 Radar with logic
     self.add_lr_radars()
Exemple #46
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.force_torque.ForceTorque",\
                              "force_torque")
Exemple #47
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(
         self, name, "morse.actuators.v_omega_diff_drive.MotionVWDiff",
         "v_omega_diff_drive")
Exemple #48
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.parameters = {}
Exemple #49
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.orientation.Orientation",\
                              "orientation")
Exemple #50
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
         "morse.actuators.rotorcraft_attitude.RotorcraftAttitude",\
         "rotorcraft_attitude")
Exemple #51
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name,
         "morse.actuators.rotorcraft_waypoint.RotorcraftWaypoint",\
         "rotorcraft_waypoint")
Exemple #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)
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "videoray_sim.actuators.vomegazdiffdrive.Vomegazdiffdrive",\
                              "vomegazdiffdrive")
Exemple #54
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.xy_omega.MotionXYW",\
                              "xy_omega")
Exemple #55
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.xy_omega.MotionXYW",\
                              "xy_omega")
Exemple #56
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
     self.append_meshes(['white_plane', 'arplane', 'arplane.back'])
Exemple #57
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.destination.Destination",\
                              "destination")
Exemple #58
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name)
Exemple #59
0
 def __init__(self, name=None):
     ActuatorCreator.__init__(self, name, \
                              "morse.actuators.mocap_control.MocapControl",\
                              "mocap_control")