Esempio n. 1
0
    def __init__(self, owner=None):
        self.owner = owner
        self.manager = Manager.instance_by_ref(self.owner) # try to get a global manager instance
        self.config = bpy.data.objects[self.owner.name].moCapSpawnerConfig
        self.rigid_body_object_list = RigidBodyObjectList()

        if self.config.enabled:
            # register callback for new rigid bodies
            # this method will also invoke the callback for any rigid body
            # that is already in the system
            self.manager.addNewRigidBodyCallback(self.onRigidBody)
Esempio n. 2
0
    def __init__(self, owner):
        self.owner = owner
        self.config = bpy.data.objects[self.owner.name].moCapOscConfig
        self.manager = Manager.instance_by_ref(self.owner) # try to get a global manager instance

        try:
            self.reader = OscReader(host=self.config.host, port=self.config.port, manager=self.manager, autoStart=self.config.enabled)
        except NameError as err:
            self.reader = None
            print("Could not initialize OscReader:")
            print(err)
Esempio n. 3
0
    def __init__(self, owner=None):
        self.owner = owner
        self.manager = Manager.instance_by_ref(
            self.owner)  # try to get a global manager instance
        self.config = bpy.data.objects[self.owner.name].moCapSpawnerConfig
        self.rigid_body_object_list = RigidBodyObjectList()

        if self.config.enabled:
            # register callback for new rigid bodies
            # this method will also invoke the callback for any rigid body
            # that is already in the system
            self.manager.addNewRigidBodyCallback(self.onRigidBody)
Esempio n. 4
0
    def __init__(self, owner):
        self.owner = owner
        self.config = bpy.data.objects[self.owner.name].moCapOscConfig
        self.manager = Manager.instance_by_ref(
            self.owner)  # try to get a global manager instance

        try:
            self.reader = OscReader(host=self.config.host,
                                    port=self.config.port,
                                    manager=self.manager,
                                    autoStart=self.config.enabled)
        except NameError as err:
            self.reader = None
            print("Could not initialize OscReader:")
            print(err)
Esempio n. 5
0
 def __init__(self, owner):
     self.owner = owner
     self.config = bpy.data.objects[self.owner.name].moCapJsonConfig
     self.manager = Manager.instance_by_ref(self.owner) # try to get a global manager instance
     self.json_reader = JsonReader(path=self.config.file, loop=self.config.loop, sync=self.config.sync, manager=self.manager, autoStart=self.config.enabled)