correct missing bpy doc references.

This commit is contained in:
Campbell Barton 2011-08-26 18:48:48 +00:00
parent f10f4f570d
commit a9dea3afe9
8 changed files with 27 additions and 27 deletions

@ -82,7 +82,7 @@ No updates after setting values
Sometimes you want to modify values from python and immediately access the updated values, eg: Sometimes you want to modify values from python and immediately access the updated values, eg:
Once changing the objects :class:`Object.location` you may want to access its transformation right after from :class:`Object.matrix_world`, but this doesn't work as you might expect. Once changing the objects :class:`bpy.types.Object.location` you may want to access its transformation right after from :class:`bpy.types.Object.matrix_world`, but this doesn't work as you might expect.
Consider the calculations that might go into working out the objects final transformation, this includes: Consider the calculations that might go into working out the objects final transformation, this includes:

@ -58,7 +58,7 @@ def load_image(imagepath,
For formats blender can read, simply return the path that is given. For formats blender can read, simply return the path that is given.
:type convert_callback: function :type convert_callback: function
:return: an image or None :return: an image or None
:rtype: :class:`Image` :rtype: :class:`bpy.types.Image`
""" """
import os import os
import bpy import bpy

@ -252,10 +252,10 @@ def axis_conversion(from_forward='Y', from_up='Z', to_forward='Y', to_up='Z'):
def axis_conversion_ensure(operator, forward_attr, up_attr): def axis_conversion_ensure(operator, forward_attr, up_attr):
""" """
Function to ensure an operator has valid axis conversion settings, intended Function to ensure an operator has valid axis conversion settings, intended
to be used from :class:`Operator.check`. to be used from :class:`bpy.types.Operator.check`.
:arg operator: the operator to access axis attributes from. :arg operator: the operator to access axis attributes from.
:type operator: :class:`Operator` :type operator: :class:`bpy.types.Operator`
:arg forward_attr: attribute storing the forward axis :arg forward_attr: attribute storing the forward axis
:type forward_attr: string :type forward_attr: string
:arg up_attr: attribute storing the up axis :arg up_attr: attribute storing the up axis

@ -35,7 +35,7 @@ def mesh_linked_faces(mesh):
other mesh elements within 1 mesh datablock. other mesh elements within 1 mesh datablock.
:arg mesh: the mesh used to group with. :arg mesh: the mesh used to group with.
:type mesh: :class:`Mesh` :type mesh: :class:`bpy.types.Mesh`
:return: lists of lists containing faces. :return: lists of lists containing faces.
:rtype: list :rtype: list
""" """
@ -125,9 +125,9 @@ def edge_loops_from_faces(mesh, faces=None, seams=()):
[[(0, 1), (4, 8), (3, 8)], ...] [[(0, 1), (4, 8), (3, 8)], ...]
:arg mesh: the mesh used to get edge loops from. :arg mesh: the mesh used to get edge loops from.
:type mesh: :class:`Mesh` :type mesh: :class:`bpy.types.Mesh`
:arg faces: optional face list to only use some of the meshes faces. :arg faces: optional face list to only use some of the meshes faces.
:type faces: :class:`MeshFaces`, sequence or or NoneType :type faces: :class:`bpy.types.MeshFaces`, sequence or or NoneType
:return: return a list of edge vertex index lists. :return: return a list of edge vertex index lists.
:rtype: list :rtype: list
""" """
@ -450,7 +450,7 @@ def face_random_points(num_points, faces):
:arg num_points: the number of random points to generate on each face. :arg num_points: the number of random points to generate on each face.
:type int: :type int:
:arg faces: list of the faces to generate points on. :arg faces: list of the faces to generate points on.
:type faces: :class:`MeshFaces`, sequence :type faces: :class:`bpy.types.MeshFaces`, sequence
:return: list of random points over all faces. :return: list of random points over all faces.
:rtype: list :rtype: list
""" """

@ -33,11 +33,11 @@ def add_object_align_init(context, operator):
Return a matrix using the operator settings and view context. Return a matrix using the operator settings and view context.
:arg context: The context to use. :arg context: The context to use.
:type context: :class:`Context` :type context: :class:`bpy.types.Context`
:arg operator: The operator, checked for location and rotation properties. :arg operator: The operator, checked for location and rotation properties.
:type operator: :class:`Operator` :type operator: :class:`bpy.types.Operator`
:return: the matrix from the context and settings. :return: the matrix from the context and settings.
:rtype: :class:`Matrix` :rtype: :class:`mathutils.Matrix`
""" """
from mathutils import Matrix, Vector, Euler from mathutils import Matrix, Vector, Euler
@ -92,13 +92,13 @@ def object_data_add(context, obdata, operator=None):
location, rotation and layer. location, rotation and layer.
:arg context: The context to use. :arg context: The context to use.
:type context: :class:`Context` :type context: :class:`bpy.types.Context`
:arg obdata: the data used for the new object. :arg obdata: the data used for the new object.
:type obdata: valid object data type or None. :type obdata: valid object data type or None.
:arg operator: The operator, checked for location and rotation properties. :arg operator: The operator, checked for location and rotation properties.
:type operator: :class:`Operator` :type operator: :class:`bpy.types.Operator`
:return: the newly created object in the scene. :return: the newly created object in the scene.
:rtype: :class:`ObjectBase` :rtype: :class:`bpy.types.ObjectBase`
""" """
scene = context.scene scene = context.scene

@ -31,14 +31,14 @@ def region_2d_to_vector_3d(region, rv3d, coord):
coordinate. coordinate.
:arg region: region of the 3D viewport, typically bpy.context.region. :arg region: region of the 3D viewport, typically bpy.context.region.
:type region: :class:`Region` :type region: :class:`bpy.types.Region`
:arg rv3d: 3D region data, typically bpy.context.space_data.region_3d. :arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
:type rv3d: :class:`RegionView3D` :type rv3d: :class:`bpy.types.RegionView3D`
:arg coord: 2d coordinates relative to the region: :arg coord: 2d coordinates relative to the region:
(event.mouse_region_x, event.mouse_region_y) for example. (event.mouse_region_x, event.mouse_region_y) for example.
:type coord: 2d vector :type coord: 2d vector
:return: normalized 3d vector. :return: normalized 3d vector.
:rtype: :class:`Vector` :rtype: :class:`mathutils.Vector`
""" """
from mathutils import Vector from mathutils import Vector
@ -65,9 +65,9 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
*depth_location*. *depth_location*.
:arg region: region of the 3D viewport, typically bpy.context.region. :arg region: region of the 3D viewport, typically bpy.context.region.
:type region: :class:`Region` :type region: :class:`bpy.types.Region`
:arg rv3d: 3D region data, typically bpy.context.space_data.region_3d. :arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
:type rv3d: :class:`RegionView3D` :type rv3d: :class:`bpy.types.RegionView3D`
:arg coord: 2d coordinates relative to the region; :arg coord: 2d coordinates relative to the region;
(event.mouse_region_x, event.mouse_region_y) for example. (event.mouse_region_x, event.mouse_region_y) for example.
:type coord: 2d vector :type coord: 2d vector
@ -75,7 +75,7 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location):
there is no defined depth with a 2d region input. there is no defined depth with a 2d region input.
:type depth_location: 3d vector :type depth_location: 3d vector
:return: normalized 3d vector. :return: normalized 3d vector.
:rtype: :class:`Vector` :rtype: :class:`mathutils.Vector`
""" """
from mathutils import Vector from mathutils import Vector
from mathutils.geometry import intersect_point_line from mathutils.geometry import intersect_point_line
@ -114,13 +114,13 @@ def location_3d_to_region_2d(region, rv3d, coord):
Return the *region* relative 2d location of a 3d position. Return the *region* relative 2d location of a 3d position.
:arg region: region of the 3D viewport, typically bpy.context.region. :arg region: region of the 3D viewport, typically bpy.context.region.
:type region: :class:`Region` :type region: :class:`bpy.types.Region`
:arg rv3d: 3D region data, typically bpy.context.space_data.region_3d. :arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
:type rv3d: :class:`RegionView3D` :type rv3d: :class:`bpy.types.RegionView3D`
:arg coord: 3d worldspace location. :arg coord: 3d worldspace location.
:type coord: 3d vector :type coord: 3d vector
:return: 2d location :return: 2d location
:rtype: :class:`Vector` :rtype: :class:`mathutils.Vector`
""" """
from mathutils import Vector from mathutils import Vector

