Commit Graph

1697 Commits

Author SHA1 Message Date
Campbell Barton ab9ec193c3 Fix splash screen showing on startup with files loaded by scripts
Suppressing the splash was only done when passing in an argument from
the command line.

Remove G.file_loaded, as it is misleading, only set once on startup,
replace with G.relbase_valid which is used everywhere else to check
if the file path should be used.
2021-11-13 14:05:27 +11:00
Sergey Sharybin 9111ea78ac Localize image mutex lock into runtime field of Image datablock
Allows to avoid a global lock being held while reading files from disk,
solving performance issues when Cycles needs to read a lot of packed
images.

Simple test file F11597666

Differential Revision: https://developer.blender.org/D13032
2021-11-01 12:47:03 +01:00
Sebastian Parborg 690300eb4a Fix install paths for blender thumbnailer when not building a portable install
When doing a non portable build of blender, the executable
blender-thumbnailer would be installed in two locations:
/usr/bin/
/usr/

While cleaning up, also make the blender thumbnailer dll optional on
windows to bring the logic in line with what it is on linux and mac.

Reviewed By: Campbell Barton, Ray molenkamp

Differential Revision: http://developer.blender.org/D13014
2021-10-28 21:13:47 +02:00
Sybren A. Stüvel ab1909fe06 Deps: Python, install Cython package
Cython was already bundled with Blender's libraries in SVN (as dependency
of Numpy, see rB5bddfde217b1), but was never actually installed in the
CMake install step. As a result, `import cython` would fail. This is
now fixed.
2021-10-22 14:01:47 +02:00
Sybren A. Stüvel a5917175d8 Deps: Python, bundle zstandard package
This package allows Python scripts to handle compressed blend files (see
rB2ea66af742bc). This is for example needed by Blender Asset Tracer to
send files to a Flamenco render farm.

This change includes a new `WITH_PYTHON_INSTALL_ZSTANDARD` build-time
option, to control whether to actually install the package. For this the
already-existing approach for Requests was copied.

Reviewed By: LazyDodo, mont29, brecht

Differential Revision: https://developer.blender.org/D12777
2021-10-21 13:46:33 +02:00
Campbell Barton fd7510984a CMake: add WITH_BLENDER_THUMBNAILER option
Make building the thumbnail extraction executable optional,
disable on macOS as this was not linking, further, macOS doesn't use
this for thumbnail extraction so it could be left disabled.
2021-10-20 12:15:33 +11:00
Campbell Barton ef9269bd62 Thumbnails: refactor extraction to use one code-path for all platforms
Thumbnail extraction now shares code between Linux/Windows,
allowing thumbnails from Zstd compressed blend files to be extracted.

The main logic is placed in blendthumb_extract.cc and is built as static
library. For windows there is DLL which is registered during blender
install and which then reads and generates thumbnails.

For other platforms there is blender-thumbnailer executable file which
takes blend file as an input and generates PNG file. As a result
Python script blender-thumbnailer.py is no longer needed.

The thumbnail extractor shares the same code-path as Blenders file
reading, so there is no need to duplicate any file reading logic.
This means reading compressed blend files is supported (broken since
the recent move Zstd compression - D5799).

This resolves T63736.

Contributors:

- @alausic original patch.
- @LazyDodo windows fixes/support.
- @campbellbarton general fixes/update.
- @lukasstockner97 Zstd support.

Reviewed By: sybren, mont29, LazyDodo, campbellbarton

Ref D6408
2021-10-20 10:31:30 +11:00
Campbell Barton c5a13ffcb4 Cleanup: spelling in comments 2021-10-18 12:13:10 +11:00
Campbell Barton b93e947306 Cleanup: rename BKE_font.h -> BKE_vfont.h
Match API naming prefix (BKE_vfont_*) and DNA_vfont_types.h.
2021-10-06 11:18:16 +11:00
Campbell Barton e87783a5ec Cleanup: spelling in comments 2021-09-27 21:04:34 +10:00
Jon Denning db6b3801b3 Update command line argument description for --addons
Changed doc string for Blender `--addons` command line argument
to explain what it does rather than just describing what it expects.

