From 324751259e229112ec31b62846de1af8f2ede104 Mon Sep 17 00:00:00 2001 From: Ines Almeida Date: Fri, 24 Apr 2015 14:08:31 +0100 Subject: correcting typos in python api docs --- doc/python_api/examples/bpy.ops.2.py | 13 ++++++++----- doc/python_api/examples/bpy.props.2.py | 2 +- doc/python_api/examples/bpy.props.py | 2 +- doc/python_api/examples/bpy.types.Menu.2.py | 7 +++---- doc/python_api/examples/bpy.types.Menu.py | 13 ++++++------- source/blender/python/intern/bpy_props.c | 7 ++++--- 6 files changed, 23 insertions(+), 21 deletions(-) diff --git a/doc/python_api/examples/bpy.ops.2.py b/doc/python_api/examples/bpy.ops.2.py index cf6df946873..87a2022e526 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 22fef5dc13a..ec9c838f5f2 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 f6bc55d6824..c199bd9b83a 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 c87b10cb6e7..26409f12f45 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 4ca18a67b78..e10e44f108e 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 `). + 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 8370aea4c99..0e9e6b74396 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 -- cgit v1.2.3