[Bf-blender-cvs] [f184202] master: Cleanup: API docs

Campbell Barton noreply at git.blender.org
Tue Sep 8 11:48:29 CEST 2015


Commit: f184202a9af1599e8d504e0c2991a829da6fae48
Author: Campbell Barton
Date:   Tue Sep 8 14:30:05 2015 +1000
Branches: master
https://developer.blender.org/rBf184202a9af1599e8d504e0c2991a829da6fae48

Cleanup: API docs

===================================================================

M	doc/python_api/examples/aud.py
M	doc/python_api/examples/bge.texture.1.py
M	doc/python_api/examples/bpy.app.handlers.py
M	doc/python_api/examples/bpy.ops.1.py
M	doc/python_api/examples/bpy.ops.py
M	doc/python_api/examples/bpy.types.AddonPreferences.1.py
M	doc/python_api/examples/bpy.types.Menu.1.py
M	doc/python_api/examples/bpy.types.Menu.2.py
M	doc/python_api/examples/bpy.types.Menu.py
M	doc/python_api/examples/bpy.types.Mesh.py
M	doc/python_api/examples/bpy.types.NodeTree.py
M	doc/python_api/examples/bpy.types.Object.py
M	doc/python_api/examples/bpy.types.Operator.1.py
M	doc/python_api/examples/bpy.types.Operator.2.py
M	doc/python_api/examples/bpy.types.Operator.3.py
M	doc/python_api/examples/bpy.types.Operator.4.py
M	doc/python_api/examples/bpy.types.Operator.5.py
M	doc/python_api/examples/bpy.types.Operator.py
M	doc/python_api/examples/bpy.types.Panel.1.py
M	doc/python_api/examples/bpy.types.Panel.py
M	doc/python_api/examples/bpy.types.UIList.2.py

===================================================================

diff --git a/doc/python_api/examples/aud.py b/doc/python_api/examples/aud.py
index 2c74d6a..bbe9716 100644
--- a/doc/python_api/examples/aud.py
+++ b/doc/python_api/examples/aud.py
@@ -1,6 +1,7 @@
 """
 Basic Sound Playback
 ++++++++++++++++++++
+
 This script shows how to use the classes: :class:`Device`, :class:`Factory` and
 :class:`Handle`.
 """
diff --git a/doc/python_api/examples/bge.texture.1.py b/doc/python_api/examples/bge.texture.1.py
index bee1f25..732c786 100644
--- a/doc/python_api/examples/bge.texture.1.py
+++ b/doc/python_api/examples/bge.texture.1.py
@@ -1,6 +1,7 @@
 """
 Texture Replacement
 +++++++++++++++++++
+
 Example of how to replace a texture in game with an external image.
 ``createTexture()`` and ``removeTexture()`` are to be called from a
 module Python Controller.
diff --git a/doc/python_api/examples/bpy.app.handlers.py b/doc/python_api/examples/bpy.app.handlers.py
index 57b209e..078f9df 100644
--- a/doc/python_api/examples/bpy.app.handlers.py
+++ b/doc/python_api/examples/bpy.app.handlers.py
@@ -1,6 +1,7 @@
 """
 Basic Handler Example
 +++++++++++++++++++++
+
 This script shows the most simple example of adding a handler.
 """
 
diff --git a/doc/python_api/examples/bpy.ops.1.py b/doc/python_api/examples/bpy.ops.1.py
index a00dbda..b4137e5 100644
--- a/doc/python_api/examples/bpy.ops.1.py
+++ b/doc/python_api/examples/bpy.ops.1.py
@@ -7,8 +7,9 @@ act on specified rather than the selected or active data, or to execute an
 operator in the different part of the user interface.
 
 The context overrides are passed as a dictionary, with keys matching the context
-member names in bpy.context. For example to override bpy.context.active_object,
-you would pass {'active_object': object}.
+member names in bpy.context.
+For example to override ``bpy.context.active_object``,
+you would pass ``{'active_object': object}``.
 """
 
 # remove all objects in scene rather than the selected ones
diff --git a/doc/python_api/examples/bpy.ops.py b/doc/python_api/examples/bpy.ops.py
index 9964ad9..76c494a 100644
--- a/doc/python_api/examples/bpy.ops.py
+++ b/doc/python_api/examples/bpy.ops.py
@@ -3,21 +3,21 @@ Calling Operators
 -----------------
 
 Provides python access to calling operators, this includes operators written in
-C, Python or Macros.
+C, Python or macros.
 
 Only keyword arguments can be used to pass operator properties.
 
