Logic Operators

bpy.ops.logic.actuator_add(*, type='', name='', object='')

Add an actuator to the active object

Parameters:
  • type (enum in [], (optional)) – Type, Type of actuator to add

  • name (string, (optional, never None)) – Name, Name of the Actuator to add

  • object (string, (optional, never None)) – Object, Name of the Object to add the Actuator to

bpy.ops.logic.actuator_move(*, actuator='', object='', direction='UP')

Move Actuator

Parameters:
  • actuator (string, (optional, never None)) – Actuator, Name of the actuator to edit

  • object (string, (optional, never None)) – Object, Name of the object the actuator belongs to

  • direction (enum in ['UP', 'DOWN'], (optional)) – Direction, Move Up or Down

bpy.ops.logic.actuator_remove(*, actuator='', object='')

Remove an actuator from the active object

Parameters:
  • actuator (string, (optional, never None)) – Actuator, Name of the actuator to edit

  • object (string, (optional, never None)) – Object, Name of the object the actuator belongs to

bpy.ops.logic.controller_add(*, type='LOGIC_AND', name='', object='')

Add a controller to the active object

Parameters:
  • type (enum in Controller Type Items, (optional)) – Type, Type of controller to add

  • name (string, (optional, never None)) – Name, Name of the Controller to add

  • object (string, (optional, never None)) – Object, Name of the Object to add the Controller to

bpy.ops.logic.controller_move(*, controller='', object='', direction='UP')

Move Controller

Parameters:
  • controller (string, (optional, never None)) – Controller, Name of the controller to edit

  • object (string, (optional, never None)) – Object, Name of the object the controller belongs to

  • direction (enum in ['UP', 'DOWN'], (optional)) – Direction, Move Up or Down

bpy.ops.logic.controller_remove(*, controller='', object='')

Remove a controller from the active object

Parameters:
  • controller (string, (optional, never None)) – Controller, Name of the controller to edit

  • object (string, (optional, never None)) – Object, Name of the object the controller belongs to

bpy.ops.logic.custom_object_create(*, class_name='module.MyObject')

Create a KX_GameObject subclass and attach it to the selected object

Parameters:

class_name (string, (never None)) – MyObject, The class name with module (module.ClassName)

bpy.ops.logic.custom_object_register(*, class_name='module.MyObject')

Use a custom KX_GameObject subclass for the selected object

Parameters:

class_name (string, (never None)) – MyObject, The class name with module (module.ClassName)

bpy.ops.logic.custom_object_reload()

Reload custom object from the source script

bpy.ops.logic.custom_object_remove()

Remove this custom class from the object

Remove logic brick connections

Parameters:
  • path (bpy_prop_collection of OperatorMousePath, (optional)) – Path

  • cursor (int in [0, inf], (optional)) – Cursor

bpy.ops.logic.properties()

Toggle the properties region visibility

bpy.ops.logic.python_component_create(*, component_name='module.Component')

Create a Python component to the selected object

Parameters:

component_name (string, (never None)) – Component, The component class name with module (module.ComponentName)

bpy.ops.logic.python_component_move_down(*, index=0)

Move this component down in the list

Parameters:

index (int in [0, inf], (optional)) – Index, Component index to move

bpy.ops.logic.python_component_move_up(*, index=0)

Move this component up in the list

Parameters:

index (int in [0, inf], (optional)) – Index, Component index to move

bpy.ops.logic.python_component_register(*, component_name='module.Component')

Add a Python component to the selected object

Parameters:

component_name (string, (never None)) – Component, The component class name with module (module.ComponentName)

bpy.ops.logic.python_component_reload(*, index=0)

Reload component from the source script

Parameters:

index (int in [0, inf], (optional)) – Index, Component index to reload

bpy.ops.logic.python_component_remove(*, index=0)

Remove this component from the object

Parameters:

index (int in [0, inf], (optional)) – Index, Component index to remove

bpy.ops.logic.region_flip()

Toggle the properties region’s alignment (left/right)

bpy.ops.logic.sensor_add(*, type='', name='', object='')

Add a sensor to the active object

Parameters:
  • type (enum in [], (optional)) – Type, Type of sensor to add

  • name (string, (optional, never None)) – Name, Name of the Sensor to add

  • object (string, (optional, never None)) – Object, Name of the Object to add the Sensor to

bpy.ops.logic.sensor_move(*, sensor='', object='', direction='UP')

Move Sensor

Parameters:
  • sensor (string, (optional, never None)) – Sensor, Name of the sensor to edit

  • object (string, (optional, never None)) – Object, Name of the object the sensor belongs to

  • direction (enum in ['UP', 'DOWN'], (optional)) – Direction, Move Up or Down

bpy.ops.logic.sensor_remove(*, sensor='', object='')

Remove a sensor from the active object

Parameters:
  • sensor (string, (optional, never None)) – Sensor, Name of the sensor to edit

  • object (string, (optional, never None)) – Object, Name of the object the sensor belongs to

bpy.ops.logic.view_all()

Resize view so you can see all logic bricks