Commit Graph

1302 Commits

Author SHA1 Message Date
lazydodo
ce3cae81f6 [msvc2015] Fix cmake warnings regarding backslashes in path of the run-time libraries 2016-11-26 17:00:25 -07:00
lazydodo
16e2c0ef3c [MSVC] Preliminary VS2017 support. 2016-11-16 20:13:58 -07:00
lazydodo
818af9c331 MSVC Runtime copy : Remove erroneously left in diagnostic message from CMakeLists.txt 2016-11-05 14:04:23 -06:00
lazydodo
2b1d3318f4 [msvc2015] Add support for copying the vc runtime.
There's more dll's hanging out in the ucrt folder, but  I just grabbed the ones blender requested (not sure if that's a wise idea, but it seems to work)

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

Differential Revision: https://developer.blender.org/D2335
2016-11-05 13:58:50 -06:00
Sergey Sharybin
83ae39cc2e CMake: Skip addons_contrib for release candidate builds
Nowadays release candidates are supposed to be as close to the final
release as possible.

Safe for 2.78 release branch.
2016-09-05 10:14:07 +02:00
lazydodo
8fb9f2dbe9 [Windows] Add support for code signing the final binaries.
The option is controlled with the WITH_WINDOWS_CODESIGN option and needs:

- Signtool must be found on the system, the standard windows sdk folders will be searched for it.
- The path to the pfx file (WINDOWS_CODESIGN_PFX)
- The password for the pfx , this can either be set by the WINDOWS_CODESIGN_PFX_PASSWORD variable but given that ends up in CMakeCache.txt (which might be undesirable) there is a backup option of setting the PFXPASSWORD environment variable on the system.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

Tags: #bf_blender, #platform:_windows

Differential Revision: https://developer.blender.org/D2182
2016-08-31 06:26:23 -06:00
Kévin Dietrich
62b1cdd66e Fix over creation of cache files handles (leading to memory leaks).
Multiple threads could create multiple handles for the same cache file,
so protect handle creation with a mutex, to make sure only one is
created.
2016-08-26 14:28:50 +02:00
Campbell Barton
a2a1b34cd1 Cleanup: warnings 2016-07-21 07:38:15 +10:00
Campbell Barton
d42cb44ea2 CMake: correct py-module on OSX 2016-07-18 19:30:32 +10:00
Sergey Sharybin
af53fee4b4 Make --debug-all include --debug-cycles and --debug-libmv 2016-07-14 12:14:55 +02:00
Campbell Barton
103a515043 CMake: per-target CFLAG & CXXFLAG support
Applying cflags globally can be problematic especially with extern, intern libs.

Now flags from target named will be used when defined,
allowing for developers to define flags for modules they maintain.

Convention is CMAKE_CFLAGS_${UPPERCASE_TARGET_NAME}, (CXXFLAGS for C++).

eg: CMAKE_CFLAGS_BF_BLENDER, CMAKE_CFLAGS_MAKESDNA, CMAKE_CXXFLAGS_CYCLES_KERNEL

On Linux run `make help` for full list of names, MSVC shows these in the solution.
2016-07-14 19:17:34 +10:00
Campbell Barton
0708b9aba8 writefile: reuse SDNA between writes
Avoids decoding the SDNA string every undo step.
2016-07-12 13:03:04 +10:00
Campbell Barton
9d5661c9e8 CMake: list buildinfo.h as buildinfo.cmake's output
Keep the fake header to ensure we always run.
2016-06-30 08:53:25 +10:00
Campbell Barton
bfcf8c8e03 CMake: exclude gitignore & arcconfig for addons
These files were included in releases
2016-06-25 21:57:54 +10:00
Jens Verwiebe
28dbd572a4 Exclude obsolete static pythonlibs from install 2016-06-25 12:40:19 +02:00
Campbell Barton
823ab66eca Avoid memory leaks on exit during argument parsing
Exiting Blender during argument parsing would leak memory
(tests, documentation generation, utilities).

While harmless, it hides real leaks which should be resolved.
2016-06-24 10:05:23 +10:00
Campbell Barton
cf8a0d08b0 GPU: make using the glsl basic-shader a flag
This allows for it to be more easily tested.
2016-06-08 04:13:16 +10:00
Martijn Berger
50f432b1e0 CMake, minor changes to make Visual studio 2015 use a compatible numpy and
the standard cmake CUDA/NVCC arguments flag allowing 2015 build to use
msvc 2013 for cuda
2016-06-04 11:42:48 +02:00
Campbell Barton
d931e958a1 Minor changes to help text
D2040 by @Blendify, also move 'Experimental Features' above more general help text.
2016-06-02 15:29:53 +10:00
Campbell Barton
4adffde02c Cleanup: cmake, indentation, line length 2016-05-18 11:58:08 +10:00
Campbell Barton
fbbac6807a Cleanup: unused win32 headers 2016-05-12 04:35:40 +10:00
Campbell Barton
a18f4d2bc6 CMake: optional date/time overrides for reproducible builds 2016-05-11 02:47:38 +10:00
Campbell Barton
6976be7723 Python: install pyconfig.h on OSX, needed for PIP 2016-04-28 20:46:58 +10:00
Campbell Barton
beaa57d269 Refactor BKE_blender into separate headers
- BKE_blender_version.h (only version defines & versionstr).
- BKE_blender_copybuffer.h (currently only used for view3d copy/paste).
- BKE_blender_undo.h (global undo functions).
- BKE_blendfile.h (high level blend file read/write API).
2016-04-25 19:27:45 +10:00
Campbell Barton
3a977ff502 Missed last commit 2016-04-13 00:49:47 +10:00
Campbell Barton
28dad2ec12 Correct error checking for wrong frame range 2016-04-06 09:41:30 +10:00
Campbell Barton
cc970dc08a Cleanup: arg docstrings 2016-04-06 09:28:22 +10:00
Campbell Barton
16f919ea58 Render frame arg parsing, list and range support
Support a comma separated list of frames, as well as frame ranges using the '..' separator.

eg: `blender my.blend --render-frame 1,2,10..40,100..200`
2016-04-06 09:23:15 +10:00
Martijn Berger
de6af2f02a Remove the obsolete windows launcher 2016-03-31 14:07:57 +02:00
Martijn Berger
c0cb9d75d6 CMAKE disable building the windows launcher, fix type in delayloading of debug dll 2016-03-31 14:05:46 +02:00
Martijn Berger
4ec95d621a CMAKE / msvc openmp, delay loading of openmp dll so we can set environment
variable before it is loaded
2016-03-31 13:46:14 +02:00
Sergey Sharybin
3237ae2855 Add license text for OCIO configuration 2016-03-29 12:54:29 +02:00
Sybren A. Stüvel
9f8311ee88 Include requests' cacert.pem file
This allows us to verify certificates of HTTPS connections, which is
mandatory for logins like on Blender ID.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1845
2016-03-11 07:58:05 +01:00
Campbell Barton
c38087afc0 Correct image format args (remove 'MOVIE') 2016-03-04 06:36:13 +11:00
Campbell Barton
8fa1d70543 Cleanup: comments for creator_args & line length 2016-03-03 12:36:33 +11:00
Campbell Barton
c593b77910 Cleanup: style, and --help edits 2016-03-02 17:01:38 +11:00
Campbell Barton
a19c278551 Include modules needed for Python to run pip
This means Python developers can install pip using Blender's bundled Python.
2016-03-01 07:37:49 +11:00
Campbell Barton
6e66ffb61a Cleanup split creator.c
creator.c was getting hard to follow.

- Split off argument and signal handling into own files.
- Move docstrings next to functions (to keep docs grouped with code).
2016-02-28 05:23:48 +11:00
Martijn Berger
e24323ea40 Actually only remove sqlite dll 2016-02-18 10:53:55 +01:00
Martijn Berger
dde810c268 Revert "Fix: T46526, Do not try to install sqlite3.dll anymore as we link it statically into pythons _sqlite"
This reverts commit a8e6b633c9f54f0948a0b9a47534bc38ac95889f.
2016-02-18 10:53:54 +01:00
Martijn Berger
a8e6b633c9 Fix: T46526, Do not try to install sqlite3.dll anymore as we link it statically into pythons _sqlite 2016-02-18 08:19:14 +01:00
Campbell Barton
3d24e57ce8 CMake: install python as an executable 2016-02-15 18:45:32 +11:00
Campbell Barton
bd60920576 Revert "CMake: remove ".svn" checks"
This reverts commit 00fbc326e31b67c41a023ef9a23bc44ed965268d.

Still needed for svn <1.8
2016-02-11 19:14:59 +11:00
Campbell Barton
00fbc326e3 CMake: remove ".svn" checks 2016-02-11 16:00:19 +11:00
Campbell Barton
8be34580c1 move windows out of source dir 2016-02-07 20:58:58 +11:00
Sergey Sharybin
8aef306a42 CMake: Attempt to fix wrong installation folder for requests on OSX 2016-02-01 10:38:34 +01:00
Campbell Barton
161e2343b7 Cleanup: minmac -> minmax & RE_render_ext naming
Use more conventional API word-ordering for RE_render_ext
2016-01-27 07:37:33 +11:00
Campbell Barton
2ca34e419e Docs: minor edits to code comments 2016-01-24 14:29:14 +11:00
Campbell Barton
f81bc88ac7 Fix crash w/ scripts run from the command line that load files
Also refactor context backup/restore into functions.
2016-01-15 10:23:26 +11:00
Campbell Barton
c42ae8be60 CMake: copy python DLL for MinGW builds 2016-01-05 22:13:36 +11:00
Sergey Sharybin
ba432299cd Move Libmv from extern/ to intern/
Logically it is intern library since being mainly developed by 1.5 blender guys.
2016-01-04 19:39:13 +05:00
Sergey Sharybin
5d99cde822 Remove SCons building system
While SCons building system was serving us really good for ages it's no longer
having much attention by the developers and started to become quite a difficult
task to maintain.

What's even worse -- there started to be quite serious divergence between SCons
and CMake which was only accumulating over the releases now. The fact that none
of the active developers are really using SCons and that our main studio is also
using CMake spotting bugs in the SCons builds became quite a difficult task and
we aren't always spotting them in time.

Meanwhile CMake became really mature building system which is available on every
platform we support and arguably it's also easier and more robust to use.

This commit includes:

- Removal of actual SCons building system
- Removal of SCons git submodule
- Removal of documentation which is stored in the sources and covers SCons
- Tweaks to the buildbot master to stop using SCons submodule
  (this change requires deploying to the server)
- Tweaks to the install dependencies script to skip installing or mentioning
  SCons building system
- Tweaks to various helper scripts to avoid mention of SCons folders/files
  as well

Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit

Reviewed By: campbellbarton, juicyfruit

Differential Revision: https://developer.blender.org/D1680
2016-01-04 14:20:48 +05:00
Sergey Sharybin
702372f6c5 Fix wrong format used in the recent python exit code commit 2015-12-31 18:02:54 +05:00
Campbell Barton
82a1adfbdf Command line argument to exit on Python errors
eg:
  blender -b --python-exit-code 1 --python script.py --render-anim

This causes blender not to continue parsing command line arguments and exit if the script raises an exception.
2015-12-31 22:37:32 +11:00
Campbell Barton
3236f1ab54 Add parse_int_strict_range utility for command line input 2015-12-31 22:37:32 +11:00
Campbell Barton
0ffc603553 Cleanup: Py API naming
Use BPY_execute_* prefix for all Python execution commands
2015-12-31 21:20:41 +11:00
Sergey Sharybin
4415e52009 CMake: Fix errors building by MinGW
Some libraries are nto updated for MinGW hence build system
needs some exceptions for this compiler.
2015-12-26 20:01:17 +05:00
Sergey Sharybin
b7978e984b CMake: Add some missing license files in the install target 2015-11-30 21:33:57 +05:00
Sergey Sharybin
bfaebeaee6 Fix T46799: Blender crashes when enumerating POCL devices
The issue was caused by a conflict between std::error_code linked into
Blender which is compiled without C++11 support and POCL's expectations
of std::error_code which was actually linked against C++11's STL.
2015-11-27 14:48:26 +05:00
Sybren A. Stüvel
6894fe3b7a Accept non-existing files from the CLI
When a user tries to load a non-existing blend file from the CLI, the path
is set and Blender acts as if it is loaded. This allows the user to create
a new file by typing 'blender filename.blend' and then saving. This
behaviour is common in other tooling, such as vim and Mypaint.

Blender's current behaviour (print an error message and open the default
scene) doesn't make much sense. It ignores the filename passed on the CLI,
whereas with this patch that filename is actually remembered, and used when
saving.

