bpy_extras submodule (bpy_extras.object_utils)

bpy_extras.object_utils.add_object_align_init(context, operator)

Return a matrix using the operator settings and view context.

Parameters:
  • context (Context) – The context to use.
  • operator (Operator) – The operator, checked for location and rotation properties.
Returns:

the matrix from the context and settings.

Return type:

Matrix

bpy_extras.object_utils.object_data_add(context, obdata, operator=None)

Add an object using the view context and preference to to initialize the location, rotation and layer.

Parameters:
  • context (Context) – The context to use.
  • obdata (valid object data type or None.) – the data used for the new object.
  • operator (Operator) – The operator, checked for location and rotation properties.
Returns:

the newly created object in the scene.

Return type:

ObjectBase

Previous topic

Extra Utilities (bpy_extras)

Next topic

bpy_extras submodule (bpy_extras.io_utils)