Commit Graph

1547 Commits

Author SHA1 Message Date
Campbell Barton 9d78b7edb9 Cleanup: use function instead of extern variable
Quiet undeclared variable warning.
2019-02-23 19:20:19 +11:00
Sergey Sharybin ce79d86c08 Merge branch 'blender2.7' 2019-02-22 15:53:44 +01:00
Sergey Sharybin 3b86c99260 Fix previous commit
Somehow quote got missing the last moment.
2019-02-22 15:53:22 +01:00
Sergey Sharybin 86dd9bf53d Merge branch 'blender2.7' 2019-02-22 15:50:36 +01:00
Sergey Sharybin 427f3978e1 Always show version when running in background mode
The goal is to make it easy to know which exact blender version
and built was used for a job on a farm. This includes but not
exclusively render farms. But same is handy for simulation tasks
as well.
2019-02-22 15:47:54 +01:00
Ray Molenkamp 8ed6985017 Windows: Use static pthreads library. 2019-02-21 14:19:15 -07:00
Ray Molenkamp 5d5070dd12 Windows: Use static pthreads library. 2019-02-21 14:16:26 -07:00
Campbell Barton de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton 1daaa74b08 WM: command line args to start blender maximized
Part of D4323 by @DragMZ
2019-02-11 14:46:25 +11:00
Campbell Barton 7fdda18ca1 Remove "Keep Session" preference
As far as we know this wasn't widely used, and relied no storing data
in the temp dir which may be cleared on reboot.

More generally, alternative behavior for a core area like file IO
is not something to keep if it has unresolved issues.

See D4310 for details.
2019-02-08 08:42:50 +11:00
Campbell Barton eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton ab5e69e660 Cleanup: remove contributors for CMake files
Following removal from C source code.

See: 8c68ed6df1
2019-02-05 09:10:32 +11:00
Campbell Barton 744f633986 Cleanup: trailing commas
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
Campbell Barton 141c6073ca WM: Event simulation support for Python
This feature is intended only for testing,
to automate simulating user input.

- Enabled by '--enable-event-simulate'.
- Disables handling all real input events.
- Access by calling `Window.event_simulate(..)`
- Disabling `bpy.app.use_event_simulate`
  to allow handling real events (can only disable).

Currently only mouse & keyboard events work well,
NDOF, IME... etc could be added as needed.

See D4286 for example usage.
2019-02-02 15:23:55 +11:00
Campbell Barton afcbf7cf13 Cleanup: use G_FLAG_*/G_FILE_* for G.f/fileflags
Was confusing eg: G_AUTOPACK belonged to G.fileflags, G_PICKSEL to G.f.
2019-02-02 13:49:13 +11:00
Campbell Barton 8c68ed6df1 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 02:40:00 +11:00
Campbell Barton 65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Brecht Van Lommel f992c92872 Fix blenderplayer build after OpenMP changes. 2019-01-28 13:05:40 +01:00
Brecht Van Lommel 94d88df3a8 Merge branch 'blender2.7' 2019-01-26 15:54:13 +01:00
Arto Kitula b7a9e980a1 macOS: add support for OpenMP, making smoke/fluid/cloth simulations faster.
This bring macOS on par with Windows and Linux. It uses the OpenMP library
added to our precompiled libraries.

Custom flags are set because FindOpenMP from CMake below 3.12 does not support
AppleClang, and more recent versions do not work with our custom directory
location either.

Differential Revision: https://developer.blender.org/D4257
2019-01-26 15:48:56 +01:00
Campbell Barton f20dbc293f Cleanup: blank lines over doxy headers 2019-01-26 21:43:24 +11:00
Campbell Barton 1e4aab36c2 Cleanup: remove redundant BKE/BLI/BIF headers 2019-01-26 21:20:25 +11:00
Campbell Barton c383d74228 Logging: add '--log-show-timestamp' option.
Part of D4214 by @sobakasu w/ edits.
2019-01-16 16:33:05 +11:00
Campbell Barton 0b17547b23 Cleanup: comment line length (creator)
Prevents clang-format wrapping text before comments.
2019-01-16 00:14:34 +11:00
Campbell Barton 30c3852ffd Cleanup: comment line length (creator)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
Sybren A. Stüvel e11bb77f31 Properly clean up Python when exiting due to --python-exit-code
When BPY_python_end() is not called, there can be buffered data still in
`sys.stdout` or `sys.stderr`. This generally isn't an issue when those are
connected to a terminal, but when they are read by another process (in the case
of rendering with Flamenco, for example) we could miss the actual error message
that's causing the exit in the first place.