Reviewed By: Blendify

Ref D12445
2021-09-10 14:36:41 +10:00
Ankit Meel b83ee724a4 Fix T90418: macOS codesign fails with dylib next to executable
Change the dylib folder relative to `Blender` executable to be
the same as before rB652fbc200500497a67bd11d18b786587ba34e3d9 and same
as bpy.so : `@loader_path/../Resources/${BLENDER_VERSION}/lib`
2021-08-10 10:30:55 +05:30
Sergey Sharybin 0e4a250279 Fix invalid helps and description of session UUID verification
A copy-paste error.
2021-08-09 12:09:02 +02:00
Campbell Barton f5acfd9c04 Cleanup: remove redundant parenthesis 2021-08-05 16:54:34 +10:00
Ankit Meel 18d900caca macOS: Fix OpenMP dynamic loader error. 2021-08-04 01:22:27 +05:30
Ankit Meel 652fbc2005 macOS: Portable builds with dynamic libraries.
For Blender.app: dropping libomp.dylib next to Blender executable is
enough for it getting picked up since `@executable_path` is an rpath.

For non-distributed binaries datatoc, makesdna, tests etc, code for
copying libomp.dylib to build folder is removed and replaced by
CMake's rpath option for *build* tree.

For bpy.so, the post build rpath change has also been replaced by CMake
rpath option for *install* tree.

Since -id has been changed in D11748, remove the
`install_name_tool -change ...` command.

Any dylib can just be dropped at `MAC_BLENDER_TARGET_DYLIBS_DIR`
hereafter. Appending dylib path to `CMAKE_BUILD_RPATH` will be needed
for datatoc etc if linked against one (instead of copying the
dylibs around).

Reviewed By: #platform_macos, brecht
Differential Revision: https://developer.blender.org/D11997
2021-08-03 20:49:40 +05:30
Brecht Van Lommel c6ba7359ae Fix LLVM 12 symbol conflict with Mesa drivers, after recent Linux libs update 2021-07-27 17:45:17 +02:00
Ankit Meel a9121640be macOS Cleanup: Remove old version specific code
Reviewed By: #platform_macos, brecht
Differential Revision: https://developer.blender.org/D12021
2021-07-26 18:39:08 +05:30
Campbell Barton 9b89de2571 Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
2021-07-04 00:43:40 +10:00
Leon Zandman c317f111c1 Cleanup: Spelling Mistakes
This patch fixes many minor spelling mistakes, all in comments or
console output. Mostly contractions like can't, won't, don't, its/it's,
etc.

Differential Revision: https://developer.blender.org/D11663

Reviewed by Harley Acheson
2021-06-22 10:54:50 -07:00
Harley Acheson bcff0ef9ca UI: Windows Blend File Association
This patch allows Windows users to specify that their current blender
installation should be used to create thumbnails and be associated
with ".blend" files. This is done from Preferences / System. The only
way to do this currently is from the command-line and this is sometimes
inconvenient.

Differential Revision: https://developer.blender.org/D10887

Reviewed by Brecht Van Lommel
2021-06-14 10:22:03 -07:00
Bastien Montagne fbd889ec28 Fix T86544: better cleanup of path given as command line argument.
When using non-default system separator in filename path, code would end up
with an absolute path mixing regular and alternative separator,
confusing the rest of the path manipulations later on.

So this commit add proper replacements of alternative separators, and
path normalization.
2021-06-10 18:37:46 +02:00
Campbell Barton b669fd376a Cleanup: spelling in comments 2021-06-10 17:04:25 +10:00
Erik Abrahamsson 4f81b4b4ce Windows: Use TBBMalloc for GMP
TBBmalloc_proxy already takes care of any allocations
being done from MSVC compiled code, some of the dependencies
like GMP cannot be build with MSVC and we have to use
mingw to build them. mingw however links against the older
msvcrt.dll for its allocation needs, which TBBMallocProxy
does not hook.

