Commit Graph

62003 Commits

Author SHA1 Message Date
Brecht Van Lommel
d7c2b78822 UI: add subpanel support.
In the Python API, any panel becomes a subpanel by setting bl_parent_id
to the name of the parent panel. These subpanels can contain advanced or
less commonly used settings.
2018-06-03 21:30:35 +02:00
Campbell Barton
81dbf08eb4 Merge branch 'master' into blender2.8 2018-06-03 17:09:07 +02:00
Campbell Barton
38eb91c848 Cleanup: correct variable name, doxy sections 2018-06-03 17:06:13 +02:00
Clément Foucault
25ff7a4f2a DRW: Hair: Add additionnal subdivision smoothing support.
Only use catmull-rom interpolation for now. It's smoother and does not
exhibit artifacts.
2018-06-03 16:45:03 +02:00
Clément Foucault
06dd89b0ca GPUTexture: Fix memleak in orphaned texture management. 2018-06-03 16:45:03 +02:00
Campbell Barton
e657a4af13 Merge branch 'master' into blender2.8 2018-06-03 15:20:11 +02:00
Clément Foucault
4c4eb1ce20 Workbench: Fix memleaks. 2018-06-03 15:26:53 +02:00
Clément Foucault
d0f7ab27a8 Wireframe: Optimization for intel GPUs.
Intel GPU take more advantage of the geometry shader than other vendors.

Using a simple geom shader approach in this case is more performant.
2018-06-03 15:26:37 +02:00
Campbell Barton
335b193336 Cleanup: add argument names to screen callbacks 2018-06-03 15:11:31 +02:00
Clément Foucault
778a19a13a DRW: Fix hair disapearing if emitter is culled. 2018-06-03 12:36:03 +02:00
Clément Foucault
32c5972653 Workbench: Rework hair support.
Now hairs are shaded properly in workbench and support texturing.

I also added a 10% random normal direction per hair to have a bit more
variation in the shading. This is hardcoded for now.
2018-06-03 12:36:03 +02:00
Campbell Barton
38bf3b8d23 Merge branch 'master' into blender2.8 2018-06-03 11:24:57 +02:00
Campbell Barton
6221180963 Cleanup: remove blockscale & handler
Replace with link_flag, currently unused,
needed for dynamic space types which is planned.
2018-06-03 11:12:50 +02:00
Campbell Barton
c55e90da4c Cleanup: -Wswitch warning 2018-06-02 21:38:31 +02:00
Clément Foucault
6c6c4da718 GPU: Fix texture being freed in threads without ogl context bound.
This is a dirty fix. A bit more cleaner approach would be to check if a
context is bound and delay the deletion only in this case.
Also we may want to do this orphan deletion at some other places than
wm_window_swap_buffers.
2018-06-02 21:16:40 +02:00
Clément Foucault
bc6358a580 DRW: Add uniform name recording in debug mode. 2018-06-02 21:16:40 +02:00
Clément Foucault
f25e459f8f DRW: Make the Procedural hair update part of the drawmanager.
Instead of relying on the engine integration which is redundant.
2018-06-02 21:16:40 +02:00
Clément Foucault
98e4d548a1 Eevee: Hair: Make SSR works with hairs. 2018-06-02 21:16:40 +02:00
Clément Foucault
119423b252 Eevee: Cleanup unused Ghash 2018-06-02 21:16:40 +02:00
Clément Foucault
8ace49dedc Eevee: Add shadow support for hairs. 2018-06-02 21:16:40 +02:00
Clément Foucault
1de73fc6c3 Eevee: Hair: Make hairs visible even if the show emitter option is disabled. 2018-06-02 21:16:40 +02:00
Clément Foucault
08a2c5f224 Eevee: Add support for hair random property.
Do note that it does not match cycles implementation.

Also we could precompute the hash per strand before rendering but that would
suggest it's not per engine specific.