-Operators don't have return values as you might expect, instead they return a
-set() which is made up of: {'RUNNING_MODAL', 'CANCELLED', 'FINISHED',
-'PASS_THROUGH'}.
-Common return values are {'FINISHED'} and {'CANCELLED'}.
+Operators don't have return values as you might expect,
+instead they return a set() which is made up of:
+``{'RUNNING_MODAL', 'CANCELLED', 'FINISHED', 'PASS_THROUGH'}``.
+Common return values are ``{'FINISHED'}`` and ``{'CANCELLED'}``.
 
 
-Calling an operator in the wrong context will raise a RuntimeError,
+Calling an operator in the wrong context will raise a ``RuntimeError``,
 there is a poll() method to avoid this problem.
 
-Note that the operator ID (bl_idname) in this example is 'mesh.subdivide',
-'bpy.ops' is just the access path for python.
+Note that the operator ID (bl_idname) in this example is ``mesh.subdivide``,
+``bpy.ops`` is just the access path for python.
 
 
 Keywords and Positional Arguments
@@ -32,9 +32,9 @@ There are 3 optional positional arguments (documented in detail below).
 
    bpy.ops.test.operator(override_context, execution_context, undo)
 
-* override_context - dict type
-* execution_context - string (enum)
-* undo - boolean
+- override_context - ``dict`` type.
+- execution_context - ``str`` (enum).
+- undo - ``bool`` type.
 
 
 Each of these arguments is optional, but must be given in the order above.
diff --git a/doc/python_api/examples/bpy.types.AddonPreferences.1.py b/doc/python_api/examples/bpy.types.AddonPreferences.1.py
index 73f90ac..7a065db 100644
--- a/doc/python_api/examples/bpy.types.AddonPreferences.1.py
+++ b/doc/python_api/examples/bpy.types.AddonPreferences.1.py
@@ -8,7 +8,8 @@ bl_info = {
     "warning": "",
     "wiki_url": "",
     "tracker_url": "",
-    "category": "Object"}
+    "category": "Object",
+    }
 
 
 import bpy
diff --git a/doc/python_api/examples/bpy.types.Menu.1.py b/doc/python_api/examples/bpy.types.Menu.1.py
index e82bf39..8ccc112 100644
--- a/doc/python_api/examples/bpy.types.Menu.1.py
+++ b/doc/python_api/examples/bpy.types.Menu.1.py
@@ -1,6 +1,7 @@
 """
 Submenus
 ++++++++
+
 This menu demonstrates some different functions.
 """
 import bpy
diff --git a/doc/python_api/examples/bpy.types.Menu.2.py b/doc/python_api/examples/bpy.types.Menu.2.py
index 26409f1..86288b5 100644
--- a/doc/python_api/examples/bpy.types.Menu.2.py
+++ b/doc/python_api/examples/bpy.types.Menu.2.py
@@ -1,6 +1,7 @@
 """
 Extending Menus
 +++++++++++++++
+
 When creating menus for addons you can't reference menus in Blender's default
 scripts.
 Instead, the addon can add menu items to existing menus.
diff --git a/doc/python_api/examples/bpy.types.Menu.py b/doc/python_api/examples/bpy.types.Menu.py
index e10e44f..c216244 100644
--- a/doc/python_api/examples/bpy.types.Menu.py
+++ b/doc/python_api/examples/bpy.types.Menu.py
@@ -1,6 +1,7 @@
 """
 Basic Menu Example
 ++++++++++++++++++
+
 Here is an example of a simple menu. Menus differ from panels in that they must
 reference from a header, panel or another menu.
 
diff --git a/doc/python_api/examples/bpy.types.Mesh.py b/doc/python_api/examples/bpy.types.Mesh.py
index 19ccd17..68cc42e 100644
--- a/doc/python_api/examples/bpy.types.Mesh.py
+++ b/doc/python_api/examples/bpy.types.Mesh.py
@@ -7,10 +7,10 @@ for more flexible mesh editing from python see :mod:`bmesh`.
 
 Blender stores 4 main arrays to define mesh geometry.
 
-* :class:`Mesh.vertices` (3 points in space)
-* :class:`Mesh.edges` (reference 2 vertices)
-* :class:`Mesh.loops` (reference a single vertex and edge)
-* :class:`Mesh.polygons`: (reference a range of loops)
+- :class:`Mesh.vertices` (3 points in space)
+- :class:`Mesh.edges` (reference 2 vertices)
+- :class:`Mesh.loops` (reference a single vertex and edge)
+- :class:`Mesh.polygons`: (reference a range of loops)
 
 
 Each polygon reference a slice in the loop array, this way, polygons do not store vertices or corner data such as UV's directly,
