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, use_active_layer=True)

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

class bpy_extras.object_utils.AddObjectHelper

Previous topic

bpy_extras submodule (bpy_extras.anim_utils)

Next topic

bpy_extras submodule (bpy_extras.io_utils)