@ -287,7 +287,7 @@ class EditBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup):
Transform the the bones head, tail, roll and envalope (when the matrix has a scale component). Transform the the bones head, tail, roll and envalope (when the matrix has a scale component).
:arg matrix: 3x3 or 4x4 transformation matrix. :arg matrix: 3x3 or 4x4 transformation matrix.
:type matrix: :class:`Matrix` :type matrix: :class:`mathutils.Matrix`
:arg scale: Scale the bone envalope by the matrix. :arg scale: Scale the bone envalope by the matrix.
:type scale: bool :type scale: bool
:arg roll: Correct the roll to point in the same relative direction to the head and tail. :arg roll: Correct the roll to point in the same relative direction to the head and tail.

@ -6591,9 +6591,9 @@ void pyrna_free_types(void)
PyDoc_STRVAR(pyrna_register_class_doc, PyDoc_STRVAR(pyrna_register_class_doc,
".. method:: register_class(cls)\n" ".. method:: register_class(cls)\n"
"\n" "\n"
" Register a subclass of a blender type in (:class:`Panel`,\n" " Register a subclass of a blender type in (:class:`bpy.types.Panel`,\n"
" :class:`Menu`, :class:`Header`, :class:`Operator`,\n" " :class:`bpy.types.Menu`, :class:`bpy.types.Header`, :class:`bpy.types.Operator`,\n"
" :class:`KeyingSetInfo`, :class:`RenderEngine`).\n" " :class:`bpy.types.KeyingSetInfo`, :class:`bpy.types.RenderEngine`).\n"
"\n" "\n"
" If the class has a *register* class method it will be called\n" " If the class has a *register* class method it will be called\n"
" before registration.\n" " before registration.\n"