GMP has an option to supply your own allocation functions
so we can still manually redirect them to TBBMalloc.

In a test-file with a boolean geometry node, this patch
uses 32s effective CPU time compared to 52s before.

Differential Revision: https://developer.blender.org/D11435

Reviewed by Campbell Barton, Ray Molenkamp
2021-06-09 18:34:17 -06:00
Ray Molenkamp eb030204f1 windows/deps: Fix TBB build issues.
rB847579b42250 updated the TBB build script
which had some unintended consequences for
windows as the directory layout slightly
changed.

This change adjusts the builder to the new
structure, there are no version/functional
changes.
2021-06-04 09:16:03 -06:00
Aaron Carlisle f253e59221 Docs: Limit the OCIO env vars that we document
Brecht mentioned that these are a bit obscure and don't make much sense 
to override these.
2021-05-31 19:19:00 -04:00
Aaron Carlisle 30f7acfffa Docs: Add relevant OCIO envvars to Blender's help message 2021-05-29 11:22:58 -04:00
Ray Molenkamp e8ca635e43 Cleanup: rename blender-launcher source file.
blender-laucher.c was not an ideal name for this file
since it's not directly clear it is windows only.

This change renames it to blender_launcher_win32.c
to be more in line with other win32 specific files
we have.
2021-05-27 08:10:31 -06:00
Ray Molenkamp f3944cf503 Win: Add launcher to hide the console window flash
This patch fixes a long-standing complaint from users:
the console window shortly flashing when they start
blender.

This is done by adding a new executable called
blender-launcher.exe which starts blender.exe while
hiding the console.

Any command line parameters given to blender-launcher
will be passed on to blender.exe so it'll be a drop
in replacement.

Starting blender.exe on its own will still function as
a proper console app so no changes required here for
users that use blender for batch processing.

Notable changes:

Registering blender (-R switch) will now register
blender-launcher as the preferred executable.

This patch updates the installer and updates the
shortcuts to start blender-launcher.exe rather
than blender.exe

Differential Revision: https://developer.blender.org/D11094

Reviewed by: brecht, harley
2021-05-26 20:02:35 -06:00
Leon Zandman 865d1889da Cleanup: spelling
Includes fixes to misspelled function names.

Ref D11280
2021-05-21 22:23:07 +10:00
Campbell Barton 1151adf62d Cleanup: unnecessary extra lines for doxy sections 2021-05-11 16:04:03 +10:00
Campbell Barton 2f61602497 Cleanup: correct/clarify PlayAnim comments 2021-05-10 15:32:18 +10:00
Campbell Barton c17792a709 Merge branch 'blender-v2.93-release' 2021-05-06 11:35:10 +10:00
Campbell Barton 0499dbc5c1 PlayAnim: support limiting the cache by memory instead of frames
Partial fix for T81751 which exposes multiple playback performance
issues. Previously the cache was limited to 30 frames, without a way to
increase the cache for smooth playback with files that are slow to load.

Now the animation plays back smoothly once loaded into cache.

The cache limit from the system preference is used
when the player is launched from Blender.

A new player argument `-c <cache_limit>` was added to support this.
2021-05-06 11:31:44 +10:00
Campbell Barton 3003fbbecf Merge branch 'blender-v2.93-release' 2021-04-21 13:48:10 +10:00
Campbell Barton 5da3177190 Fix logging "bke.appdir" messages
Logging was initialized after BKE_appdir paths were initialized,
making it impossible to see paths which are checked on startup.
2021-04-21 13:44:23 +10:00
Ray Molenkamp 62bff15377 Fix various Blender 3.0 versioning issues
This changes the following items:

- package name is now `blender-3.0.0-git.09eb04c0a865-windows64`
  rather than `blender-3.00.0-git.09eb04c0a865-windows64`