Reviewers: campbellbarton, sergey, mont29
2015-11-25 13:59:21 +01:00
Campbell Barton
d96ffde491 Fix switching scenes w/ background render
Caused by own de-duplication, b3492978

Scene switching relies on the window context being cleared.
2015-11-20 09:35:37 +11:00
Martijn Berger
8c3538c3e7 Cmake Cpack fix cpack on Apple and Linux 2015-11-07 22:42:21 +01:00
Bastien Montagne
e77e018d48 Fix typo in new error reporting during arg parsing. 2015-11-06 18:54:52 +01:00
Campbell Barton
a25df21631 Command line args: print error w/ invalid numbers 2015-11-07 02:07:06 +11:00
Campbell Barton
b349297861 File Read: de-duplicate command line file-load
WM_file_read must support background mode already
since it can be called by Python scripts in background mode.
2015-10-08 16:00:01 +11:00
Campbell Barton
a5e631171b BLI_path api, minor changes to CWD handling
- BLI_current_working_dir's return value must be checked, since it may fail.
- BLI_current_working_dir now behaves like getcwd, where a too-small target will return failure.
- avoid buffer overrun with BLI_path_cwd, by taking a maxlen arg.
2015-10-08 15:05:58 +11:00
Sergey Sharybin
413036b0d8 Fix T46377: No python executable in 2.76 rc3 distribution for OSX 2015-10-05 15:44:36 +05:00
Campbell Barton
1d6c1e90aa Support relative frames w/ start/end args 2015-09-18 16:40:54 +10:00
Campbell Barton
09e40a4956 Cleanup: spelling 2015-09-14 02:22:22 +10:00
Campbell Barton
f6e0262a83 Enable guarded-alloc when --debug-all is passed 2015-09-02 13:41:12 +10:00
Campbell Barton
b3e1edf7f8 Correct help message for debug options 2015-09-02 13:38:55 +10:00
Campbell Barton
987b3df9c0 Missed version update loading in background mode 2015-08-27 23:12:40 +10:00
Campbell Barton
2112bd892b Fix T45926: Drivers fail in background mode
Scene evaluation was done before text blocks were registered.
2015-08-27 23:12:40 +10:00
Chad Fraleigh
493f9b9155 Fix for numpy with nmake and missing directory
When using the nmake generator from cmake, numpy fails to extract during build because the working directory doesn't exist yet.