The following script demonstrates the issue; before this commit neither the
writes to STDERR and STDOUT nor the traceback of the NameError were shown.

    #!/bin/bash

    cat > file-with-errors.py <<EOT
    import sys
    print('THIS IS STDERR', file=sys.stderr)
    print('THIS IS STDOUT', file=sys.stdout)
    nonexisting.monkey = 3
    EOT

    blender --enable-autoexec -noaudio --background \
	any-existing-blendfile.blend \
	--python-exit-code 42 \
	--python file-with-errors.py 2>&1 | cat

Reviewers: campbellbarton, mont29

Reviewed By: campbellbarton, mont29

Subscribers: fsiddi

Differential Revision: https://developer.blender.org/D4168
2019-01-08 12:00:18 +01:00
Campbell Barton e305560f13 Cleanup: add trailing commas to structs
Needed for clang formatting to workaround bug/limit, see: T53211
2019-01-07 00:34:48 +11:00
Ray Molenkamp d1237d24ca Merge remote-tracking branch 'origin/master' into blender2.8 2018-12-11 15:14:00 -07:00
Ray Molenkamp ba8d6ca3dd dependencies windows: Replace pthreads-win32 2.9.1 with pthreads4w 3.0.0
maintenance seems to have stopped for pthreads-win32
2018-12-11 15:12:56 -07:00
Clément Foucault 1fa527bfa3 BKE: Add "--debug-gpu-force-workarounds" to force gpu workarounds
This is nice to test workarounds on other configs that may benefits from
the existing workarounds.
2018-12-05 03:05:39 +01:00
Campbell Barton c312cc171b Merge branch 'master' into blender2.8 2018-11-30 14:58:46 +11:00
Campbell Barton bae188bf46 Cleanup: duplicate include 2018-11-30 14:23:13 +11:00
Sergey Sharybin 3ed0d5b4d4 Merge branch 'master' into blender2.8 2018-11-28 14:42:38 +01:00
Sergey Sharybin ce927e15e0 Tweaks for threading schedule for Threadripper2 and EPYC
The idea is to make main thread and job threads to be scheduled
on CPU dies which has direct access to memory (those are NUMA
nodes 0 and 2).

We also do this for new EPYC CPUs since their NUMA nodes 1 and 3
do have access but only to a higher range DDR slots. By preferring
nodes 0 and 2 on EPYC we make it so users with partially filled
DDR slots has fast memory access.

One thing which is not really solved yet is localization of
memory allocation: we do not guarantee that memory is allocated
on the closest to the NUMA node DDR slot and hope that memory
manager of OS is acting in favor of us.
2018-11-28 14:41:22 +01:00
Campbell Barton b58d4e7fe4 WM: remove tool initialization code
Area initialization handles these cases now.
2018-11-28 13:58:53 +11:00
Brecht Van Lommel ca6dd692b5 Keymaps: reload key configuration when changing select mouse.
For configuration scripts that want to change keymaps based on this setting.
2018-11-13 19:29:13 +01:00
Campbell Barton 0121258770 Merge branch 'master' into blender2.8 2018-11-10 10:57:35 +11:00
Campbell Barton 7efac2b0b0 PyAPI: add imports arg to BPY_execute_string
Allows for avoiding `__import__` in expressions,
was already supported for BPY_execute_string_as_* API calls.
2018-11-10 10:55:04 +11:00
Bastien Montagne 64ec05b64d Cleanup: remove some useless BKE_library and BKE_main includes.
Makes it simpler to make some changes...

Also fix order of some includes (use alphabetical please).
2018-11-07 20:58:54 +01:00
Ray Molenkamp 4bf4da12de Merge remote-tracking branch 'origin/master' into blender2.8 2018-10-22 10:19:06 -06:00
Ray Molenkamp 86dbbd156f Windows: Enable python debugging in Visual Studio.
see D3817 for technical details, and https://wiki.blender.org/wiki/Tools/Debugging/Python_Visual_Studio for a end user quick-start guide.

Differential Revision: https://developer.blender.org/D3817
2018-10-22 10:17:08 -06:00
Bastien Montagne fbf4c11960 Make Static Override optional/hidden by default.
That feature will not be ready (or at least, not tested enough) to be
officially part of 2.80 beta. So we disable it by default, hidding it
behind a startup option (`--enable-static-override`), and a python
app var (`bpy.app.use_static_override`).

That way, people who really want to play with it can do it easily, while
not exposing/enabling non-production-ready feature by default.

Note that underlying override code remains active, i.e. files we do have
overridden data-blocks will be loaded correctly according to static override.
2018-10-19 18:38:19 +02:00
Philipp Oeser 345175082b Fix T57247: Render animation does not respect render single view layer
Reviewers: brecht

Maniphest Tasks: T57247

Differential Revision: https://developer.blender.org/D3800
2018-10-16 13:00:45 +02:00
Sergey Sharybin 4de1e673a4 Merge branch 'master' into blender2.8 2018-09-27 14:51:33 +02:00
Brecht Van Lommel 2a63e062b0 Tests: add --no-window-focus to open window without focus.
This is useful to run OpenGL tests while continuing to do other tasks
without windows constantly popping up in the foreground.
2018-09-27 12:21:48 +02:00
Campbell Barton bb3ec3ebaf BLI_utildefines: rename pointer conversion macros
Terms get/set don't make much sense when casting values.

