API: Fix rst syntax
This commit is contained in:
parent
42e4b0955c
commit
13174df534
@ -19,7 +19,7 @@ This is a typical Python environment so tutorials on how to write Python scripts
|
|||||||
will work running the scripts in Blender too.
|
will work running the scripts in Blender too.
|
||||||
Blender provides the :mod:`bpy` module to the Python interpreter.
|
Blender provides the :mod:`bpy` module to the Python interpreter.
|
||||||
This module can be imported in a script and gives access to Blender data, classes, and functions.
|
This module can be imported in a script and gives access to Blender data, classes, and functions.
|
||||||
Scripts that deal with Blender data will need to import this module.
|
Scripts that deal with Blender data will need to import this module.
|
||||||
|
|
||||||
Here is a simple example of moving a vertex of the object named **Cube**:
|
Here is a simple example of moving a vertex of the object named **Cube**:
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ To run as modules:
|
|||||||
|
|
||||||
|
|
||||||
Add-ons
|
Add-ons
|
||||||
------
|
-------
|
||||||
|
|
||||||
Some of Blenders functionality is best kept optional,
|
Some of Blenders functionality is best kept optional,
|
||||||
alongside scripts loaded at startup we have add-ons which are kept in their own directory ``scripts/addons``,
|
alongside scripts loaded at startup we have add-ons which are kept in their own directory ``scripts/addons``,
|
||||||
@ -213,7 +213,7 @@ A simple Blender/Python module can look like this:
|
|||||||
bpy.utils.register_class(SimpleOperator)
|
bpy.utils.register_class(SimpleOperator)
|
||||||
|
|
||||||
def unregister():
|
def unregister():
|
||||||
bpy.utils.unregister_class(SimpleOperator)
|
bpy.utils.unregister_class(SimpleOperator)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
register()
|
register()
|
||||||
@ -327,7 +327,7 @@ Say you want to store material settings for a custom engine.
|
|||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
*The class must be registered before being used in a property, failing to do so will raise an error:*
|
*The class must be registered before being used in a property, failing to do so will raise an error:*
|
||||||
|
|
||||||
``ValueError: bpy_struct "Material" registration error: my_custom_props could not register``
|
``ValueError: bpy_struct "Material" registration error: my_custom_props could not register``
|
||||||
|
|
||||||
|
|
||||||
@ -429,4 +429,3 @@ Calling these operators:
|
|||||||
>>> bpy.ops.object.operator_2()
|
>>> bpy.ops.object.operator_2()
|
||||||
Hello World OBJECT_OT_operator_2
|
Hello World OBJECT_OT_operator_2
|
||||||
{'FINISHED'}
|
{'FINISHED'}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user