Reviewers: juicyfruit

Differential Revision: https://developer.blender.org/D1466
2015-08-16 14:34:45 +02:00
Jörg Müller
29ebb56f4d Audaspace: support the device list returned by the new audaspace library.
- use the device names returned from the library.
- system settings UI changed as new audaspace might contain longer and more device names.
2015-07-28 14:01:53 +02:00
Jörg Müller
a0cbebf404 Audaspace: fixing problems for the merge to master suggested by Campbell and Sergey.
- rename WITH_EXTERNAL_AUDASPACE to WITH_SYSTEM_AUDASPACE.
- rename C/PYAUDASPACE to AUDASPACE_C/PY
- simplifying cmake defines and includes.
- fixing include paths and enabling WITH_SYSTEM_AUDASPACE for windows.
- fixing scons building.
- other minor build system fixes.
2015-07-28 14:01:53 +02:00
Campbell Barton
40d4da829c Fix/Workaround for CMake buildinfo error
Correcting the paths for buildinfo to point to the real header,
ended up breaking buildinfo (by not running every build).

It turns out we relied on the output _never_ existing,
so CMake generates a new buildinfo each time.
This is quite bad, but I didn't see a way for CMake to do this,
so explicitly point to a missing file and comment whats going on.
2015-07-20 23:27:56 +10:00
Campbell Barton
23c76039d9 CMake: correct generated location for buildinfo.h 2015-07-19 09:53:38 +10:00
Campbell Barton
a837797740 Cleanup: quiet warning 2015-07-09 19:33:02 +10:00
Campbell Barton
499308d079 CMake: use cmake commands where possible 2015-07-06 13:34:32 +10:00
Antony Riakiotakis
00808eb39a Make OpenGL debug contexts a flag --debug-gpu instead of a compile time
option.

