Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSebastián Barschkis <sebbas@sebbas.org>2019-09-25 16:02:47 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2019-09-25 16:02:47 +0300
commit2a789871e2c31f8268a33ae6b63a909d1da7b29a (patch)
tree05563d23173223707c0a2f9aebe51d6f10926fa8 /doc
parentf1c3777fb947eaa7683a737cd8e045e35e2184d0 (diff)
parent900a9a4b06a6d8deb2465c2b4b9f3fb9e7fc1bdd (diff)
Merge branch 'master' into fluid-mantaflow
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/manpage/blender.1.py21
-rw-r--r--doc/python_api/examples/bpy.types.Depsgraph.1.py2
-rw-r--r--doc/python_api/examples/bpy.types.UIList.2.py1
-rw-r--r--doc/python_api/rst/info_tips_and_tricks.rst2
4 files changed, 16 insertions, 10 deletions
diff --git a/doc/manpage/blender.1.py b/doc/manpage/blender.1.py
index 4be16c15ec7..fc2200ab859 100755
--- a/doc/manpage/blender.1.py
+++ b/doc/manpage/blender.1.py
@@ -30,11 +30,11 @@ and <output-filename> is where to write the generated man page.
# <pep8 compliant>
+import os
import subprocess
import sys
import time
-import datetime
def man_format(data):
@@ -52,11 +52,18 @@ outfilename = sys.argv[2]
cmd = [blender_bin, "--help"]
print(" executing:", " ".join(cmd))
-blender_help = subprocess.check_output(cmd).decode(encoding="utf-8")
-blender_version = subprocess.check_output([blender_bin, "--version"]).decode(encoding="utf-8").strip()
-blender_version = blender_version.split("build")[0].rstrip()
-blender_version = blender_version.partition(" ")[2] # remove 'Blender' prefix.
-date_string = datetime.date.fromtimestamp(time.time()).strftime("%B %d, %Y")
+blender_help = subprocess.run(
+ cmd, env={"ASAN_OPTIONS": "exitcode=0"}, check=True, stdout=subprocess.PIPE).stdout.decode(encoding="utf-8")
+blender_version = subprocess.run(
+ [blender_bin, "--version"], env={"ASAN_OPTIONS": "exitcode=0"}, check=True, stdout=subprocess.PIPE).stdout.decode(encoding="utf-8").strip()
+blender_version, blender_date = (blender_version.split("build") + [None, None])[0:2]
+blender_version = blender_version.rstrip().partition(" ")[2] # remove 'Blender' prefix.
+if blender_date is None:
+ # Happens when built without WITH_BUILD_INFO e.g.
+ date_string = time.strftime("%B %d, %Y", time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))))
+else:
+ blender_date = blender_date.strip().partition(" ")[2] # remove 'date:' prefix
+ date_string = time.strftime("%B %d, %Y", time.strptime(blender_date, "%Y-%m-%d"))
outfile = open(outfilename, "w")
fw = outfile.write
@@ -80,7 +87,7 @@ is a full-featured 3D application. It supports the entirety of the 3D pipeline -
Use Blender to create 3D images and animations, films and commercials, content for games, architectural and industrial visualizatons, and scientific visualizations.
-http://www.blender.org''')
+https://www.blender.org''')
fw('''
.SH OPTIONS''')
diff --git a/doc/python_api/examples/bpy.types.Depsgraph.1.py b/doc/python_api/examples/bpy.types.Depsgraph.1.py
index 7425c0db15f..e3f35c53bc5 100644
--- a/doc/python_api/examples/bpy.types.Depsgraph.1.py
+++ b/doc/python_api/examples/bpy.types.Depsgraph.1.py
@@ -35,7 +35,7 @@ class OBJECT_OT_evaluated_example(bpy.types.Operator):
# modifiers.
#
# For mesh objects the object.data will be a mesh with all modifiers applied.
- # This means that in access to vertices or faces after modifier stack happens via fields of
+ # This means that in access to vertices or faces after modifier stack happens via fields of
# object_eval.object.
#
# For other types of objects the object_eval.data does not have modifiers applied on it,
diff --git a/doc/python_api/examples/bpy.types.UIList.2.py b/doc/python_api/examples/bpy.types.UIList.2.py
index 6c2b113932a..5f3ecbf116c 100644
--- a/doc/python_api/examples/bpy.types.UIList.2.py
+++ b/doc/python_api/examples/bpy.types.UIList.2.py
@@ -210,4 +210,3 @@ def unregister():
if __name__ == "__main__":
register()
-
diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst
index 5b6736973ca..5c19e652480 100644
--- a/doc/python_api/rst/info_tips_and_tricks.rst
+++ b/doc/python_api/rst/info_tips_and_tricks.rst
@@ -301,7 +301,7 @@ Advantages include:
This is marked advanced because to run Blender as a Python module requires a special build option.
For instructions on building see
-`Building Blender as a Python module <https://wiki.blender.org/index.php/User:Ideasman42/BlenderAsPyModule>`_
+`Building Blender as a Python module <https://wiki.blender.org/wiki/Building_Blender/Other/BlenderAsPyModule>`_
Python Safety (Build Option)