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:
Returns:

the matrix from the context and settings.

Return type:

mathutils.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 (bpy.types.Context) – The context to use.
  • obdata (valid object data type or None.) – the data used for the new object.
  • operator (bpy.types.Operator) – The operator, checked for location and rotation properties.
Returns:

the newly created object in the scene.

Return type:

bpy.types.ObjectBase

Previous topic

Extra Utilities (bpy_extras)

Next topic

bpy_extras submodule (bpy_extras.io_utils)