move load_image into image_utils and add some docstrings to bpy_extras module.
This commit is contained in:
@@ -29,6 +29,16 @@ import mathutils
|
||||
|
||||
|
||||
def add_object_align_init(context, operator):
|
||||
"""
|
||||
Return a matrix using the operator settings and view context.
|
||||
|
||||
:arg context: The context to use.
|
||||
:type context: :class:`Context`
|
||||
:arg operator: The operator, checked for location and rotation properties.
|
||||
:type operator: :class:`Operator`
|
||||
:return: the matrix from the context and settings.
|
||||
:rtype: :class:`Matrix`
|
||||
"""
|
||||
space_data = context.space_data
|
||||
if space_data.type != 'VIEW_3D':
|
||||
space_data = None
|
||||
@@ -70,7 +80,19 @@ def add_object_align_init(context, operator):
|
||||
|
||||
|
||||
def object_data_add(context, obdata, operator=None):
|
||||
"""
|
||||
Add an object using the view context and preference to to initialize the
|
||||
location, rotation and layer.
|
||||
|
||||
:arg context: The context to use.
|
||||
:type context: :class:`Context`
|
||||
:arg obdata: the data used for the new object.
|
||||
:type obdata: valid object data type or None.
|
||||
:arg operator: The operator, checked for location and rotation properties.
|
||||
:type operator: :class:`Operator`
|
||||
:return: the newly created object in the scene.
|
||||
:rtype: :class:`ObjectBase`
|
||||
"""
|
||||
scene = context.scene
|
||||
|
||||
# ugh, could be made nicer
|
||||
|
||||
Reference in New Issue
Block a user