y = bpy.props.IntProperty()
def execute(self, context):
- # rather then printing, use the report function,
+ # rather than printing, use the report function,
# this way the message appears in the header,
self.report({'INFO'}, "Mouse coords are %d %d" % (self.x, self.y))
return {'FINISHED'}
"""
Note that when keying data paths which contain nested properties this must be
done from the :class:`ID` subclass, in this case the :class:`Armature` rather
-then the bone.
+than the bone.
"""
import bpy
.. note::
- A value of 0.0 disables this option (rather then setting it stationary).
+ A value of 0.0 disables this option (rather than setting it stationary).
.. attribute:: angularVelocityMin
- :class:`bpy.types.MeshPolygon` -
this is the data structure which now stores faces in object mode
- (access as ``mesh.polygons`` rather then ``mesh.faces``).
+ (access as ``mesh.polygons`` rather than ``mesh.faces``).
- :class:`bpy.types.MeshTessFace` -
the result of triangulating (tessellated) polygons,
the main method of face access in 2.62 or older (access as ``mesh.tessfaces``).
# normally some code, or function calls...
- # use own dictionary rather then bpy.data
+ # use own dictionary rather than bpy.data
mesh = mesh_name_mapping[meshid]
When using blender data from linked libraries there is an unfortunate complication
-since the path will be relative to the library rather then the open blend file.
+since the path will be relative to the library rather than the open blend file.
When the data block may be from an external blend file pass the library argument from the :class:`bpy.types.ID`.
>>> bpy.path.abspath(image.filepath, library=image.library)
point.co = 1.0, 2.0, 3.0
This can be avoided by re-assigning the point variables after adding the new one or by storing
-indices's to the points rather then the points themselves.
+indices's to the points rather than the points themselves.
The best way is to sidestep the problem altogether add all the points to the curve at once.
This means you don't have to worry about array re-allocation and its faster too
mesh = bpy.data.meshes.new(name="MyMesh")
# normally the script would use the mesh here...
bpy.data.meshes.remove(mesh)
- print(mesh.name) # <- give an exception rather then crashing:
+ print(mesh.name) # <- give an exception rather than crashing:
# ReferenceError: StructRNA of type Mesh has been removed
Both the *Text Editor* and *Python Console* are space types you can select from the view header.
-Rather then manually configuring your spaces for Python development,
+Rather than manually configuring your spaces for Python development,
you may prefer to use the *Scripting* screen, included default with Blender,
accessible from the top headers screen selector.
so here are 2 ways you can easily use an external file from Blender.
Using the following examples you'll still need textblock in Blender to execute,
-but reference an external file rather then including it directly.
+but reference an external file rather than including it directly.
Executing External Scripts
Since it's possible to access data which has been removed (see Gotcha's),
this can be hard to track down the cause of crashes.
-To raise Python exceptions on accessing freed data (rather then crashing),
+To raise Python exceptions on accessing freed data (rather than crashing),
enable the CMake build option WITH_PYTHON_SAFETY.
This enables data tracking which makes data access about 2x slower
PyDoc_STRVAR(pyrna_prop_as_bytes_doc,
".. method:: as_bytes()\n"
"\n"
-" Returns this string property as a byte rather then a python string.\n"
+" Returns this string property as a byte rather than a python string.\n"
"\n"
" :return: The string as bytes.\n"
" :rtype: bytes\n"