This makes sense, since contexts get created at runtime, there is little
reason to require recompilation for this.

Only works on linux currently, will be doing more OSs later
2015-07-02 19:30:17 +02:00
Campbell Barton
10c1f208b7 Minor edits to --help 2015-07-02 13:17:06 +10:00
Campbell Barton
d3709f4e79 Correct --help message 2015-07-02 00:24:10 +10:00
Campbell Barton
74b32a23f7 Cleanup: checks for unsupported MSVC versions 2015-06-20 15:17:32 +10:00
Sergey Sharybin
7e529c2a64 Return non-zero exit code when running blender from the command line and reading file has failed
This way automated scripts can actually see if some issue happened.
2015-06-18 14:07:39 +02:00
Campbell Barton
81b37f5e92 CMake: use functions instead of macros
Reduces issues with vars leaking into the parent scope.
2015-06-17 09:38:24 +10:00
Campbell Barton
1862991862 Fix '--addons' argument
- only enable addons which aren't already enabled
- use 'persistent' load option (new file wont reset)
2015-06-14 22:18:44 +10:00
Campbell Barton
958c20872a Add argument --python-expr to pass Python directly
This works like Python's -c argument, handy to be able to avoid writing small scripts to disk.
2015-06-11 21:54:06 +10:00
Sergey Sharybin
73a104b8e8 Fix T44968: Python executable crashes due to missing .DLL
For now we work this around by copying python DLL to the
bin folder. Ideally the DLL should be shared between blender
and python, but that's a bit tricky to do on windows.
2015-06-10 13:41:06 +05:00
Sergey Sharybin
304ee9af8d Depsgraph: Report to the console when the new depsgraph is used 2015-06-05 15:37:41 +05:00
Antony Riakiotakis
893677a76a Disable writing a crash file completely on Windows.
We had some reports where users did not even read the "Not supported on
release builds" message, and arguably writing a file sort of indicates
that the file may include something useful.
2015-06-01 18:54:03 +02:00
Martijn Berger
1d34d3ee06 python tar.gz changed structure due to python.exe being added.
remove /lib/ from cmake as lib and bin are both in the tar.gz
2015-05-30 09:27:13 +02:00
Sergey Sharybin
eb6bab25ba Add dedicated command argument to switch depsgraph to a single-threaded evaluation
This way it is possible to have single threaded depsgraph but threaded other areas
which is handy for torubleshooting.