Name macros so the conversion is obvious,
use common prefix for easier completion.

- GET_INT_FROM_POINTER  -> POINTER_AS_INT
- SET_INT_IN_POINTER    -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER   -> POINTER_FROM_UINT
2018-09-19 12:12:21 +10:00
Campbell Barton f35e9f047a Merge branch 'master' into blender2.8 2018-09-19 12:14:36 +10:00
Brecht Van Lommel fc115e1ab2 Cleanup: remove legacy layer and dupli code. 2018-09-04 16:11:27 +02:00
Campbell Barton 0ddf3e110e Cleanup: comment blocks 2018-09-02 18:51:31 +10:00
Campbell Barton ae57383648 Cleanup: comment blocks 2018-09-02 18:28:27 +10:00
Brecht Van Lommel 871b7ba892 Merge branch 'master' into blender2.8 2018-08-28 19:15:08 +02:00
Ray Molenkamp 5e8a030a08 cmake: adjustments required for lib-upgrade on windows. 2018-08-27 19:38:31 -06:00
Brecht Van Lommel c9abb0fe26 Workspaces: replace bundled workspace.blend with embedded startup.blend.
We want these to have the same workspaces in both, so there is no reason
to have two files that are identical.
2018-08-20 16:23:22 +02:00
Campbell Barton 9f25b2f278 Merge branch 'master' into blender2.8 2018-08-18 19:18:55 +10:00
Campbell Barton 506d8448cc WM: app-template command line override
Without this, there was no simple way to have
launchers for different app-templates.

Also allows force-disabling the app-template stored in the preferences.
2018-08-18 14:10:07 +10:00
Antonioya 66da2f537a New Grease Pencil object for 2D animation
This commit merge the full development done in greasepencil-object branch and include mainly the following features.

- New grease pencil object.
- New drawing engine.
- New grease pencil modes Draw/Sculpt/Edit and Weight Paint.
- New brushes for grease pencil.
- New modifiers for grease pencil.
- New shaders FX.
- New material system (replace old palettes and colors).
- Split of annotations (old grease pencil) and new grease pencil object.
- UI adapted to blender 2.8.

You can get more info here:

https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/
https://code.blender.org/2018/07/grease-pencil-status-update/

This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible.

Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-07-31 10:50:43 +02:00
Campbell Barton 2032e4ec9e Merge branch 'master' into blender2.8 2018-07-27 17:09:38 +10:00
Campbell Barton 3e2dfc6db8 Fix T55991: Python ignores scene switch argument 2018-07-27 16:49:41 +10:00
Campbell Barton 39678442e1 Cleanup: typos 2018-07-03 09:22:02 +02:00
Ray Molenkamp dbbea2fc22 Fix: build error with msvc
introduced by rBd2757d149bf2d9ac604da6fb7f4742ee77e68d2d
2018-06-28 09:07:10 -06:00
Sybren A. Stüvel d2757d149b Make stdout unbuffered
Unbuffered stdout makes stdout and stderr better synchronised, and helps
when stepping through code in a debugger (prints are immediately
visible). We don't output much to stdout anyway, so this isn't likely to
cause any performance issues.
2018-06-28 15:32:19 +02:00
Bastien Montagne 8a7f317666 Cleanup: Nuke most of G.main from GPU code. 2018-06-25 12:32:48 +02:00
Campbell Barton 06a1a66a9b Merge branch 'master' into blender2.8 2018-06-17 17:10:19 +02:00
Campbell Barton a24b4e6090 Cleanup: trailing space for remaining source/ 2018-06-17 17:06:28 +02:00
Campbell Barton 56173e512c Merge branch 'master' into blender2.8 2018-06-17 16:18:15 +02:00
Campbell Barton a0a1fc8938 Cleanup: BLI path extension API
Use BLI_path_extension_* prefix.
2018-06-17 16:13:24 +02:00
Bastien Montagne ecc57e7524 Merge branch 'master' into blender2.8 2018-06-15 17:43:18 +02:00
Bastien Montagne 49915e3241 Cleanup: validate G.main's in creator code.
Using G_MAIN here is valid!
2018-06-15 17:36:44 +02:00
Dalai Felinto fec317de8d --debug-gpu-shader: Dump GLSL shaders to disk
This is really convenient for development. Either for profiling the
generated shaders or to check if the generated code is correct.

It writes the shaders to the temporary blender session folder.

(ported over from blender2.8)
2018-06-02 20:29:27 +02:00
Campbell Barton 0de0cee9a2 Fix crash running in background mode 2018-06-02 14:53:07 +02:00
Bastien Montagne eb1feb9f4a Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/object/object_add.c
	source/blender/editors/object/object_select.c
	source/blender/editors/space_outliner/outliner_edit.c
