[Bf-blender-cvs] [3247512] master: correcting typos in python api docs
Ines Almeida
noreply at git.blender.org
Fri Apr 24 15:09:02 CEST 2015
Commit: 324751259e229112ec31b62846de1af8f2ede104
Author: Ines Almeida
Date: Fri Apr 24 14:08:31 2015 +0100
Branches: master
https://developer.blender.org/rB324751259e229112ec31b62846de1af8f2ede104
correcting typos in python api docs
===================================================================
M doc/python_api/examples/bpy.ops.2.py
M doc/python_api/examples/bpy.props.2.py
M doc/python_api/examples/bpy.props.py
M doc/python_api/examples/bpy.types.Menu.2.py
M doc/python_api/examples/bpy.types.Menu.py
M source/blender/python/intern/bpy_props.c
===================================================================
diff --git a/doc/python_api/examples/bpy.ops.2.py b/doc/python_api/examples/bpy.ops.2.py
index cf6df94..87a2022 100644
--- a/doc/python_api/examples/bpy.ops.2.py
+++ b/doc/python_api/examples/bpy.ops.2.py
@@ -1,16 +1,19 @@
+.. _operator-execution_context:
+
"""
Execution Context
-----------------
When calling an operator you may want to pass the execution context.
-This determines the context thats given to the operator to run in, and weather
-invoke() is called or execute().
+This determines the context that is given for the operator to run in, and whether
+invoke() is called or only execute().
-'EXEC_DEFAULT' is used by default but you may want the operator to take user
-interaction with 'INVOKE_DEFAULT'.
+'EXEC_DEFAULT' is used by default, running only the execute() method, but you may
+want the operator to take user interaction with 'INVOKE_DEFAULT' which will also
+call invoke() if existing.
-The execution context is as a non keyword, string argument in:
+The execution context is one of:
('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS',
'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT',
'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA',
diff --git a/doc/python_api/examples/bpy.props.2.py b/doc/python_api/examples/bpy.props.2.py
index 22fef5d..ec9c838 100644
--- a/doc/python_api/examples/bpy.props.2.py
+++ b/doc/python_api/examples/bpy.props.2.py
@@ -3,7 +3,7 @@ PropertyGroup Example
+++++++++++++++++++++
PropertyGroups can be used for collecting custom settings into one value
-to avoid many indervidual settings mixed in together.
+to avoid many individual settings mixed in together.
"""
import bpy
diff --git a/doc/python_api/examples/bpy.props.py b/doc/python_api/examples/bpy.props.py
index f6bc55d..c199bd9 100644
--- a/doc/python_api/examples/bpy.props.py
+++ b/doc/python_api/examples/bpy.props.py
@@ -6,7 +6,7 @@ Custom properties can be added to any subclass of an :class:`ID`,
:class:`Bone` and :class:`PoseBone`.
These properties can be animated, accessed by the user interface and python
-like blenders existing properties.
+like Blender's existing properties.
"""
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 c87b10c..26409f1 100644
--- a/doc/python_api/examples/bpy.types.Menu.2.py
+++ b/doc/python_api/examples/bpy.types.Menu.2.py
@@ -1,12 +1,11 @@
"""
Extending Menus
+++++++++++++++
-When creating menus for addons you can't reference menus in blenders default
+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.
-Instead the addon can add menu items to existing menus.
-
-The function menu_draw acts like Menu.draw
+The function menu_draw acts like :class:`Menu.draw`.
"""
import bpy
diff --git a/doc/python_api/examples/bpy.types.Menu.py b/doc/python_api/examples/bpy.types.Menu.py
index 4ca18a6..e10e44f 100644
--- a/doc/python_api/examples/bpy.types.Menu.py
+++ b/doc/python_api/examples/bpy.types.Menu.py
@@ -1,21 +1,20 @@
"""
Basic Menu Example
++++++++++++++++++
-This script is a simple menu, menus differ from panels in that they must
+Here is an example of a simple menu. Menus differ from panels in that they must
reference from a header, panel or another menu.
-Notice the 'CATEGORY_MT_name' :class:`Menu.bl_idname`, this is a naming
+Notice the 'CATEGORY_MT_name' in :class:`Menu.bl_idname`, this is a naming
convention for menus.
.. note::
-
Menu subclasses must be registered before referencing them from blender.
.. note::
- Menu's have their :class:`Layout.operator_context` initialized as
- 'EXEC_REGION_WIN' rather then 'INVOKE_DEFAULT', so if the operator context
- needs to initialize inputs from the :class:`Operator.invoke` function
- then this needs to be explicitly set.
+ Menus have their :class:`Layout.operator_context` initialized as
+ 'EXEC_REGION_WIN' rather than 'INVOKE_DEFAULT' (see :ref:`Execution Context <operator-execution_context>`).
+ If the operator context needs to initialize inputs from the
+ :class:`Operator.invoke` function, then this needs to be explicitly set.
"""
import bpy
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 8370aea..0e9e6b7 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -2965,9 +2965,10 @@ static struct PyMethodDef props_methods[] = {
static struct PyModuleDef props_module = {
PyModuleDef_HEAD_INIT,
"bpy.props",
- "This module defines properties to extend blenders internal data, the result of these functions"
- " is used to assign properties to classes registered with blender and can't be used directly.\n"
- ".. warning:: All parameters to these functions must be passed as keywords.",
+ "This module defines properties to extend Blender's internal data. The result of these functions"
+ " is used to assign properties to classes registered with Blender and can't be used directly.\n"
+ "\n"
+ ".. warning:: All parameters to these functions must be passed as keywords.\n",
-1, /* multiple "initialization" just copies the module dict. */
props_methods,
NULL, NULL, NULL, NULL
More information about the Bf-blender-cvs
mailing list