If we make the random value internal to blender then it won't be a matter
because other renderers will have access to the same value.
2018-06-02 21:16:40 +02:00
Clément Foucault
4430bd3644 Eevee: CodeStyle: Fix naming and confusion about the hairs vectors. 2018-06-02 21:16:40 +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
Germano
6de656b4f2 transform_snap_object: Do not use occlusion test when X-Ray is enabled. 2018-06-02 13:11:51 -03:00
Germano
58efa7d686 Fix inaccuracy of SCREEN_OT_area_split when snap to midpoint and adjacent.
By default when moving a edge of the screen it always snaps to an invisible grid with unit of 4 pixels.
This was also affecting the snap to the midpoint and adjacent.
The solution was to make the snap to areagrid optional and use values of `origmin` and `origsize` that match the transformations in screen_edit.c.
2018-06-02 12:19:49 -03:00
Campbell Barton
0de0cee9a2 Fix crash running in background mode 2018-06-02 14:53:07 +02:00
Campbell Barton
9cd2e4fa3f Cleanup: quiet warnings w/o Python 2018-06-02 13:10:27 +02:00
Campbell Barton
b608133075 Fix crash if no tool is set 2018-06-02 13:10:15 +02:00
Campbell Barton
a08a8aa928 Merge branch 'master' into blender2.8 2018-06-02 13:09:12 +02:00
Campbell Barton
c140f11946 Cleanup: warning 2018-06-02 11:58:01 +02:00
Campbell Barton
bfe1d0e0dc Merge branch 'master' into blender2.8 2018-06-01 18:26:42 +02:00
Campbell Barton
75fc1c3507 Cleanup: trailing whitespace (comment blocks)
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-06-01 18:19:39 +02:00
Campbell Barton
297bf7235b Cleanup: whitespace 2018-06-01 18:10:43 +02:00
Sybren A. Stüvel
c0dd355926 Modifiers: ported applying modifier from DerivedMesh → Mesh 2018-06-01 17:35:26 +02:00
Sybren A. Stüvel
4fccb8a023 Boolean modifier: fixed crash when applying the modifier 2018-06-01 17:35:26 +02:00
Bastien Montagne
e44743736f Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/io/io_collada.c
	source/blender/editors/object/object_bake.c
	source/blender/editors/object/object_edit.c
	source/blender/editors/render/render_internal.c
	source/blender/makesrna/intern/rna_object_api.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-01 17:26:36 +02:00
Jeroen Bakker
e4a727626e X-Ray: Added a slider for the alpha
- will not render when set to 0.0 for speed reasons. so when user sets
transparency to hide everything the bigger passes will be skipped.
2018-06-01 17:15:35 +02:00
Jeroen Bakker
56dc2bf0c5 Workbench: Updated the internal light to have a bit of back lighting 2018-06-01 17:15:35 +02:00
Brecht Van Lommel
9e09900a30 Fix wrong colors for workbench World Background option. 2018-06-01 17:14:06 +02:00
Brecht Van Lommel
0706b410bd UI: use same "Viewport Display" name for scene/object/material panels. 2018-06-01 17:14:06 +02:00
Bastien Montagne
051e186d5c Cleanup: some more G.main removal from editor code. 2018-06-01 17:08:38 +02:00
Clément Foucault
b3be71e07a Mesh Batch Cache: Fix memory leak. 2018-06-01 17:07:45 +02:00
Joshua Leung
72a360827b T54991: Restore support for Motion Path drawing in 2.8
This commit restores support for Motion Path drawing in 2.8 (as it wasn't ported over
to the new draw engines earlier, and the existing space_view3d/drawanimviz.c code was
removed during the Blender Internal removal).

Notes:
* Motion Paths are now implemented as an overlay (enabled by default).
  Therefore, you can turn all of them on/off from the "Overlays" popover

* By and large, we have kept the same draw style as was used in 2.7
  Further changes can happen later following further design work.

* One change from 2.7 is that thicker lines are used by default (2px vs 1px)


Todo's:
* There are some bad-level calls introduced here (i.e. the actgroup_to_keylist() stuff).
  These were introduced to optimise drawing performance (by avoiding full keyframes -> keylist
  conversion step on each drawcall). Instead, this has been moved to the calculation step
  (in blenkernel).  Soon, there will be some cleanups/improvements with those functions,
  so until then, we'll keep the bad level calls.


Credits:
* Clément Foucault (fclem) - Draw Engine magic + Shader Conversion/Optimisation
* Joshua Leung (Aligorith) - COW fixes, UI integration, etc.


Revision History:
See "tmp-b28-motionpath_drawing" branch (rBa12ab5b2ef49ccacae091ccb54d72de0d63f990d)
2018-06-01 16:38:21 +02:00
Campbell Barton
06c4106d03 Fix for fix, indentation was accidental 2018-06-01 15:42:00 +02:00
Campbell Barton
75b2729488 Fix missing braces 2018-06-01 15:37:53 +02:00
Brecht Van Lommel
13ca63d2ad Draw background on pulldown widgets if the header is transparent.
Since the viewport header now supports transparency, text on pulldowns
can be hard to read if their color matches the viewport content.

Background is drawn using the 'inner' theme color, that was unused until now.
2018-06-01 15:11:38 +02:00
Bastien Montagne
3b05034935 Fix broken logic in make static override operators for Collections.
Was pretty sure I already fixed that some weeks ago... but look like it
was not committed or somehow lost...
2018-06-01 14:31:29 +02:00
Campbell Barton
ddf2a58282 Mesh: Replace DM for mesh w/ wpaint vertex picking 2018-06-01 14:29:22 +02:00
Campbell Barton
82b8fd8eaf UI: don't show XYZ text w/ direction buttons 2018-06-01 14:10:43 +02:00