Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-05-28 13:34:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-28 13:34:45 +0400
commita9dd90be788f5ce894fd5a8c9bc8245980ec143e (patch)
treeb4e5ae9fe4fcb456de63018ce5250d6b90bbcb0c /release/scripts/modules/bpy_extras/object_utils.py
parent245d36b70693f84ee2a057f950db9c4a2e6c1145 (diff)
move load_image into image_utils and add some docstrings to bpy_extras module.
Diffstat (limited to 'release/scripts/modules/bpy_extras/object_utils.py')
-rw-r--r--release/scripts/modules/bpy_extras/object_utils.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py
index 606f8b9f89f..51a8d4b5e23 100644
--- a/release/scripts/modules/bpy_extras/object_utils.py
+++ b/release/scripts/modules/bpy_extras/object_utils.py
@@ -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