2018-05-31 16:21:47 +02:00
Bastien Montagne 16100f8261 Cleanup: get rid of last G.main usages in BKE library code. 2018-05-31 16:04:04 +02:00
Joshua Leung f56a9fbad5 Depsgraph: Remove the "disable-copy-on-write" option completely
After discussion with Sergey and Dalai, we have decided to remove
this option completely. We're getting to the point where it is almost
impossible to really use 2.8 without COW, and keeping the old option
running ends up diverting dev resources away towards tracking down
and fixing problems with a parallel system that will be going away.
2018-05-31 13:43:00 +02:00
Campbell Barton 44f78c95be Cleanup: move toolsystem into own include
Many files using the window manager don't access the tool-system.

This avoids rebuilding many files when the tool-system changes.
2018-05-23 08:23:16 +02:00
Joshua Leung 7f714fdbb2 Depsgraph: Enable copy on write by default
As was decided at today's dev kickoff, we're now moving to having
Copy-on-Write enabled by default, as 2.8 is barely functional with
it off.

To run Blender *without* COW (e.g. for testing), use:
--disable-copy-on-write
2018-05-22 12:00:23 +02:00
Campbell Barton bb45381bc2 Merge branch 'master' into blender2.8 2018-05-22 08:49:24 +02:00
Campbell Barton 9f66d00287 CMake: only include licences for enabled libs 2018-05-21 18:41:59 +02:00
Campbell Barton f9547ab313 Fix tools not being initialized on startup 2018-05-18 17:36:11 +02:00
Campbell Barton b167bc2f00 Merge branch 'master' into blender2.8 2018-05-18 13:45:48 +02:00
Campbell Barton cb50c288d4 Add missing header 2018-05-18 13:43:41 +02:00
Campbell Barton 2451a1951e Merge branch 'master' into blender2.8 2018-05-18 11:02:39 +02:00
Campbell Barton 278e3f7d5f Logging: add --show-log-backtrace
Useful in debug builds to see a functions callers.
2018-05-18 11:00:47 +02:00
Jeroen Bakker d3c4248946 Workbench: StudioLight HDRI's
The Studio lights are now loaded from disk. The location is
`datafiles/studiolights` they need to be JPG for now. JPG cannot store
HDRI color range but they are clamped inside the Workbench
engine for speed reason. I didn't select JP2K as it might not be
enabled.

Users can add upto 20 HDRI files. This limitation is inside the
RNA_space.c Currently the icons are calculated when you first open the
selection box for the HDRI's. We could add them to a background
rendering later.

I added 2 test files a sky texture rendered in Cycles and an HDRI from
cloud.blender.org.
2018-05-11 17:02:13 +02:00
Campbell Barton aab5ac25f2 Remove Frame Server
This feature is limited (only byte PPM output, no multi-view),
only works with specific configurations.

This also causes some maintenance overhead
when testing changes to the render pipeline.
2018-05-09 12:50:26 +02:00
Campbell Barton eeab3563d7 Merge branch 'master' into blender2.8 2018-05-04 08:02:11 +02:00
Campbell Barton c7cfee04c4 Logging: setting log level wasn't working 2018-05-04 08:00:22 +02:00
Campbell Barton 7958a2b40e Docs: correct debug help message 2018-04-25 12:30:11 +02:00
Campbell Barton 2fe35914e1 CMake: generate icon list for installation
MSVC users weren't getting icons installed, since glob isn't reliable,
list all files in a section which the update script maintains.
2018-04-25 09:24:54 +02:00
Campbell Barton 3581b997d4 UI: use icons for the toolbar 2018-04-24 09:19:28 +02:00
Brecht Van Lommel f9cf2e2f6c Workspaces: remove workspace engine, use 3D viewport draw mode instead.
ViewRender was removed, which means we can't get the render engine for files
saved in 2.8. We assume that any files saved in 2.8 were intended to use Eevee
and set the engine to that.

A fix included with this is that .blend thumbails now draw with Clay mode,
and never Eevee or Cycles. These were drawn with solid mode in 2.7, and should
be very fast and not e.g. load heavy image textures.

Differential Revision: https://developer.blender.org/D3156
2018-04-18 16:35:38 +02:00
Dalai Felinto 159806140f Removing Blender Game Engine from Blender 2.8
Folders removed entirely:
* //extern/recastnavigation
* //intern/decklink
* //intern/moto
* //source/blender/editors/space_logic
* //source/blenderplayer
* //source/gameengine

This includes DNA data and any reference to the BGE code in Blender itself.
We are bumping the subversion.

