Commit Graph

82012 Commits

Author SHA1 Message Date
Brecht Van Lommel 3064da1200 Keymap: move builtin keymaps from C to Python
This should be purely an implementation change,
for end users there should be no functional difference.

The entire key configuration is in one file with ~5000 lines of code.
Mostly avoiding code duplication and preserve comments and utility
functions from the C code.
It's a bit long but for searching and editing it's also convenient to
have it all in one file.

Notes:

- Actual keymap is shared by blender / blender_legacy
  and stored in `keymap_data/blender_default.py`

  This only generates JSON-like data to be passed into
  `keyconfig_import_from_data`, allowing other presets to load and
  manipulate the default keymap.

- Each preset defines 'keyconfig_data'
  which can be shared between presets.

- Some of the utility functions for generating keymap items still
  need to be ported over to Python.

- Some keymap items can be made into loops (marked as TODO).

See: D3907
2018-11-09 11:33:06 +11:00
Clément Foucault b43ce7908f Eevee: Fix broken Vector Transform node
The Camera to Object space matrix was not implemented in gpu_codegen.
2018-11-08 21:50:17 +01:00
Clément Foucault 4f11441913 Eevee: Add partial support for the Light Path Node
This makes it possible to tweak indirect lighting in the shader.

Only a subset of the outputs is supported and the ray depth has not exactly
the same meaning:

Is Camera : Supported.
Is Shadow : Supported.
Is Diffuse : Supported.
Is Glossy : Supported.
Is Singular : Not supported. Same as Is Glossy.
Is Reflection : Not supported. Same as Is Glossy.
Is Transmission : Not supported. Same as Is Glossy.
Ray Length : Not supported. Defaults to 1.0.
Ray Depth : Indicate the current bounce when baking the light cache.
Diffuse Depth : Same as Ray Depth but only when baking diffuse light.
Glossy Depth : Same as Ray Depth but only when baking specular light.
Transparent Depth : Not supported. Defaults to 0.
Transmission Depth : Not supported. Same as Glossy Depth.

Caveat: Is Glossy does not work with Screen Space Reflections but does work
with reflection planes (when used with SSR or not).
We have to render the world twice for that to work.
2018-11-08 19:20:40 +01:00
Clément Foucault 9d12a5aa9e Eevee: Fix geometry node for environments and support true_normal
Also minor cleanup for the Bump node.
2018-11-08 19:20:40 +01:00
Clément Foucault 1250ace641 Eevee: Fix refraction materials
Fix refraction depth not working without ScreenSpace Refraction.
Fix ScreenSpace Refraction masking reflections.
2018-11-08 19:20:40 +01:00
Brecht Van Lommel de8c2336ad Fix wrong selectability icon in viewport menu. 2018-11-08 19:06:42 +01:00
Brecht Van Lommel 626ca4a2d5 Fix X-Ray option showing in LookDev mode, where it does nothing. 2018-11-08 19:00:53 +01:00
Brecht Van Lommel f17a5a96c2 Fix depsgraph console warning after recent changes. 2018-11-08 18:53:30 +01:00
Brecht Van Lommel c39f34def9 Fix Cycles viewport render info overlapping other text.
Now it shows more compact info below the view/object name. Render time and
memory usage is left out, as in most cases this is not so important. These
could be added back optionally if needed.
2018-11-08 18:31:33 +01:00
Pablo Vazquez c81ddc97ef UI: Tweaks to Add menu in Video Sequencer Editor.
Mainly organization and bringing it closer to the Add menu in the 3D Viewport.

* Icons for most top-level items when available.
* New Transitions menu for Cross, Gamma Cross and Wipe.
* Move Color and Text to top level. These options are used way too often to be in a submenu.
Having a menu with 2 entries defeats the purpose, so I've removed it for now. I checked if
add-ons used it and apparently not. It can be brought back if needed.
* Avoid empty dropdown in Scene/Mask/Clip. Solution is ugly for now and should be improved in C.
* Some effects couldn't be used without 1 or 2 strips selected, now the menu entry is grayed out accordingly.
* Some more icons for other menus.
2018-11-08 16:01:26 +01:00
Pablo Vazquez acb8334e70 UI: Some icons for Image menu in Image editor. 2018-11-08 16:01:26 +01:00
Brecht Van Lommel 11a53ec28a Fix T57689: world nodes / texture not updating for Eevee.
Only do GPU material updates through depsgraph evaluation now. This was
already happening for material, just missing for the world.
2018-11-08 16:01:02 +01:00
Sergey Sharybin d4370e2e00 Cleanup, compiler warnings in release mode 2018-11-08 15:49:25 +01:00
Brecht Van Lommel 146b39a45d Merge branch 'master' into blender2.8 2018-11-08 15:15:29 +01:00
Sergey Sharybin 3cf724209f Cleanup, spelling 2018-11-08 15:00:19 +01:00
Brecht Van Lommel 116be3deff Fix build on 32bit after Embree changes. 2018-11-08 14:58:01 +01:00
Jacques Lucke 70355052e2 Fix: show options of image empty only for image empties 2018-11-08 14:30:27 +01:00
Alexander Gavrilov fe0fdf1771 RNA: tag animation update when changing Action Extrapolation/Blend/etc.
These fields affect the final result when using NLA.
2018-11-08 14:01:45 +03:00
Bastien Montagne 0bb33294c1 RNA API: ViewLayers: add name to LayerCollection struct.
Just use Collection name (same as for material slots e.g.).

