Cleanup: spelling in build-files & docs
This commit is contained in:
@@ -4,7 +4,7 @@ Operator Example
|
||||
|
||||
A common use of custom properties is for python based :class:`Operator`
|
||||
classes. Test this code by running it in the text editor, or by clicking the
|
||||
button in the 3D Viewport's Tools panel. The latter will show the properties
|
||||
button in the 3D View-port's Tools panel. The latter will show the properties
|
||||
in the Redo panel and allow you to change them.
|
||||
"""
|
||||
import bpy
|
||||
|
||||
@@ -13,7 +13,7 @@ animation or modifiers into account:
|
||||
|
||||
- For meshes this is similar to duplicating the source mesh.
|
||||
- For curves this disables own modifiers, and modifiers of objects used as bevel and taper.
|
||||
- For metaballs this produces an empty mesh since polygonization is done as a modifier evaluation.
|
||||
- For meta-balls this produces an empty mesh since polygonization is done as a modifier evaluation.
|
||||
|
||||
When is used on evaluated object all modifiers are taken into account.
|
||||
|
||||
|
||||
@@ -18,17 +18,17 @@ class SubMenu(bpy.types.Menu):
|
||||
layout.operator("object.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("object.select_random", text="Random")
|
||||
|
||||
# access this operator as a submenu
|
||||
# Access this operator as a sub-menu.
|
||||
layout.operator_menu_enum("object.select_by_type", "type", text="Select All by Type...")
|
||||
|
||||
layout.separator()
|
||||
|
||||
# expand each operator option into this menu
|
||||
# Expand each operator option into this menu.
|
||||
layout.operator_enum("object.light_add", "type")
|
||||
|
||||
layout.separator()
|
||||
|
||||
# use existing memu
|
||||
# Use existing menu.
|
||||
layout.menu("VIEW3D_MT_transform")
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class CustomRenderEngine(bpy.types.RenderEngine):
|
||||
self.size_x = int(scene.render.resolution_x * scale)
|
||||
self.size_y = int(scene.render.resolution_y * scale)
|
||||
|
||||
# Fill the render result with a flat color. The framebuffer is
|
||||
# Fill the render result with a flat color. The frame-buffer is
|
||||
# defined as a list of pixels, each pixel itself being a list of
|
||||
# R,G,B,A values.
|
||||
if self.is_preview:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
Copy Offscreen Rendering result back to RAM
|
||||
-------------------------------------------
|
||||
Copy Off-screen Rendering result back to RAM
|
||||
--------------------------------------------
|
||||
|
||||
This will create a new image with the given name.
|
||||
If it already exists, it will override the existing one.
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
import mathutils
|
||||
import math
|
||||
|
||||
# create a location matrix
|
||||
# Create a location matrix.
|
||||
mat_loc = mathutils.Matrix.Translation((2.0, 3.0, 4.0))
|
||||
|
||||
# create an identitiy matrix
|
||||
# Create an identity matrix.
|
||||
mat_sca = mathutils.Matrix.Scale(0.5, 4, (0.0, 0.0, 1.0))
|
||||
|
||||
# create a rotation matrix
|
||||
# Create a rotation matrix.
|
||||
mat_rot = mathutils.Matrix.Rotation(math.radians(45.0), 4, 'X')
|
||||
|
||||
# combine transformations
|
||||
# Combine transformations.
|
||||
mat_out = mat_loc @ mat_rot @ mat_sca
|
||||
print(mat_out)
|
||||
|
||||
# extract components back out of the matrix as two vectors and a quaternion
|
||||
# Extract components back out of the matrix as two vectors and a quaternion.
|
||||
loc, rot, sca = mat_out.decompose()
|
||||
print(loc, rot, sca)
|
||||
|
||||
# recombine extracted components
|
||||
# Recombine extracted components.
|
||||
mat_out2 = mathutils.Matrix.LocRotScale(loc, rot, sca)
|
||||
print(mat_out2)
|
||||
|
||||
# it can also be useful to access components of a matrix directly
|
||||
# It can also be useful to access components of a matrix directly.
|
||||
mat = mathutils.Matrix()
|
||||
mat[0][0], mat[1][0], mat[2][0] = 0.0, 1.0, 2.0
|
||||
|
||||
mat[0][0:3] = 0.0, 1.0, 2.0
|
||||
|
||||
# each item in a matrix is a vector so vector utility functions can be used
|
||||
# Each item in a matrix is a vector so vector utility functions can be used.
|
||||
mat[0].xyz = 0.0, 1.0, 2.0
|
||||
|
||||
Reference in New Issue
Block a user