he argument is: --debug-depsgraph-no-threads
2015-05-20 15:48:29 +05:00
Campbell Barton
e698299e4f CMake: install Python executable when its bundled 2015-05-19 16:44:19 +10:00
Sergey Sharybin
bac7353801 Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:

- More granular dependency relation nature, which solves issues with fake cycles
  in the dependencies.

- Move towards all-animatable, by better integration of drivers into the system.

- Lay down some basis for upcoming copy-on-write, overrides and so on.

The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.

It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.

There are number of assorted documents related on the design of the new system:

* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph

There are also some user-related information online:

* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/

Kudos to everyone who was involved into the project:

- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
  project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
  issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 16:06:37 +05:00
Campbell Barton
84db9fdf4d Fix T44464: Viewport mipmaps no longer toggle off 2015-04-28 01:18:50 +10:00
Antony Riakiotakis
80d75cb3e4 Add debug option --debug-gpumem to show GPU memory used in status bar.
Only used in ATIs and NVIDIAs. Used extensions are:

https://www.opengl.org/registry/specs/ATI/meminfo.txt
http://developer.download.nvidia.com/opengl/specs/

If you read the documentation, the numbers are not supposed to be exact
and also depend on the time when the call is made. The numbers can also
change quite quickly. It's only meant to give a rough measure of what is
going on.
2015-04-24 14:11:21 +02:00
Campbell Barton
252b0cf5d2 Cleanup: API naming use BKE_undo_ prefix 2015-04-18 18:25:07 +02:00
Jens Verwiebe
2aa79679dc OSX: add also license for iomp5 using cmake and fix all textfiles wrong destination 2015-04-06 19:55:51 +02:00
Campbell Barton
6f43e1dfef Cleanup: win32 mixed declare/statements in main()
Make it a more clear where declarations end
(ifdef's all over made it a bit confusing).
2015-03-28 04:12:12 +11:00