bpy.ops Python API documentation
Repository - https://github.com/Andrej730/bpy.ops.context
constraint.childof_set_inverse
- β
context override
- π can be overridden using
object
(π οΈcontext_active_object()
)
- π
constraint
context member can be provided to automatically fill operator args constraint
(constraint name) and owner
constraint
is Constraint
works only if operator started with .invoke()
constraint
must be one of the object
constraints
clip.add_marker
- POLL_INTERNAL:
ED_space_clip_tracking_poll
- POLL:
- π
area.type
== CLIP_EDITOR
- π
area.spaces.active.clip
is not None
- π
area.spaces.active.mode
== TRACKING
- β
context override
mesh.primitive_cube_add
- β¬ context is not used
- clear previous selection
- newly added object is set as active and selected
mesh.separate
- In OBJECT mode:
- β
context override
- π can be overridden using
selected_editable_objects
- π TAG_ACTIVE_OBJECT_NOT_AFFECTED
- In EDIT_MESH mode:
- β context override
- π basically it affects
context.objects_in_mode
, but doesnβt use this actual context member
- π therefore it ignores selected objects that are in OBJECT mode, doesnβt require explicit selection and skips hidden objects
- π βby selectionβ separates selection for each object separately (e.g. if 1 face selected in N objects results in N separated objects)
- In both modes:
- π newly added objects are selected (original objects selection status is not affected)
- π newly objects (and their data) retain props from original separated objects (and their data)
object.convert
- β
context override
- can be overridden using
selected_editable_objects
- object is not recreated, even if object type is changed
- active object is not affected
object.delete
- POLL:
selected_objects
should not be empty
- β
context override
- can be overridden using
selected_objects
- active object is not affected
object.editmode_toggle
- POLL:
active_object
is required and it should be EDITable
- β context override
- check view layer active object explicitly
- check view layer selected objects explicitly (non-EDITable objects are ignored)
object.hide_view_set
- POLL_INTERNAL:
object_hide_poll
- POLL:
- π
area.type
== VIEW_3D
- π or (
area.type
== OUTLINER
and area.spaces.active.display_mode
in ('SCENES', 'VIEW_LAYER', 'LIBRARIES')
)
- β context override
- hide selected/unselected objects in viewport (EYE icon)
- check view layer selected objects explicitly
- active object is not affected
object.join
- POLL:
active_object
is required and it should be EDITable
- β
context override
- can be overridden using
selected_editable_objects
and active_object
- objects that donβt match
active_object
type are ignored from selected_editable_objects
(e.g. Curves when Mesh is active)
- active object is the join target and it should also be selected
object.make_single_user
- β context override
- check view layer selected objects explicitly
- active object is not affected
object.mode_set
- POLL:
active_object
is required and it should be EDITable
- β context override
- check view layer active object explicitly
- check view layer selected objects explicitly (non-EDITable objects are ignored)
object.modifier_apply
- POLL_INTERNAL:
modifier_apply_poll
- POLL: undocumented
- β
context override
- affects just one object -
context.object
- active object is not affected, because operator needs to support being applied to pinned object
object.select_all
- POLL_INTERNAL:
objects_selectable_poll
- POLL:
- π
context.edit_object
is None
- π and (
context.active_object
is None
or context.active_object.mode
== OBJECT
)
- π§© partial context override
- context override only supported for passing poll check
- manipulate view layer objects selection explicitly
- return
FINISHED
if there were any changes in selection
- return
PASS_THROUGH
if there were no changes but no objects are visible, otherwise return CANCELLED
- β
context override
- can be overridden using
selected_editable_objects
- active object is not affected
outliner.delete
- POLL:
area.type
== OUTLINER
- β context override
- check outliner tree for selected IDs explicitly (ignore
selected_ids
)
- active object is not affected
view3d.camera_to_view_selected
- POLL_INTERNAL: π οΈ
ED_operator_scene_editable
- POLL:
- π
context.scene
is set and is editable
- π§© partial context override
- context override is only supported for passing
area
and scene
- check view layer selected objects explicitly (π οΈ
base_flag & BASE_SELECTED
)
- if
area
with type
== VIEW3D
is provided, then SpaceView3D.camera
is used,
otherwise scene.camera
is used
view3d.camera_to_view
- POLL_INTERNAL:
view3d_camera_to_view_poll
- POLL:
- π
area.type
== VIEW_3D
- π
region
= region from area.regions
with type WINDOW
- π active scene
camera
should not be None
- π viewport is not in camera view (
RegionView3D.view_perspective
!= CAMERA
)
- β
context override
- updates camera view for the sceneβs active camera