- Fix version resource for blender.exe not building
- Data directories are now `3.0\...` rather than `3.00\....`
- User prefs are now in:
  `c:\Users\users\AppData\Roaming\Blender Foundation\Blender\3.0\`
  rather than:
  `c:\Users\users\AppData\Roaming\Blender Foundation\Blender\3.00\`
- Updating startup & preferences from previous release
  has a special exception for 3.0 to check for 3.93 and older.

See T87532

Ref D10986
2021-04-16 11:23:34 +10:00
Campbell Barton f337310b43 Cleanup: minor improvements & type hints for man-page generator
- Use main() function.
- Use argparse for parsing arguments.
- Keep under 120 column width.
- Use type hints (passes `mypy --strict`).
2021-04-10 17:54:42 +10:00
Ray Molenkamp f9eaf93d37 MSVC: ASAN support for VS 16.9
This enables ASAN support when used with VS 16.9
enable as usual in cmake with the WITH_COMPILER_ASAN
option, or when using make.bat just tag on `asan'
to the invocation, ie: `make lite 2019 asan`

MSVC: Asan support for 16.9

This enables ASAN support when used with VS 16.9
enable as usual in cmake with the WITH_COMPILER_ASAN
option, or when using make.bat just tag on `asan'
to the invocation, ie: `make lite 2019 asan`

Differential Revision: https://developer.blender.org/D7794
Reviewed By: brecht, sergey
2021-03-29 19:11:17 -06:00
Ankit Meel 241f05d53c macOS/bpy: accommodate portable builds, and multi-config generators.
Old code's `install` step did not guarantee that all script files
will be copied from source folder to build folder _before_ copying from
build folder to site-packages. That caused incomplete installation.
Fixed by copying scripts etc., only once. Also match the behavior on
Linux: install to site-packages only if `WITH_INSTALL_PORTABLE` is OFF.

Also fix install and launch issues with Xcode.
2021-03-29 22:25:13 +05:30
Ankit Meel 0ec82477af macOS/bpy: install into site-packages
Reviewed By: #platform_macos, brecht
Maniphest Tasks: T86579
Differential Revision: https://developer.blender.org/D10664
2021-03-27 01:14:45 +05:30
Ankit Meel ad31b13f91 macOS/bpy: add support for OpenMP
Changes made:
* Add OpenMP linker flags.
* Copy the libomp.dylib to `2.93/lib/libomp.dylib`.
* Change the `LC_LOAD_DYLIB` item such that
  the lib is found at `bpy.so/../../Resources/2.93/lib/libomp.dylib`.
Installation is done by D10664.

Reviewed By: #platform_macos, brecht
Maniphest Tasks: T86579
Differential Revision: https://developer.blender.org/D10657
2021-03-27 01:08:51 +05:30
Jörg Müller de06cb8559 Bugfix: properly rename Null audio device to None 2021-03-16 23:45:49 +01:00
Jörg Müller 12c08ceee3 Audaspace: add support for CoreAudio on macOS
This adds CoreAudio as audio backend on macOS.
CoreAudio is the standard audio API on macOS.

Ref T86590
2021-03-16 23:21:45 +01:00
Jörg Müller bc57985306 Audaspace: add support for WASAPI on Windows
This adds WASAPI as audio backend on Windows.
WASAPI is the modern standard audio API on
Windows introduced with Windows Vista.

Ref T86590
2021-03-16 23:21:45 +01:00
Jörg Müller d33339ebf4 Audaspace: add support for PulseAudio on Linux
This adds PulseAudio as audio backend on Linux.
PulseAudio is the main audio engine used on most,
if not all, Linux distributions today.

Ref T86590
2021-03-16 23:21:45 +01:00
Jörg Müller 7b8fc307dc Audaspace: porting minor improvements from upstream
- NullDevice is now called None
- Automatic choice of best available device.
- Minor formatting, documentation and cmake fixes.
2021-03-16 23:21:45 +01:00
Bastien Montagne ef5782e297 CLOG: add support for substring matching.
So that `--log "*undo*"` matches any log identifier containing `undo`.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D10647
2021-03-12 16:01:46 +01:00
Campbell Barton 3bc406274b Cleanup: comments 2021-03-06 18:33:54 +11:00
Campbell Barton aa86710242 Cleanup: spelling 2021-03-05 14:44:28 +11:00