Cleanup: spelling in build-files & docs
This commit is contained in:
parent
cb83a41dc4
commit
9d4b48b107
@ -16,7 +16,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
# Strip version numbers from dependenciesm macOS notarizatiom fails
|
# Strip version numbers from dependencies macOS notarizatiom fails
|
||||||
# with version symlinks.
|
# with version symlinks.
|
||||||
def strip_lib_version(name):
|
def strip_lib_version(name):
|
||||||
name = re.sub(r'(\.[0-9]+)+.dylib', '.dylib', name)
|
name = re.sub(r'(\.[0-9]+)+.dylib', '.dylib', name)
|
||||||
@ -41,10 +41,10 @@ def main():
|
|||||||
file = pathlib.Path(file)
|
file = pathlib.Path(file)
|
||||||
new_file = pathlib.Path(new_file)
|
new_file = pathlib.Path(new_file)
|
||||||
|
|
||||||
# Update cmake config files.
|
# Update CMake configuration files.
|
||||||
update_cmake_config(file, new_file)
|
update_cmake_config(file, new_file)
|
||||||
|
|
||||||
# Remove if symlink.
|
# Remove if symbolic-link.
|
||||||
if file.is_symlink():
|
if file.is_symlink():
|
||||||
os.remove(file)
|
os.remove(file)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
@ -535,8 +535,8 @@ DEPS_OPTIONAL_SUBPACKAGES = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Python packages that should be available for Blender pyscripts.
|
# Python packages that should be available for Blender Pythons-scripts.
|
||||||
# Suse uses names like `python310-Cython` for its python module packages...
|
# SUSE uses names like `python310-Cython` for its python module packages...
|
||||||
def suse_pypackages_name_gen(name):
|
def suse_pypackages_name_gen(name):
|
||||||
def _gen(package, parent_packages):
|
def _gen(package, parent_packages):
|
||||||
pp = parent_packages[-1]
|
pp = parent_packages[-1]
|
||||||
@ -871,9 +871,9 @@ PACKAGES_ALL = (
|
|||||||
),
|
),
|
||||||
Package(name="NanoVDB Library", is_mandatory=False,
|
Package(name="NanoVDB Library", is_mandatory=False,
|
||||||
distro_package_names={DISTRO_ID_DEBIAN: "libnanovdb-dev",
|
distro_package_names={DISTRO_ID_DEBIAN: "libnanovdb-dev",
|
||||||
DISTRO_ID_FEDORA: ..., # Part of openvdb package.
|
DISTRO_ID_FEDORA: ..., # Part of OpenVDB package.
|
||||||
DISTRO_ID_SUSE: None,
|
DISTRO_ID_SUSE: None,
|
||||||
DISTRO_ID_ARCH: ..., # Part of openvdb package.
|
DISTRO_ID_ARCH: ..., # Part of OpenVDB package.
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -242,7 +242,7 @@ def git_update_submodule(git_command: str, submodule_dir: Path) -> bool:
|
|||||||
#
|
#
|
||||||
# https://github.com/git/git/commit/7a132c628e57b9bceeb88832ea051395c0637b16
|
# https://github.com/git/git/commit/7a132c628e57b9bceeb88832ea051395c0637b16
|
||||||
#
|
#
|
||||||
# Doing "git lfs pull" after checkout with GIT_LFS_SKIP_SMUDGE=true seems to be the
|
# Doing `git lfs pull` after checkout with `GIT_LFS_SKIP_SMUDGE=true` seems to be the
|
||||||
# valid process. For example, https://www.mankier.com/7/git-lfs-faq
|
# valid process. For example, https://www.mankier.com/7/git-lfs-faq
|
||||||
|
|
||||||
env = {"GIT_LFS_SKIP_SMUDGE": "1"}
|
env = {"GIT_LFS_SKIP_SMUDGE": "1"}
|
||||||
|
@ -107,8 +107,8 @@ def Align(handle):
|
|||||||
|
|
||||||
class BlendFile:
|
class BlendFile:
|
||||||
'''
|
'''
|
||||||
Reads a blendfile and store the header, all the fileblocks, and catalogue
|
Reads a blend-file and store the header, all the file-blocks, and catalogue
|
||||||
structs found in the DNA fileblock
|
structs found in the DNA file-block
|
||||||
|
|
||||||
- BlendFile.Header (BlendFileHeader instance)
|
- BlendFile.Header (BlendFileHeader instance)
|
||||||
- BlendFile.Blocks (list of BlendFileBlock instances)
|
- BlendFile.Blocks (list of BlendFileBlock instances)
|
||||||
|
@ -4,7 +4,7 @@ Operator Example
|
|||||||
|
|
||||||
A common use of custom properties is for python based :class:`Operator`
|
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
|
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.
|
in the Redo panel and allow you to change them.
|
||||||
"""
|
"""
|
||||||
import bpy
|
import bpy
|
||||||
|
@ -13,7 +13,7 @@ animation or modifiers into account:
|
|||||||
|
|
||||||
- For meshes this is similar to duplicating the source mesh.
|
- 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 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.
|
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_all", text="Inverse").action = 'INVERT'
|
||||||
layout.operator("object.select_random", text="Random")
|
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.operator_menu_enum("object.select_by_type", "type", text="Select All by Type...")
|
||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
# expand each operator option into this menu
|
# Expand each operator option into this menu.
|
||||||
layout.operator_enum("object.light_add", "type")
|
layout.operator_enum("object.light_add", "type")
|
||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
# use existing memu
|
# Use existing menu.
|
||||||
layout.menu("VIEW3D_MT_transform")
|
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_x = int(scene.render.resolution_x * scale)
|
||||||
self.size_y = int(scene.render.resolution_y * 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
|
# defined as a list of pixels, each pixel itself being a list of
|
||||||
# R,G,B,A values.
|
# R,G,B,A values.
|
||||||
if self.is_preview:
|
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.
|
This will create a new image with the given name.
|
||||||
If it already exists, it will override the existing one.
|
If it already exists, it will override the existing one.
|
||||||
|
@ -1,32 +1,32 @@
|
|||||||
import mathutils
|
import mathutils
|
||||||
import math
|
import math
|
||||||
|
|
||||||
# create a location matrix
|
# Create a location matrix.
|
||||||
mat_loc = mathutils.Matrix.Translation((2.0, 3.0, 4.0))
|
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))
|
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')
|
mat_rot = mathutils.Matrix.Rotation(math.radians(45.0), 4, 'X')
|
||||||
|
|
||||||
# combine transformations
|
# Combine transformations.
|
||||||
mat_out = mat_loc @ mat_rot @ mat_sca
|
mat_out = mat_loc @ mat_rot @ mat_sca
|
||||||
print(mat_out)
|
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()
|
loc, rot, sca = mat_out.decompose()
|
||||||
print(loc, rot, sca)
|
print(loc, rot, sca)
|
||||||
|
|
||||||
# recombine extracted components
|
# Recombine extracted components.
|
||||||
mat_out2 = mathutils.Matrix.LocRotScale(loc, rot, sca)
|
mat_out2 = mathutils.Matrix.LocRotScale(loc, rot, sca)
|
||||||
print(mat_out2)
|
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 = mathutils.Matrix()
|
||||||
mat[0][0], mat[1][0], mat[2][0] = 0.0, 1.0, 2.0
|
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
|
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
|
mat[0].xyz = 0.0, 1.0, 2.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user