correcting typos in python api docs

This commit is contained in:
Ines Almeida 2015-04-24 14:08:31 +01:00
parent 80d75cb3e4
commit 324751259e
6 changed files with 23 additions and 21 deletions

@ -1,16 +1,19 @@
.. _operator-execution_context:
""" """
Execution Context Execution Context
----------------- -----------------
When calling an operator you may want to pass the 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 This determines the context that is given for the operator to run in, and whether
invoke() is called or execute(). invoke() is called or only execute().
'EXEC_DEFAULT' is used by default but you may want the operator to take user 'EXEC_DEFAULT' is used by default, running only the execute() method, but you may
interaction with 'INVOKE_DEFAULT'. 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_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS',
'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT', 'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT',
'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA', 'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA',

@ -3,7 +3,7 @@ PropertyGroup Example
+++++++++++++++++++++ +++++++++++++++++++++
PropertyGroups can be used for collecting custom settings into one value 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 import bpy

@ -6,7 +6,7 @@ Custom properties can be added to any subclass of an :class:`ID`,
:class:`Bone` and :class:`PoseBone`. :class:`Bone` and :class:`PoseBone`.
These properties can be animated, accessed by the user interface and python These properties can be animated, accessed by the user interface and python
like blenders existing properties. like Blender's existing properties.
""" """
import bpy import bpy

@ -1,12 +1,11 @@
""" """
Extending Menus 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. 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 :class:`Menu.draw`.
The function menu_draw acts like Menu.draw
""" """
import bpy import bpy

@ -1,21 +1,20 @@
""" """
Basic Menu Example 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. 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. convention for menus.
.. note:: .. note::
Menu subclasses must be registered before referencing them from blender. Menu subclasses must be registered before referencing them from blender.
.. note:: .. note::
Menu's have their :class:`Layout.operator_context` initialized as Menus have their :class:`Layout.operator_context` initialized as
'EXEC_REGION_WIN' rather then 'INVOKE_DEFAULT', so if the operator context 'EXEC_REGION_WIN' rather than 'INVOKE_DEFAULT' (see :ref:`Execution Context <operator-execution_context>`).
needs to initialize inputs from the :class:`Operator.invoke` function If the operator context needs to initialize inputs from the
then this needs to be explicitly set. :class:`Operator.invoke` function, then this needs to be explicitly set.
""" """
import bpy import bpy

@ -2965,9 +2965,10 @@ static struct PyMethodDef props_methods[] = {
static struct PyModuleDef props_module = { static struct PyModuleDef props_module = {
PyModuleDef_HEAD_INIT, PyModuleDef_HEAD_INIT,
"bpy.props", "bpy.props",
"This module defines properties to extend blenders internal data, the result of these functions" "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" " 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.", "\n"
".. warning:: All parameters to these functions must be passed as keywords.\n",
-1, /* multiple "initialization" just copies the module dict. */ -1, /* multiple "initialization" just copies the module dict. */
props_methods, props_methods,
NULL, NULL, NULL, NULL NULL, NULL, NULL, NULL