That way, one can access those by their names as well, in
LayerCollection.children ... collection property (yeah, collection,
collection, and moar collection).
2018-11-08 11:36:33 +01:00
Campbell Barton aba4a56703 UI: fix glitch showing the redo panel 2018-11-08 15:44:59 +11:00
Ray Molenkamp 406f36f574 build: add proper embree support to platform_win32.cmake
made the use of findpackage optional and add support for debug builds
2018-11-07 19:34:49 -07:00
Ray Molenkamp d3b11de7d6 build_environment: add debug libs for embree on windows 2018-11-07 19:33:07 -07:00
Ray Molenkamp cd9f3019f4 build_deps_windows: add option to to only create project files. 2018-11-07 19:18:53 -07:00
Lukas Stockner 47c77cd89c Cycles: Write Cryptomatte metadata according to the specification
Reviewers: brecht, sergey, swerner

Subscribers: creamsurfer, Tanguy, Noss, SteffenD

Differential Revision: https://developer.blender.org/D3862
2018-11-08 01:07:54 +01:00
Lukas Stockner 5987c4bc57 Render API: Support arbitrary length for custom image metadata fields 2018-11-08 01:07:54 +01:00
Campbell Barton a421cfa8d3 UI: hide bundled addons which haven't been updated
All are displayed when '--debug' is set, see: T56351
2018-11-08 10:10:08 +11:00
Campbell Barton bcf1997ac2 Merge branch 'master' into blender2.8 2018-11-08 09:56:22 +11:00
Campbell Barton 9ccb70f202 Cleanup: minor simplification to user-addon check 2018-11-08 09:54:13 +11:00
Campbell Barton f12d2adc87 RNA: Object.select_set use boolean, only select
- Was setting active state, making it necessary to backup/restore
  active object in cases where this isn't needed.
  Existing scripts are explicitly setting the active object when needed.

- Use a boolean select arg (toggle selection wasn't used anywhere).

- Add an optional view layer argument since scripts should be able to
  operate outside the user context.
2018-11-08 08:54:55 +11:00
Campbell Barton c121bc6219 Cleanup: use explicit 'select_and_set_active' API name
Selection should be separated from active state and handled by higher
level code (operators/editors) instead of happening automatically.
2018-11-08 08:31:11 +11:00
Clément Foucault bdd44564c9 GPU: Cleanups: Remove GPUMatType, Vectorize / MADD some operations 2018-11-07 22:16:13 +01:00
Clément Foucault 4f709152f4 Eevee: Add support for interpolation options for Environment Texture nodes 2018-11-07 22:16:13 +01:00
Clément Foucault e0edac4cb2 Eevee: Support for extension type in the Node Image Texture
This does not work with the box projection mode. Implementing for box
projection mode would be difficult, slow, and produce a lot of code
duplication. Also i'm not sure this is worth it, as it's not a common use
case.
2018-11-07 22:16:13 +01:00
Campbell Barton 0b837a4986 Cleanup: style, use const args 2018-11-08 08:02:09 +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
Bastien Montagne 1ff8be24ef Cleanup/Refactor: move Main stuff into BKE's new main.c file (and header).
We already had a BKE_main.h header, no reason not to put there
Main-specific functions, BKE_library has already more than enough to
handle with IDs and library management!
2018-11-07 20:58:53 +01:00
Bastien Montagne 4b2110fc86 Cleanup: Remove 'BKE_library.h' include from 'BKE_main.h'
That kind of implicit includes should really only be done when totally,
absolutely necessary, and ideally only with rather simple 'second-level'
headers.

Otherwise not being explicit with includes always end up biting in
unexpected ways...
2018-11-07 20:58:53 +01:00
Bastien Montagne 4779165ca1 Fix dpesgraph wrongly refcounting NLA strip actions when duplicating IDs.
NLA strips are users of their action, so we need to pass along ID
management flags.

This commit also cleans up a bit things by passing along ID_CREATE/COPY
flags instead of dummy booleans...
2018-11-07 20:58:53 +01:00
Stefan Werner a0d8e52b54 Cycles: Fixed BVH UI options enabling/disabling when Embree is enabled. 2018-11-07 20:50:45 +01:00
Stefan Werner 85a9744905 Merge branch 'master' into blender2.8 2018-11-07 20:44:40 +01:00
Stefan Werner ee6cc1d558 install_deps: Added optional build of Embree to install_deps.sh, turned off by default. 2018-11-07 20:36:03 +01:00
Alexander Gavrilov 6be69a6b75 NLA: use animsys_write_orig_anim_rna when applying NLA stack results.
Without this keyframing on top of an NLA stack is quite weirdly broken.
2018-11-07 19:59:15 +03:00
Alexander Gavrilov 921cad194d Depsgraph: add proper handling of actions contained in NLA strips. 2018-11-07 18:17:30 +03:00
Jacques Lucke b82eac8986 Py API Docs: improve 2D image example 2018-11-07 16:14:11 +01:00
Antonioya c018cea680 GP: Show all objects sharing data in edit modes
Only need hide particle objects
2018-11-07 16:13:49 +01:00
Jacques Lucke 9a38526be0 Py API Docs: show gpu_extras module 2018-11-07 15:45:28 +01:00
Stefan Werner d3320c5488 Cycles: Rearranged macros in kernel_types.h to fix Embree build. 2018-11-07 15:20:24 +01:00
Sergey Sharybin 7b271d5fc1 Depsgraph: Ensure dependency cycle does not clear runtime memory
If there was a dependency cycle involved, it was possible that pchan
array will be freed before all bones are evaluated. Now clear is
done in a dedicated node, which is never a part of dependency cycle.
2018-11-07 15:06:39 +01:00
Brecht Van Lommel 4610ca599a Merge branch 'master' into blender2.8 2018-11-07 14:54:32 +01:00
Brecht Van Lommel 36b9ee1277 Fix T57390: properties editor crash creating new scene in some cases. 2018-11-07 14:54:16 +01:00