2010-10-16 17:26:40 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
|
|
|
|
|
|
|
# <pep8 compliant>
|
|
|
|
|
|
|
|
# classes for extracting info from blenders internal classes
|
|
|
|
|
2011-01-01 07:20:34 +00:00
|
|
|
|
2016-01-06 13:18:40 +00:00
|
|
|
def write_sysinfo(filepath):
|
2015-10-30 11:29:15 +00:00
|
|
|
import sys
|
|
|
|
|
2015-09-14 16:39:40 +00:00
|
|
|
import textwrap
|
2015-10-30 11:29:15 +00:00
|
|
|
import subprocess
|
|
|
|
|
|
|
|
import bpy
|
|
|
|
import bgl
|
2015-09-14 16:39:40 +00:00
|
|
|
|
|
|
|
# pretty repr
|
|
|
|
def prepr(v):
|
|
|
|
r = repr(v)
|
|
|
|
vt = type(v)
|
|
|
|
if vt is bytes:
|
|
|
|
r = r[2:-1]
|
|
|
|
elif vt is list or vt is tuple:
|
|
|
|
r = r[1:-1]
|
|
|
|
return r
|
|
|
|
|
2016-01-06 13:18:40 +00:00
|
|
|
output = open(filepath, 'w', encoding="utf-8")
|
|
|
|
|
2012-03-04 03:14:38 +00:00
|
|
|
header = "= Blender %s System Information =\n" % bpy.app.version_string
|
2015-10-20 06:38:15 +00:00
|
|
|
lilies = "%s\n\n" % ((len(header) - 1) * "=")
|
|
|
|
output.write(lilies[:-1])
|
2011-01-01 07:20:34 +00:00
|
|
|
output.write(header)
|
|
|
|
output.write(lilies)
|
|
|
|
|
2015-10-20 06:38:15 +00:00
|
|
|
def title(text):
|
|
|
|
return "\n%s:\n%s" % (text, lilies)
|
|
|
|
|
2011-01-01 07:20:34 +00:00
|
|
|
# build info
|
2015-10-20 06:38:15 +00:00
|
|
|
output.write(title("Blender"))
|
2015-09-14 16:39:40 +00:00
|
|
|
output.write("version: %s, branch: %s, commit date: %s %s, hash: %s, type: %s\n" %
|
|
|
|
(bpy.app.version_string,
|
|
|
|
prepr(bpy.app.build_branch),
|
|
|
|
prepr(bpy.app.build_commit_date),
|
|
|
|
prepr(bpy.app.build_commit_time),
|
|
|
|
prepr(bpy.app.build_hash),
|
|
|
|
prepr(bpy.app.build_type),
|
|
|
|
))
|
|
|
|
|
|
|
|
output.write("build date: %s, %s\n" % (prepr(bpy.app.build_date), prepr(bpy.app.build_time)))
|
|
|
|
output.write("platform: %s\n" % prepr(bpy.app.build_platform))
|
|
|
|
output.write("binary path: %s\n" % prepr(bpy.app.binary_path))
|
|
|
|
output.write("build cflags: %s\n" % prepr(bpy.app.build_cflags))
|
|
|
|
output.write("build cxxflags: %s\n" % prepr(bpy.app.build_cxxflags))
|
|
|
|
output.write("build linkflags: %s\n" % prepr(bpy.app.build_linkflags))
|
|
|
|
output.write("build system: %s\n" % prepr(bpy.app.build_system))
|
2011-01-01 07:20:34 +00:00
|
|
|
|
|
|
|
# python info
|
2015-10-20 06:38:15 +00:00
|
|
|
output.write(title("Python"))
|
2012-03-04 03:14:38 +00:00
|
|
|
output.write("version: %s\n" % (sys.version))
|
|
|
|
output.write("paths:\n")
|
2011-01-01 07:20:34 +00:00
|
|
|
for p in sys.path:
|
2015-10-20 06:38:15 +00:00
|
|
|
output.write("\t%r\n" % p)
|
2011-01-01 07:20:34 +00:00
|
|
|
|
2015-10-30 11:29:15 +00:00
|
|
|
output.write(title("Python (External Binary)"))
|
|
|
|
output.write("binary path: %s\n" % prepr(bpy.app.binary_path_python))
|
|
|
|
try:
|
|
|
|
py_ver = prepr(subprocess.check_output([
|
|
|
|
bpy.app.binary_path_python,
|
|
|
|
"--version",
|
|
|
|
]).strip())
|
|
|
|
except Exception as e:
|
|
|
|
py_ver = str(e)
|
|
|
|
output.write("version: %s\n" % py_ver)
|
|
|
|
del py_ver
|
|
|
|
|
2015-10-20 06:38:15 +00:00
|
|
|
output.write(title("Directories"))
|
|
|
|
output.write("scripts:\n")
|
|
|
|
for p in bpy.utils.script_paths():
|
|
|
|
output.write("\t%r\n" % p)
|
2012-07-29 01:02:25 +00:00
|
|
|
output.write("user scripts: %r\n" % (bpy.utils.script_path_user()))
|
|
|
|
output.write("pref scripts: %r\n" % (bpy.utils.script_path_pref()))
|
2012-03-04 03:14:38 +00:00
|
|
|
output.write("datafiles: %r\n" % (bpy.utils.user_resource('DATAFILES')))
|
|
|
|
output.write("config: %r\n" % (bpy.utils.user_resource('CONFIG')))
|
|
|
|
output.write("scripts : %r\n" % (bpy.utils.user_resource('SCRIPTS')))
|
|
|
|
output.write("autosave: %r\n" % (bpy.utils.user_resource('AUTOSAVE')))
|
|
|
|
output.write("tempdir: %r\n" % (bpy.app.tempdir))
|
|
|
|
|
2015-10-20 06:38:15 +00:00
|
|
|
output.write(title("FFmpeg"))
|
2011-12-28 12:35:58 +00:00
|
|
|
ffmpeg = bpy.app.ffmpeg
|
|
|
|
if ffmpeg.supported:
|
2012-06-19 22:17:19 +00:00
|
|
|
for lib in ("avcodec", "avdevice", "avformat", "avutil", "swscale"):
|
2015-08-18 06:09:51 +00:00
|
|
|
output.write("%s:%s%r\n" % (lib, " " * (10 - len(lib)),
|
2012-03-04 03:14:38 +00:00
|
|
|
getattr(ffmpeg, lib + "_version_string")))
|
2011-12-28 12:35:58 +00:00
|
|
|
else:
|
2012-03-04 03:14:38 +00:00
|
|
|
output.write("Blender was built without FFmpeg support\n")
|
2011-12-28 12:35:58 +00:00
|
|
|
|
2015-02-18 11:07:48 +00:00
|
|
|
if bpy.app.build_options.sdl:
|
2015-10-20 06:38:15 +00:00
|
|
|
output.write(title("SDL"))
|
2015-02-18 11:07:48 +00:00
|
|
|
output.write("Version: %s\n" % bpy.app.sdl.version_string)
|
|
|
|
output.write("Loading method: ")
|
|
|
|
if bpy.app.build_options.sdl_dynload:
|
|
|
|
output.write("dynamically loaded by Blender (WITH_SDL_DYNLOAD=ON)\n")
|
|
|
|
else:
|
|
|
|
output.write("linked (WITH_SDL_DYNLOAD=OFF)\n")
|
|
|
|
if not bpy.app.sdl.available:
|
|
|
|
output.write("WARNING: Blender could not load SDL library\n")
|
|
|
|
|
2015-10-20 06:38:15 +00:00
|
|
|
output.write(title("Other Libraries"))
|
2013-12-08 09:03:17 +00:00
|
|
|
ocio = bpy.app.ocio
|
|
|
|
output.write("OpenColorIO: ")
|
|
|
|
if ocio.supported:
|
|
|
|
if ocio.version_string == "fallback":
|
|
|
|
output.write("Blender was built with OpenColorIO, " +
|
|
|
|
"but it currently uses fallback color management.\n")
|
|
|
|
else:
|
|
|
|
output.write("%s\n" % (ocio.version_string))
|
|
|
|
else:
|
|
|
|
output.write("Blender was built without OpenColorIO support\n")
|
|
|
|
|
|
|
|
oiio = bpy.app.oiio
|
|
|
|
output.write("OpenImageIO: ")
|
2014-02-12 21:51:33 +00:00
|
|
|
if ocio.supported:
|
2013-12-08 09:03:17 +00:00
|
|
|
output.write("%s\n" % (oiio.version_string))
|
|
|
|
else:
|
|
|
|
output.write("Blender was built without OpenImageIO support\n")
|
|
|
|
|
2013-12-08 11:13:09 +00:00
|
|
|
output.write("OpenShadingLanguage: ")
|
2013-12-08 09:03:17 +00:00
|
|
|
if bpy.app.build_options.cycles:
|
|
|
|
if bpy.app.build_options.cycles_osl:
|
|
|
|
from _cycles import osl_version_string
|
|
|
|
output.write("%s\n" % (osl_version_string))
|
|
|
|
else:
|
|
|
|
output.write("Blender was built without OpenShadingLanguage support in Cycles\n")
|
|
|
|
else:
|
|
|
|
output.write("Blender was built without Cycles support\n")
|
|
|
|
|
Implementation of OpenVDB as a possible cache format for smoke
simulations.
This commits implements OpenVDB as an extra cache format in the Point
Cache system for smoke simulations. Compilation with the library is
turned off by default for now, and shall be enabled when the library is
present.
A documentation of its doings is available here: http://
wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport.
A guide to compile OpenVDB can be found here (Linux): http://
wiki.blender.org/index.php?title=Dev:Doc/Building_Blender/Linux/
Dependencies_From_Source#OpenVDB
Reviewers: sergey, lukastoenne, brecht, campbellbarton
Reviewed By: brecht, campbellbarton
Subscribers: galenb, Blendify, robocyte, Lapineige, bliblubli,
jtheninja, lukasstockner97, dingto, brecht
Differential Revision: https://developer.blender.org/D1721
2016-01-23 07:39:29 +00:00
|
|
|
openvdb = bpy.app.openvdb
|
|
|
|
output.write("OpenVDB: ")
|
|
|
|
if openvdb.supported:
|
|
|
|
output.write("%s\n" % openvdb.version_string)
|
|
|
|
else:
|
|
|
|
output.write("Blender was built without OpenVDB support\n")
|
|
|
|
|
2015-02-18 11:07:48 +00:00
|
|
|
if not bpy.app.build_options.sdl:
|
|
|
|
output.write("SDL: Blender was built without SDL support\n")
|
|
|
|
|
2011-03-22 11:44:46 +00:00
|
|
|
if bpy.app.background:
|
2012-03-04 03:14:38 +00:00
|
|
|
output.write("\nOpenGL: missing, background mode\n")
|
2011-03-22 11:44:46 +00:00
|
|
|
else:
|
2015-10-20 06:38:15 +00:00
|
|
|
output.write(title("OpenGL"))
|
2015-01-29 04:35:06 +00:00
|
|
|
version = bgl.glGetString(bgl.GL_RENDERER)
|
2014-08-28 10:19:44 +00:00
|
|
|
output.write("renderer:\t%r\n" % version)
|
2012-03-04 03:14:38 +00:00
|
|
|
output.write("vendor:\t\t%r\n" % (bgl.glGetString(bgl.GL_VENDOR)))
|
|
|
|
output.write("version:\t%r\n" % (bgl.glGetString(bgl.GL_VERSION)))
|
|
|
|
output.write("extensions:\n")
|
2011-03-22 11:44:46 +00:00
|
|
|
|
2015-12-13 20:58:01 +00:00
|
|
|
glext = sorted(bgl.glGetString(bgl.GL_EXTENSIONS).split())
|
2011-03-22 11:44:46 +00:00
|
|
|
for l in glext:
|
2015-09-14 16:39:40 +00:00
|
|
|
output.write("\t%s\n" % l)
|
2011-01-01 07:20:34 +00:00
|
|
|
|
2015-10-20 06:38:15 +00:00
|
|
|
output.write(title("Implementation Dependent OpenGL Limits"))
|
2014-08-28 10:19:44 +00:00
|
|
|
limit = bgl.Buffer(bgl.GL_INT, 1)
|
|
|
|
bgl.glGetIntegerv(bgl.GL_MAX_TEXTURE_UNITS, limit)
|
|
|
|
output.write("Maximum Fixed Function Texture Units:\t%d\n" % limit[0])
|
2015-12-13 20:58:01 +00:00
|
|
|
bgl.glGetIntegerv(bgl.GL_MAX_ELEMENTS_VERTICES, limit)
|
|
|
|
output.write("Maximum DrawElements Vertices:\t%d\n" % limit[0])
|
|
|
|
bgl.glGetIntegerv(bgl.GL_MAX_ELEMENTS_INDICES, limit)
|
|
|
|
output.write("Maximum DrawElements Indices:\t%d\n" % limit[0])
|
2014-08-28 10:19:44 +00:00
|
|
|
|
|
|
|
output.write("\nGLSL:\n")
|
2015-12-13 20:58:01 +00:00
|
|
|
bgl.glGetIntegerv(bgl.GL_MAX_VARYING_FLOATS, limit)
|
|
|
|
output.write("Maximum Varying Floats:\t%d\n" % limit[0])
|
|
|
|
bgl.glGetIntegerv(bgl.GL_MAX_VERTEX_ATTRIBS, limit)
|
|
|
|
output.write("Maximum Vertex Attributes:\t%d\n" % limit[0])
|
|
|
|
bgl.glGetIntegerv(bgl.GL_MAX_VERTEX_UNIFORM_COMPONENTS, limit)
|
|
|
|
output.write("Maximum Vertex Uniform Components:\t%d\n" % limit[0])
|
|
|
|
bgl.glGetIntegerv(bgl.GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, limit)
|
|
|
|
output.write("Maximum Fragment Uniform Components:\t%d\n" % limit[0])
|
|
|
|
bgl.glGetIntegerv(bgl.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, limit)
|
|
|
|
output.write("Maximum Vertex Image Units:\t%d\n" % limit[0])
|
|
|
|
bgl.glGetIntegerv(bgl.GL_MAX_TEXTURE_IMAGE_UNITS, limit)
|
|
|
|
output.write("Maximum Fragment Image Units:\t%d\n" % limit[0])
|
|
|
|
bgl.glGetIntegerv(bgl.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, limit)
|
|
|
|
output.write("Maximum Pipeline Image Units:\t%d\n" % limit[0])
|
2014-08-28 10:19:44 +00:00
|
|
|
|
2015-01-06 09:13:21 +00:00
|
|
|
if bpy.app.build_options.cycles:
|
|
|
|
import cycles
|
2015-10-20 06:38:15 +00:00
|
|
|
output.write(title("Cycles"))
|
2015-01-06 09:13:21 +00:00
|
|
|
output.write(cycles.engine.system_info())
|
|
|
|
|
2016-01-06 13:18:40 +00:00
|
|
|
output.close()
|
2014-01-04 14:24:10 +00:00
|
|
|
|