Pending tasks:
* Tile/clamp code in image editor draw code.
* Viewport drawing code (so much of this will go away because of BI removal
  that we can wait until then to remove this.
2018-04-17 17:51:28 +02:00
Campbell Barton 3eaf77fdd3 Merge branch 'master' into blender2.8 2018-04-05 16:19:43 +02:00
Campbell Barton 1761095abc Logging: use -1 log level to log all levels 2018-04-05 13:55:04 +02:00
Campbell Barton b65ea517eb Merge branch 'master' into blender2.8
- Undo that changes modes currently asserts,
  since undo is now screen data.

  Most likely we will change how object mode and workspaces work
  since it's not practical/maintainable at the moment.

- Removed view_layer from particle settings
  (wasn't needed and complicated undo).
2018-04-01 11:03:25 +02:00
Campbell Barton 651b8fb14e Undo: unified undo system w/ linear history
- Use a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
  should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
  undo data is restored.
- Some undo types accumulate changes (image & text editing)
  others store the state multiple times (with de-duplication).
  This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
  manage restoring correct ID's.
  Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
  Previously this wasn't done, making history fail in some cases.
  This can be optimized to skip some combinations of undo steps.

grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.

See D3113
2018-03-31 20:40:37 +02:00
Campbell Barton db8e7f9780 Logging: add argument --log-show-basename
Optionally strips leading path from filenames when logging.
2018-03-31 15:29:46 +02:00
Campbell Barton 5cb440492e Cleanup: --help text output
Some arguments missed their <value>.
2018-03-31 14:53:15 +02:00
Campbell Barton ac4513a5b8 Logging: add ability to exclude categories. 2018-03-31 12:52:47 +02:00
Campbell Barton 891c1cfc9a C Logging: use instead of printf for messages
- See `--log` help message for usage.
- Supports enabling categories.
- Color severity.
- Optionally logs to a file.
- Currently use to replace printf calls in wm module.

See D3120 for details.
2018-03-30 18:57:41 +02:00
Sergey Sharybin 36e7de9eb3 Merge branch 'master' into blender2.8 2018-03-16 12:26:37 +01:00
Sergey Sharybin da4efaeb87 Depsgraph: Support colored addresses in debug prints
Enabled with --debug-depsgraph-pretty, only works with ANSI terminals.

Thanks Bastien for review!
2018-03-16 12:24:51 +01:00
Sergey Sharybin 733b9e4f99 Merge branch 'master' into blender2.8 2018-03-12 17:31:46 +01:00
Sergey Sharybin a752bc148e Depsgraph: Make timing profile a command line option
This way we can add even more statistics, even one which will be print
to the console.

Would be nice if we also have verbosity level control.
2018-03-12 17:01:02 +01:00
Gaia Clary ddae05cdca Merge remote-tracking branch 'origin' into blender2.8 2018-03-11 23:45:53 +01:00
Arto Kitula 3eaa408cb3 Fix T54274, and rename option --window-borderless to --window-fullscreen 2018-03-11 12:26:43 +02:00
Campbell Barton a5a0dcec90 Merge branch 'master' into blender2.8 2018-03-06 19:13:41 +11:00
Arto Kitula b5b5260464 Fix T54234, add BLENDER_VERSION_CHAR to .plist 2018-03-06 02:36:29 +02:00
Dalai Felinto 06420c5fe8 Refactor depsgraph/render logic to serve evaluated depsgraph to engines
User notes
----------
Compositing, rendering of multi-layers in Eevee should be fully working now.

Development notes
-----------------
Up until now we were still using the same depsgraph for rendering and viewport
evaluation. And we had to go out of our ways to be sure the depsgraphs were
updated.

Now we iterate over the (to be rendered) view layers and create a depsgraph to
each one, fully evaluated and call the render engines (Cycles, Eevee, ...) with
this viewlayer/depsgraph/evaluation context.

At this time we are not handling data persistency, Depsgraph is created from
scratch prior to rendering each frame.  So I got rid of most of the partial
update calls we had during the render pipeline.

Cycles: Brecht Van Lommel did a patch to tackle some of the required Cycles
changes but this commit mark these changes as TODOs. Basically Cycles needs to
render one layer at a time.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D3073
2018-02-27 18:25:54 -03:00
Sergey Sharybin d4ee0cee51 Merge branch 'master' into blender2.8 2018-02-21 10:51:58 +01:00
Sergey Sharybin fe1a508e55 Depsgraph: Split debug flags
Now it's possible to have debug messages for following things:

- Graph construction
- Graph evaluation
- Graph tagging
2018-02-21 10:44:36 +01:00
Campbell Barton ca5fdd857b Merge branch 'master' into blender2.8 2018-02-16 01:17:43 +11:00
Campbell Barton 2aef87bfae Cleanup: rename BLI_thread.h API
- Use BLI_threadpool_ prefix for (deprecated)
  thread/listbase API.
- Use BLI_thread as prefix for other functions.

See P614 to apply instead of manually resolving conflicts.
2018-02-16 01:13:46 +11:00
Campbell Barton c3eb22e2ab Merge branch 'master' into blender2.8 2018-02-02 14:15:29 +11:00
Ray Molenkamp 1a840c3e27 Fix T53951: Copy ms runtime dlls using InstallRequiredSystemLibraries.cmake
Differential Revision: https://developer.blender.org/D3032
2018-02-01 08:26:14 -07:00
Sergey Sharybin 0d64857c3f Merge branch 'master' into blender2.8 2018-01-30 14:32:27 +01:00
Campbell Barton c80b1f5410 Cleanup: warning, spelling 2018-01-30 21:02:27 +11:00
Campbell Barton 9dfbd98339 Cleanup: whitespace 2017-12-04 17:20:26 +11:00
Dalai Felinto 3abe8b3292 Rename any instance of scene layer or render layer in code with view layer
The RenderResult struct still has a listbase of RenderLayer, but that's ok
since this is strictly for rendering.

* Subversion bump (to 2.80.2)
* DNA low level doversion (renames) - only for .blend created since 2.80 started

Note: We can't use DNA_struct_elem_find or get file version in init_structDNA,
so we are manually iterating over the array of the SDNA elements instead.

Note 2: This doversion change with renames can be reverted in a few months. But
so far it's required for 2.8 files created between October 2016 and now.

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D2927
2017-11-23 07:48:23 -02:00
Sergey Sharybin 4e6f86942c Depsgraph: Remove debug only code 2017-11-22 12:08:02 +01:00
Sergey Sharybin d325e6f0e8 Depsgraph: Make dependency graph to be built from scene layer
This is a final step of having proper ownership. Now selecting different
layers in the "top bar" will actually do what this is expected to do.

Surely, there are still things to be done under the hood, that will happen
in a less intrusive way.
2017-11-09 11:20:17 +01:00
Brecht Van Lommel 7b1d707481 Merge branch 'master' into blender2.8 2017-11-08 00:20:59 +01:00
Sergey Sharybin ba1197fe5e Depsgraph: Simplify some workarounds and make API closer to final 2017-11-07 16:36:25 +01:00
Ray Molenkamp 5f2be40658 Windows: Add additional crash diagnostic information.
To help diagnose issues like T53259, it is useful to know the module causing the issue (is it us, or some opengl icd, or python module?) and while we cannot do stackdumps on release builds on windows, it is possible to display the faulting module. This commit changes the exception handler to output the following information:

Error   : EXCEPTION_ACCESS_VIOLATION (Type of exception , this we had before)
Address : 0x0000000140193726 (Address of the exception, new)
Module  : k:\BlenderGit\build_windows_Full_noge_x64_vc15_Release\bin\Release\blender.exe (module of the exception, new)
2017-11-07 07:57:59 -07:00
Sergey Sharybin 60bf1c05e5 Depsgraph: Fix/workaround crash when rendering from command line
Need to ensure Render has proper dependency graph.

While this is a subject of re-design (render pipeline should manage all
dependency graphs it needs, and not demand external users to provide
depsgraph), this is good to have something working, so we can run regression
tests and such.
2017-11-07 11:37:45 +01:00
Brecht Van Lommel 2440415bd3 Merge branch 'master' into blender2.8 2017-11-07 03:08:24 +01:00
Arto Kitula 956ee5e265 macOS: remove old OpenMP lib stuff from cmake 2017-11-06 23:54:35 +02:00
Campbell Barton 4d2416b99c Merge branch 'master' into blender2.8 2017-10-20 00:29:04 +11:00
Campbell Barton 465b6333cc Correct last commit, use WM_exit
Without this temp directory isn't removed.
2017-10-20 00:19:58 +11:00
Campbell Barton 9ee8319cd5 Exit with invalid command line arguments
Loading blender with an unknown name would interpret it as a blend file.

This meant passing `--arg` arguments would end up creating new
blend files which could be confusing if you made a typo on a command
line argument.

Now check the string has a blend file extension,
exiting if it doesn't.
2017-10-20 00:10:40 +11:00
Sergey Sharybin 3e8abc0535 Depsgraph: Make Copy-on-Write a command line option
Before it was a compile time option which was not very easy to use or test. Now
the project is getting more mature, so very soon we will be able to call for a
public tests of limited features.

The copy-on-write (which includes animation, modifiers) is enabled using
--enable-copy-on-write command line argument.
2017-10-18 14:35:34 +02:00
Dalai Felinto e4f2b2be26 Workspace: Move engines to workspace and Properties Editor cleanup
Engine is not stored in WorkSpaces. That defines the "context" engine, which
is used for the entire UI.

The engine used for the poll of nodes (add node menu, new nodes when "Use Nodes")
is obtained from context.

Introduce a ViewRender struct for viewport settings that are defined for
workspaces and scene. This struct will be populated with the hand-picked
settings that can be defined per workspace as per the 2.8 design.

* use_scene_settings
* properties editor: workshop + organize context path

Use Scene Settings
==================
For viewport drawing, Workspaces have an option to use the Scene render
settings (F12) instead of the viewport settings.

This way users can quickly preview the final render settings, engine and
View Layer. This will affect all the editors in that workspace, and it will be
clearly indicated in the top-bar.

Properties Editor: Add Workspace and organize context path
==========================================================

We now have the properties of:

Scene, Scene > Layer, Scene > World, Workspace

[Scene | Workspace] > Render Layer > Object
[Scene | Workspace] > Render Layer > Object > Data
(...)

Reviewers: Campbell Barton, Julian Eisel
Differential Revision: https://developer.blender.org/D2842
2017-10-16 17:29:04 -02:00
Campbell Barton 6ec43a765b Merge branch 'master' into blender2.8 2017-10-10 01:36:36 +11:00
Campbell Barton 4b3e6cb728 Cleanup: --help text
Sync with manual
2017-10-08 18:49:58 +11:00
Campbell Barton e3fe8128e4 Merge branch 'master' into blender2.8 2017-09-29 19:55:00 +10:00
Brecht Van Lommel c10ac1bb5c macOS: officially upgrade to 10.9 libraries from lib/darwin.
This removes a bunch of code that is no longer needed, and running
"make update" will now automatically download the new libraries.

Differential Revision: https://developer.blender.org/D2861
2017-09-28 20:53:06 +02:00
Dalai Felinto 16edfc516e --debug-gpu-shader: Dump GLSL shaders to disk
This is really convenient for development. Either for profiling the
generated shaders or to check if the generated code is correct.

It writes the shaders to the temporary blender session folder.
2017-09-27 18:03:00 +02:00
Sergey Sharybin 98ba302f70 Merge branch 'master' into blender2.8 2017-09-25 18:57:43 +05:00
Aaron Carlisle efd5e3c254 Remove quicktime support
It has been deprecated since at least macOS 10.9 and fully removed in 10.12.

I am unsure if we should remove it only in 2.8. But you cannot build blender with it supported when using a modern xcode version anyway so I would tend towards just removing it also for 2.79 if that ever happens.

Reviewers: mont29, dfelinto, juicyfruit, brecht

Reviewed By: mont29, brecht

Subscribers: Blendify, brecht

Maniphest Tasks: T52807

Differential Revision: https://developer.blender.org/D2333
2017-09-22 16:40:05 -04:00
Sergey Sharybin 128c7c3ba1 Merge branch 'master' into blender2.8 2017-09-22 13:26:49 +05:00
Sergey Sharybin 4808c488c5 CMake: Add extra requests dependencies
Apparently, we already had some code to deal with this. So for now just
added some extra dependencies needed for latest requests.
2017-09-21 18:53:02 +05:00
Ray Molenkamp 692631551f [cmake/msvc] Update python to 3.6 + numpy to 1.13.1 2017-09-20 12:51:36 -06:00
Joerg Mueller e2e8f4b9e1 Audaspace: removing old device backend names. 2017-09-19 18:08:42 +02:00
Sergey Sharybin 028c5592cd Merge branch 'master' into blender2.8 2017-09-15 12:35:20 +05:00
Sergey Sharybin ff79406404 Fix T52653: Render output of linked scenes conflicts with other scenes with the same name
The issue was caused by render result identifier only consist of scene name,
which could indeed cause conflicts.

On the one hand, there are quite some areas in Blender where we need identifier
to be unique to properly address things. Usually this is required for sub-data
of IDs, like bones. On another hand, it's not that hard to support this
particular case and avoid possible frustration.

The idea is, we add library name to render identifier for linked scenes. We use
library name and not pointer so we preserve render results through undo stack.

Reviewers: campbellbarton, mont29, brecht

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2836
2017-09-14 16:50:19 +05:00
Brecht Van Lommel 84d33023ab Merge branch 'master' into blender2.8 2017-08-15 18:51:25 +02:00
Brecht Van Lommel 535e83687d macOS build: simplify python install for new 10.9 libraries.
We stop using the .zip file and just have all files now in
lib/darwin/python/lib, along with numpy, numpy headers and requests.
This makes it consistent with Linux and simplifies code.

For old libraries the .zip stays, code for that gets removed when we
fully switch to new libraries.
2017-08-15 17:40:27 +02:00
Julian Eisel 7f564d74f9 Main Workspace Integration
This commit does the main integration of workspaces, which is a design we agreed on during the 2.8 UI workshop (see https://wiki.blender.org/index.php/Dev:2.8/UI/Workshop_Writeup)

Workspaces should generally be stable, I'm not aware of any remaining bugs (or I've forgotten them :) ). If you find any, let me know!
(Exception: mode switching button might get out of sync with actual mode in some cases, would consider that a limitation/ToDo. Needs to be resolved at some point.)

== Main Changes/Features
* Introduces the new Workspaces as data-blocks.
* Allow storing a number of custom workspaces as part of the user configuration. Needs further work to allow adding and deleting individual workspaces.
* Bundle a default workspace configuration with Blender (current screen-layouts converted to workspaces).
* Pressing button to add a workspace spawns a menu to select between "Duplicate Current" and the workspaces from the user configuration. If no workspaces are stored in the user configuration, the default workspaces are listed instead.
* Store screen-layouts (`bScreen`) per workspace.
* Store an active screen-layout per workspace. Changing the workspace will enable this layout.
* Store active mode in workspace. Changing the workspace will also enter the mode of the new workspace. (Note that we still store the active mode in the object, moving this completely to workspaces is a separate project.)
* Store an active render layer per workspace.
* Moved mode switch from 3D View header to Info Editor header.
* Store active scene in window (not directly workspace related, but overlaps quite a bit).
* Removed 'Use Global Scene' User Preference option.
* Compatibility with old files - a new workspace is created for every screen-layout of old files. Old Blender versions should be able to read files saved with workspace support as well.
* Default .blend only contains one workspace ("General").
* Support appending workspaces.

Opening files without UI and commandline rendering should work fine.

Note that the UI is temporary! We plan to introduce a new global topbar
that contains the workspace options and tabs for switching workspaces.

== Technical Notes
* Workspaces are data-blocks.
* Adding and removing `bScreen`s should be done through `ED_workspace_layout` API now.
* A workspace can be active in multiple windows at the same time.
* The mode menu (which is now in the Info Editor header) doesn't display "Grease Pencil Edit" mode anymore since its availability depends on the active editor. Will be fixed by making Grease Pencil an own object type (as planned).
* The button to change the active workspace object mode may get out of sync with the mode of the active object. Will either be resolved by moving mode out of object data, or we'll disable workspace modes again (there's a `#define USE_WORKSPACE_MODE` for that).
* Screen-layouts (`bScreen`) are IDs and thus stored in a main list-base. Had to add a wrapper `WorkSpaceLayout` so we can store them in a list-base within workspaces, too. On the long run we could completely replace `bScreen` by workspace structs.
* `WorkSpace` types use some special compiler trickery to allow marking structs and struct members as private. BKE_workspace API should be used for accessing those.
* Added scene operators `SCENE_OT_`. Was previously done through screen operators.