diff --git a/doc/python_api/examples/bpy.types.NodeTree.py b/doc/python_api/examples/bpy.types.NodeTree.py
index 401b3a0..da29866 100644
--- a/doc/python_api/examples/bpy.types.NodeTree.py
+++ b/doc/python_api/examples/bpy.types.NodeTree.py
@@ -1,6 +1,7 @@
 """
 Poll Function
 +++++++++++++++
+
 The :class:`NodeTree.poll` function determines if a node tree is visible
 in the given context (similar to how :class:`Panel.poll`
 and :class:`Menu.poll` define visibility). If it returns False,
diff --git a/doc/python_api/examples/bpy.types.Object.py b/doc/python_api/examples/bpy.types.Object.py
index 2ddce24..90c50bc 100644
--- a/doc/python_api/examples/bpy.types.Object.py
+++ b/doc/python_api/examples/bpy.types.Object.py
@@ -1,6 +1,7 @@
 """
 Basic Object Operations Example
 +++++++++++++++++++++++++++++++
+
 This script demonstrates basic operations on object like creating new
 object, placing it into scene, selecting it and making it active.
 """
diff --git a/doc/python_api/examples/bpy.types.Operator.1.py b/doc/python_api/examples/bpy.types.Operator.1.py
index f007cdf..1ba13c0 100644
--- a/doc/python_api/examples/bpy.types.Operator.1.py
+++ b/doc/python_api/examples/bpy.types.Operator.1.py
@@ -1,6 +1,7 @@
 """
 Invoke Function
 +++++++++++++++
+
 :class:`Operator.invoke` is used to initialize the operator from the context
 at the moment the operator is called.
 invoke() is typically used to assign properties which are then used by
diff --git a/doc/python_api/examples/bpy.types.Operator.2.py b/doc/python_api/examples/bpy.types.Operator.2.py
index 39ff5ca..e2f9a3a 100644
--- a/doc/python_api/examples/bpy.types.Operator.2.py
+++ b/doc/python_api/examples/bpy.types.Operator.2.py
@@ -4,7 +4,7 @@ Calling a File Selector
 This example shows how an operator can use the file selector.
 
 Notice the invoke function calls a window manager method and returns
-RUNNING_MODAL, this means the file selector stays open and the operator does not
+``{'RUNNING_MODAL'}``, this means the file selector stays open and the operator does not
 exit immediately after invoke finishes.
 
 The file selector runs the operator, calling :class:`Operator.execute` when the
diff --git a/doc/python_api/examples/bpy.types.Operator.3.py b/doc/python_api/examples/bpy.types.Operator.3.py
index 7fdccd8..d59c816 100644
--- a/doc/python_api/examples/bpy.types.Operator.3.py
+++ b/doc/python_api/examples/bpy.types.Operator.3.py
@@ -1,6 +1,7 @@
 """
 Dialog Box
 ++++++++++
+
 This operator uses its :class:`Operator.invoke` function to call a popup.
 """
 import bpy
diff --git a/doc/python_api/examples/bpy.types.Operator.4.py b/doc/python_api/examples/bpy.types.Operator.4.py
index 885ed85..e5bc6e5 100644
--- a/doc/python_api/examples/bpy.types.Operator.4.py
+++ b/doc/python_api/examples/bpy.types.Operator.4.py
@@ -1,6 +1,7 @@
 """
 Custom Drawing
 ++++++++++++++
+
 By default operator properties use an automatic user interface layout.
 If you need more control you can create your own layout with a
 :class:`Operator.draw` function.
diff --git a/doc/python_api/examples/bpy.types.Operator.5.py b/doc/python_api/examples/bpy.types.Operator.5.py
index 78030c7..310eece 100644
--- a/doc/python_api/examples/bpy.types.Operator.5.py
+++ b/doc/python_api/examples/bpy.types.Operator.5.py
@@ -1,8 +1,9 @@
 """
 Modal Execution
 +++++++++++++++
+
 This operator defines a :class:`Operator.modal` function which running,
-handling events until it returns {'FINISHED'} or {'CANCELLED'}.
+handling events until it returns ``{'FINISHED'}`` or ``{'CANCELLED'}``.
 
 Grab, Rotate, Scale and Fly-Mode are examples of modal operators.
 They are especially useful for interactive tools,
@@ -10,9 +11,9 @@ your operator can have its own state where keys toggle options as the operator
 runs.
 
 :class:`Operator.invoke` is used to initialize the operator as being by
-returning {'RUNNING_MODAL'}, initializing the modal loop.
+

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list