move load_image into image_utils and add some docstrings to bpy_extras module.

This commit is contained in:
2011-05-28 09:34:45 +00:00
parent 245d36b706
commit a9dd90be78
5 changed files with 134 additions and 43 deletions

View File

@@ -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