Logic Operators
- bpy.ops.logic.actuator_add(*, type='', name='', object='')
Add an actuator to the active object
- Parameters:
type (str) – Type, Type of actuator to add (optional)
name (str) – Name, Name of the Actuator to add (optional, never None)
object (str) – Object, Name of the Object to add the Actuator to (optional, never None)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.actuator_move(*, actuator='', object='', direction='UP')
Move Actuator
- Parameters:
actuator (str) – Actuator, Name of the actuator to edit (optional, never None)
object (str) – Object, Name of the object the actuator belongs to (optional, never None)
direction (Literal['UP', 'DOWN']) – Direction, Move Up or Down (optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.actuator_remove(*, actuator='', object='')
Remove an actuator from the active object
- Parameters:
actuator (str) – Actuator, Name of the actuator to edit (optional, never None)
object (str) – Object, Name of the object the actuator belongs to (optional, never None)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.controller_add(*, type='LOGIC_AND', name='', object='')
Add a controller to the active object
- Parameters:
type (Literal[Controller Type Items]) – Type, Type of controller to add (optional)
name (str) – Name, Name of the Controller to add (optional, never None)
object (str) – Object, Name of the Object to add the Controller to (optional, never None)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.controller_move(*, controller='', object='', direction='UP')
Move Controller
- Parameters:
controller (str) – Controller, Name of the controller to edit (optional, never None)
object (str) – Object, Name of the object the controller belongs to (optional, never None)
direction (Literal['UP', 'DOWN']) – Direction, Move Up or Down (optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.controller_remove(*, controller='', object='')
Remove a controller from the active object
- Parameters:
controller (str) – Controller, Name of the controller to edit (optional, never None)
object (str) – Object, Name of the object the controller belongs to (optional, never None)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- 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 (str) – MyObject, The class name with module (module.ClassName) (never None)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.custom_object_register(*, class_name='module.MyObject')
Use a custom KX_GameObject subclass for the selected object
- Parameters:
class_name (str) – MyObject, The class name with module (module.ClassName) (never None)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.custom_object_reload()
Reload custom object from the source script
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.custom_object_remove()
Remove this custom class from the object
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.links_cut(*, path=None, cursor=15)
Remove logic brick connections
- Parameters:
path (
bpy_prop_collection[OperatorMousePath]) – Path, (optional)cursor (int) – Cursor, (in [0, inf], optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.properties()
Toggle the properties region visibility
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.python_component_create(*, component_name='module.Component')
Create a Python component to the selected object
- Parameters:
component_name (str) – Component, The component class name with module (module.ComponentName) (never None)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.python_component_move_down(*, index=0)
Move this component down in the list
- Parameters:
index (int) – Index, Component index to move (in [0, inf], optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.python_component_move_up(*, index=0)
Move this component up in the list
- Parameters:
index (int) – Index, Component index to move (in [0, inf], optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.python_component_register(*, component_name='module.Component')
Add a Python component to the selected object
- Parameters:
component_name (str) – Component, The component class name with module (module.ComponentName) (never None)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.python_component_reload(*, index=0)
Reload component from the source script
- Parameters:
index (int) – Index, Component index to reload (in [0, inf], optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.python_component_remove(*, index=0)
Remove this component from the object
- Parameters:
index (int) – Index, Component index to remove (in [0, inf], optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.region_flip()
Toggle the properties region’s alignment (left/right)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.sensor_add(*, type='', name='', object='')
Add a sensor to the active object
- Parameters:
type (str) – Type, Type of sensor to add (optional)
name (str) – Name, Name of the Sensor to add (optional, never None)
object (str) – Object, Name of the Object to add the Sensor to (optional, never None)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.sensor_move(*, sensor='', object='', direction='UP')
Move Sensor
- Parameters:
sensor (str) – Sensor, Name of the sensor to edit (optional, never None)
object (str) – Object, Name of the object the sensor belongs to (optional, never None)
direction (Literal['UP', 'DOWN']) – Direction, Move Up or Down (optional)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.sensor_remove(*, sensor='', object='')
Remove a sensor from the active object
- Parameters:
sensor (str) – Sensor, Name of the sensor to edit (optional, never None)
object (str) – Object, Name of the object the sensor belongs to (optional, never None)
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]
- bpy.ops.logic.view_all()
Resize view so you can see all logic bricks
- Returns:
Result of the operator call.
- Return type:
set[Literal[Operator Return Items]]