== BPY API Changes
* Removed `Screen.scene`, added `Window.scene`
* Removed `UserPreferencesView.use_global_scene`
* Added `Context.workspace`, `Window.workspace` and `BlendData.workspaces`
* Added `bpy.types.WorkSpace` containing `screens`, `object_mode` and `render_layer`
* Added Screen.layout_name for the layout name that'll be displayed in the UI (may differ from internal name)

== What's left?
* There are a few open design questions (T50521). We should find the needed answers and implement them.
* Allow adding and removing individual workspaces from workspace configuration (needs UI design).
* Get the override system ready and support overrides per workspace.
* Support custom UI setups as part of workspaces (hidden panels, hidden buttons, customizable toolbars, etc).
* Allow enabling add-ons per workspace.
* Support custom workspace keymaps.
* Remove special exception for workspaces in linking code (so they're always appended, never linked). Depends on a few things, so best to solve later.
* Get the topbar done.
* Workspaces need a proper icon, current one is just a placeholder :)

Reviewed By: campbellbarton, mont29

Tags: #user_interface, #bf_blender_2.8

Maniphest Tasks: T50521

Differential Revision: https://developer.blender.org/D2451
2017-06-01 19:59:37 +02:00
Bastien Montagne 8ead56c4c9 Merge branch 'master' into blender2.8 2017-05-28 17:48:59 +02:00
Aaron Carlisle 9f044cb422 Remove MinGW support
The Issue
=======

For a long time now MinGW has been unsupported and unmaintained and at this point,
it looks like something that we should just leave behind and move on.


Why Remove
==========

One of the big motivations for MinGW back in the day is that it was free compared to MSVC which was licensed based.
However, now that this is no longer true we have basically stopped updating the need CMake files.
Along with the CMake files, there are several patches to the extern libs needed to make this work.  For example, see:
https://developer.blender.org/diffusion/B/browse/master/extern/carve/patches/mingw_w64.patch

If we wanted to keep MinGW then we would need to make more custom patches to the external libs and
this is not something our platform maintainers are willing to do.

For example, here is the patches needed to build python: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python3

Fixes T51301

Differential Revision: https://developer.blender.org/D2648
2017-05-27 15:34:55 -04:00
Campbell Barton f2a8b74c25 Merge branch 'master' into blender2.8 2017-05-26 19:57:28 +10:00