blender.git
3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 30 May 2018 06:49:34 +0000 (08:49 +0200)]
Merge branch 'master' into blender2.8

3 years agoEdit Mode: add success return value
Campbell Barton [Wed, 30 May 2018 06:41:06 +0000 (08:41 +0200)]
Edit Mode: add success return value

Also remove fix for T6614, since BKE_object_obdata_is_libdata
no longer checks proxy.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 30 May 2018 05:34:22 +0000 (07:34 +0200)]
Merge branch 'master' into blender2.8

3 years agoDNA: add OB_DATA_SUPPORT_EDITMODE macro
Campbell Barton [Wed, 30 May 2018 05:31:35 +0000 (07:31 +0200)]
DNA: add OB_DATA_SUPPORT_EDITMODE macro

3 years agoEEVEE: LookDev, reset camera settings
Jeroen Bakker [Tue, 29 May 2018 20:02:36 +0000 (22:02 +0200)]
EEVEE: LookDev, reset camera settings

3 years agoFix last commit.
Germano [Tue, 29 May 2018 18:39:44 +0000 (15:39 -0300)]
Fix last commit.

3 years agoFix T55223: Crash when changing lattice resolution.
Germano [Tue, 29 May 2018 18:39:44 +0000 (15:39 -0300)]
Fix T55223: Crash when changing lattice resolution.

3 years agoCorrect last commit
Campbell Barton [Tue, 29 May 2018 16:18:36 +0000 (18:18 +0200)]
Correct last commit

Left unneeded code in space_context_cycle_invoke

3 years agoKeymap: partially implement changes from T55162
Campbell Barton [Tue, 29 May 2018 15:25:19 +0000 (17:25 +0200)]
Keymap: partially implement changes from T55162

- Use Tab key for search.
- Number keys switch modes.
- The number of the current mode can open a submode menu
  (currently only works for edit-mode)
- Ctrl-Tab, Ctrl-Shift-Tab - cycle workspaces.

3 years agoEEVEE: LookDev blurred background
Jeroen Bakker [Tue, 29 May 2018 15:50:32 +0000 (17:50 +0200)]
EEVEE: LookDev blurred background

3 years agoCleanup
Dalai Felinto [Tue, 29 May 2018 14:53:29 +0000 (16:53 +0200)]
Cleanup

3 years agoFix crash when moving object parented to a curve
Dalai Felinto [Tue, 29 May 2018 14:17:41 +0000 (16:17 +0200)]
Fix crash when moving object parented to a curve

Note, we can probably remove scene from BKE_object_where_is_calc
and force to always use it from depsgraph.

3 years agoUse the correct time to evaluate object in BKE_object_where_is_calc functions
Dalai Felinto [Tue, 29 May 2018 14:32:21 +0000 (16:32 +0200)]
Use the correct time to evaluate object in BKE_object_where_is_calc functions

3 years agoUse correct time for curve parent evaluation
Dalai Felinto [Tue, 29 May 2018 14:11:08 +0000 (16:11 +0200)]
Use correct time for curve parent evaluation

Time should alwaus come from depsgraph, not scene.

3 years agoStudioLight: Calculate Specular irradiance
Jeroen Bakker [Tue, 29 May 2018 14:21:47 +0000 (16:21 +0200)]
StudioLight: Calculate Specular irradiance

3 years agoEEVEE: LookDev reversed the background fadeout
Jeroen Bakker [Tue, 29 May 2018 11:45:57 +0000 (13:45 +0200)]
EEVEE: LookDev reversed the background fadeout

3 years agoEEVEE: LookDev fadeout to the world horizon color
Jeroen Bakker [Tue, 29 May 2018 10:38:19 +0000 (12:38 +0200)]
EEVEE: LookDev fadeout to the world horizon color

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Tue, 29 May 2018 13:59:18 +0000 (15:59 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/blenkernel/BKE_material.h
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/intern/library_remap.c
source/blender/blenkernel/intern/material.c
source/blender/editors/object/object_relations.c
source/blender/editors/render/render_preview.c
source/blender/makesrna/intern/rna_object.c

3 years agoCleanup: Get rid of G.main in BKE_material.
Bastien Montagne [Tue, 29 May 2018 13:49:21 +0000 (15:49 +0200)]
Cleanup: Get rid of G.main in BKE_material.

Note that in some cases, this only moves the G.main case to somne other
places - in particular, RNA getters/setters are becoming annoying here...

3 years agoObject Modes: disable mode switching on selection
Campbell Barton [Tue, 29 May 2018 13:43:53 +0000 (15:43 +0200)]
Object Modes: disable mode switching on selection

See T55246

3 years agoFor 2.8, bring back debug mode indices display.
Howard Trickey [Tue, 29 May 2018 13:29:55 +0000 (09:29 -0400)]
For 2.8, bring back debug mode indices display.

3 years agoMissed own last commit
Campbell Barton [Tue, 29 May 2018 13:16:07 +0000 (15:16 +0200)]
Missed own last commit

3 years agoFix T55244: Parenting object(s) to curve crashes blender
Dalai Felinto [Tue, 29 May 2018 12:00:36 +0000 (14:00 +0200)]
Fix T55244: Parenting object(s) to curve crashes blender

There is a chance parts of Blender call BKE_object_workob_calc_parent
with ob->parent objects that are outside the depsgraph.

This we can tackle later since these are corner cases anyways,
and this fix fixes all parenting operators in Blender.

3 years agoObject Modes: only use selection for mode switch
Campbell Barton [Tue, 29 May 2018 12:11:34 +0000 (14:11 +0200)]
Object Modes: only use selection for mode switch

Selection is no longer needed for an object to be considered in a mode.

Part of T55246 design task, fixes T55187

3 years agoFix: Only change transform mode from translation to rotation/scale when no valid...
Joshua Leung [Tue, 29 May 2018 10:26:59 +0000 (12:26 +0200)]
Fix: Only change transform mode from translation to rotation/scale when no valid bones were found in an armature

This commit fixes a problem the Spring team were having in the shot files 01_030/050 with
the camera rig, where when you tried grabbing/translating the bones of the camera rig,
they would only keep rotating/scaling instead.

The reason for this is that with the multi-object editing support added into the transform
system, this code would now get run for all the other objects that were being included
in Pose Mode, even if no bones from those armatures were selected. Since no valid translatable
bones were found in those other armatures, the transform mode would get reset upon
encountering one of those other bones.

3 years agoUI: Expand space sub-types into the menu
Campbell Barton [Tue, 29 May 2018 07:19:06 +0000 (09:19 +0200)]
UI: Expand space sub-types into the menu

Initial support for expanding editors, see: T54744

3 years agoCleanup: use same 'depsgraph' name everywhere outside of DEG space.
Bastien Montagne [Tue, 29 May 2018 10:01:07 +0000 (12:01 +0200)]
Cleanup: use same 'depsgraph' name everywhere outside of DEG space.

'graph' is waaaayyyyy too generic name outside of DEG context, and
better try to use same name everywhere!

3 years agoEEVEE: LookDev fade out background option
Jeroen Bakker [Tue, 29 May 2018 10:06:48 +0000 (12:06 +0200)]
EEVEE: LookDev fade out background option

3 years agoEEVEE: LookDev use_scene_light draw option
Jeroen Bakker [Tue, 29 May 2018 08:59:37 +0000 (10:59 +0200)]
EEVEE: LookDev use_scene_light draw option

Scene lights are rendered when
 - v3d is not available
 - or shading type is other then OB_MATERIAL
 - or shading type is OB_MATERIAL and use_scene_light is true

3 years agoFix T55203: Particle hair weights are not preserved
Sergey Sharybin [Tue, 29 May 2018 08:36:19 +0000 (10:36 +0200)]
Fix T55203: Particle hair weights are not preserved

3 years agoEEVEE: LookDev overlays enabling
Jeroen Bakker [Tue, 29 May 2018 07:08:32 +0000 (09:08 +0200)]
EEVEE: LookDev overlays enabling

The mirror ball and diffuse ball are only rendered when overlays are
turned on and the lookdev overlay is turned on.

3 years agomake.bat : fix release build not getting the right settings.
Ray Molenkamp [Tue, 29 May 2018 03:50:59 +0000 (21:50 -0600)]
make.bat : fix release build not getting the right settings.

3 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Ray Molenkamp [Tue, 29 May 2018 02:07:51 +0000 (20:07 -0600)]
Merge remote-tracking branch 'origin/master' into blender2.8

3 years agomake.bat : improve error message while detecting the msvc runtime when using clang
Ray Molenkamp [Tue, 29 May 2018 02:07:24 +0000 (20:07 -0600)]
make.bat : improve error message while detecting the msvc runtime when using clang

3 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Ray Molenkamp [Tue, 29 May 2018 01:57:50 +0000 (19:57 -0600)]
Merge remote-tracking branch 'origin/master' into blender2.8

3 years agomake.bat : add support for building with ninja and clang together.
Ray Molenkamp [Tue, 29 May 2018 01:56:17 +0000 (19:56 -0600)]
make.bat : add support for building with ninja and clang together.

3 years agoCOW operators: Fix VIEW3D_OT_view_all cursor not updating with shift+c center cursor
Tuomo Keskitalo [Mon, 28 May 2018 21:13:58 +0000 (23:13 +0200)]
COW operators: Fix VIEW3D_OT_view_all cursor not updating with shift+c center cursor

This differential fixes a bug for resetting view (shift+c).
Bug description: When 3D cursor is placed randomly somewhere, and shift+c is pressed,
the cursor is not shown to reset at world center.

Reviewers: sergey, aligorith, brita_

Reviewed By: brita_

Subscribers: brita_

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

3 years agoCleanup: fix some harmless compiler warnings.
Brecht Van Lommel [Mon, 28 May 2018 21:27:40 +0000 (23:27 +0200)]
Cleanup: fix some harmless compiler warnings.

3 years agoFix T55204: proxy object disappearing randomly.
Brecht Van Lommel [Mon, 28 May 2018 21:18:47 +0000 (23:18 +0200)]
Fix T55204: proxy object disappearing randomly.

The problem was a missing depsgraph relation between the transforms of
the object and its proxy, it was only there for the pose.

3 years agoFix assert in workbench drawing, instance data not big enough.
Brecht Van Lommel [Mon, 28 May 2018 16:00:35 +0000 (18:00 +0200)]
Fix assert in workbench drawing, instance data not big enough.

3 years agoCOW operators: Fix drag and dropping of color properties
Ines Almeida [Mon, 28 May 2018 21:07:23 +0000 (23:07 +0200)]
COW operators: Fix drag and dropping of color properties

3 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Ray Molenkamp [Mon, 28 May 2018 20:35:59 +0000 (14:35 -0600)]
Merge remote-tracking branch 'origin/master' into blender2.8

3 years agoWindows: Add support for building with clang.
Ray Molenkamp [Mon, 28 May 2018 20:34:47 +0000 (14:34 -0600)]
Windows: Add support for building with clang.

This commit contains the minimum to make clang build/work with blender, asan and ninja build support is forthcoming

Things to note:

1) Builds and runs, and is able to pass all tests (except for the freestyle_stroke_material.blend test which was broken at that time for all platforms by the looks of it)

2) It's slightly faster than msvc when using cycles. (time in seconds, on an i7-3370)

victor_cpu
msvc:3099.51
clang:2796.43

pavillon_barcelona_cpu
msvc:1872.05
clang:1827.72

koro_cpu
msvc:1097.58
clang:1006.51

fishy_cat_cpu
msvc:815.37
clang:722.2

classroom_cpu
msvc:1705.39
clang:1575.43

bmw27_cpu
msvc:552.38
clang:561.53

barbershop_interior_cpu
msvc:2134.93
clang:1922.33

3) clang on windows uses a drop in replacement for the Microsoft cl.exe (takes some of the Microsoft parameters, but not all, and takes some of the clang parameters but not all) and uses ms headers + libraries + linker, so you still need visual studio installed and will use our existing vc14 svn libs.

4) X64 only currently, X86 builds but crashes on startup.

5) Tested with llvm/clang 6.0.0

6) Requires visual studio integration, available at https://github.com/LazyDodo/llvm-vs2017-integration

7) The Microsoft compiler spawns a few copies of cl in parallel to get faster build times, clang doesn't, so the build time is 3-4x slower than with msvc.

8) No openmp support yet. Have not looked at this much, the binary distribution of clang doesn't seem to include it on windows.

9) No ASAN support yet, some of the sanitizers can be made to work, but it was decided to leave support out of this commit.

Reviewers: campbellbarton

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

3 years agoRename EEVEE visibility group > collection
Dalai Felinto [Mon, 28 May 2018 19:27:00 +0000 (21:27 +0200)]
Rename EEVEE visibility group > collection

I think we should rename the DNA as well, and break the 0.01 files using this feature.
But I will leave this decision to Clement.

3 years agoUgly Hacky Fix: Clear Loc/Rot/Scale + Autokey now works for bones
Joshua Leung [Mon, 28 May 2018 18:24:53 +0000 (20:24 +0200)]
Ugly Hacky Fix: Clear Loc/Rot/Scale + Autokey now works for bones

This is a hacky fix so that animators can use this tool again with autokey enabled
(which they do all the time). The issue here is that the tool writes the new (0)
values to the original data, but insertkey now reads from evaluated data (so that
keying interpolated values works). However, the cleared values do not get re-evaluated
or flushed before insertkey gets to it (via auto keying), meaning that the wrong values
get keyed.

There may be better solutions for this, but for now, this is the simplest fix that
I can get working.

3 years agoEEVEE: lookdev default materials
Jeroen Bakker [Mon, 28 May 2018 17:35:08 +0000 (19:35 +0200)]
EEVEE: lookdev default materials

3 years agoFix T55231: Setting bone.select from RNA didn't tag for copy on write
Joshua Leung [Mon, 28 May 2018 16:51:56 +0000 (18:51 +0200)]
Fix T55231: Setting bone.select from RNA didn't tag for copy on write

This was causing problems with addons such as the Selection Sets addon used
in studio by the animators.

3 years agoCoW: Skip pointers that are used in Lattice edit mode.
Germano [Mon, 28 May 2018 16:46:04 +0000 (13:46 -0300)]
CoW: Skip pointers that are used in Lattice edit mode.

3 years agoCleanup: Fix typo: updata -> update
Germano [Mon, 28 May 2018 16:05:56 +0000 (13:05 -0300)]
Cleanup: Fix typo: updata -> update

3 years agoCoW: Skip used pointers in MetaBall edit mode.
Germano [Mon, 28 May 2018 16:04:21 +0000 (13:04 -0300)]
CoW: Skip used pointers in MetaBall edit mode.

3 years agoCoW: Skip pointers used in Text edit mode.
Germano [Mon, 28 May 2018 15:55:28 +0000 (12:55 -0300)]
CoW: Skip pointers used in Text edit mode.

3 years agoTool System: workaround psys cursor conflict
Campbell Barton [Mon, 28 May 2018 16:05:21 +0000 (18:05 +0200)]
Tool System: workaround psys cursor conflict

This needs to be solved properly, for now add cursor-click tool
which can co-exist w/ particle paint.

3 years agoRNA: re-enable property notifiers
Campbell Barton [Mon, 28 May 2018 15:01:32 +0000 (17:01 +0200)]
RNA: re-enable property notifiers

While these will be removed eventually,
it makes tracking down COW buts a hassle.

3 years agoDepsgraph: preserve memory caches for particles when creating Copy-on-Write
Sergey Sharybin [Mon, 28 May 2018 16:05:28 +0000 (18:05 +0200)]
Depsgraph: preserve memory caches for particles when creating Copy-on-Write

Solves issue with particle memory cache ignored.

Thanks Bastien for review!

3 years agoWorkbench: Fix uninitialized variable usage.
Germano [Mon, 28 May 2018 15:27:50 +0000 (12:27 -0300)]
Workbench: Fix uninitialized variable usage.

3 years agoEEVEE: LookDev storage list wrongly used
Jeroen Bakker [Mon, 28 May 2018 15:18:27 +0000 (17:18 +0200)]
EEVEE: LookDev storage list wrongly used

3 years agoFix T55226: outliner glitch with item open/close, after recent optimization.
Brecht Van Lommel [Mon, 28 May 2018 15:07:52 +0000 (17:07 +0200)]
Fix T55226: outliner glitch with item open/close, after recent optimization.

3 years agoEEvEE: LookDev
Jeroen Bakker [Fri, 25 May 2018 06:06:36 +0000 (08:06 +0200)]
EEvEE: LookDev

3 years agoFix: Action/Graph editor UI's didn't update when channel properties were changed
Joshua Leung [Mon, 28 May 2018 14:54:34 +0000 (16:54 +0200)]
Fix: Action/Graph editor UI's didn't update when channel properties were changed

More MessageBus-related silliness to resolve issue with toggling visibility/mute/locking
status of F-Curves/Groups/etc., as well as other things like modifying active keyframe's
values, or changing properties of F-Modifiers.

I've now ended up just whitelisting in the region subscribers all the animation-related
structs in RNA. But still, that may not be enough to deal with potential issues later
with the property sliders (shown per channel, optionally), which can come from anywhere.

(Spring bug)

3 years agoUI: Option to layout properties in two columns
Campbell Barton [Mon, 28 May 2018 14:40:27 +0000 (16:40 +0200)]
UI: Option to layout properties in two columns

Needed for proposed alternate layout, see T54951.

3 years agoFix missing animation curves update when tweaking f-curves
Sergey Sharybin [Mon, 28 May 2018 14:45:28 +0000 (16:45 +0200)]
Fix missing animation curves update when tweaking f-curves

Action is an own datablock, meaning, changes to f-curves needs
to copy those changes to all evaluated versions of action datablock.

3 years agoMerge branch 'master' into blender2.8
Antonio Vazquez [Mon, 28 May 2018 13:25:41 +0000 (15:25 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix Cycles + OSL build error, pass main to node editing functions.
Brecht Van Lommel [Sun, 27 May 2018 21:46:02 +0000 (23:46 +0200)]
Fix Cycles + OSL build error, pass main to node editing functions.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 27 May 2018 19:10:43 +0000 (21:10 +0200)]
Merge branch 'master' into blender2.8

3 years agoUI: center align number buttons w/o text
Campbell Barton [Sun, 27 May 2018 19:06:38 +0000 (21:06 +0200)]
UI: center align number buttons w/o text

This makes supporting split properties and text possible, see T54951

3 years agoSlightly blue tinted variation of the upcoming Flatty Dark theme.
Pablo Vazquez [Sun, 27 May 2018 17:06:17 +0000 (19:06 +0200)]
Slightly blue tinted variation of the upcoming Flatty Dark theme.

It's been requested for a while now and with the upcoming
default dark theme this is a good companion variation.

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Sun, 27 May 2018 16:52:28 +0000 (18:52 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_scene_api.c

3 years agoCleanup: Nuke most of remaining evil G.main from RNA.
Bastien Montagne [Sun, 27 May 2018 16:46:39 +0000 (18:46 +0200)]
Cleanup: Nuke most of remaining evil G.main from RNA.

The few ones in getters/setters we cannot remove as easily, for now we
can live with those I think...

3 years agoMerge branch 'master' into blender2.8
Lukas Stockner [Sun, 27 May 2018 15:26:59 +0000 (17:26 +0200)]
Merge branch 'master' into blender2.8

3 years agoCycles: Fix problems in the IES loader when rendering with no file selected
Lukas Stockner [Sun, 27 May 2018 15:14:01 +0000 (17:14 +0200)]
Cycles: Fix problems in the IES loader when rendering with no file selected

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 27 May 2018 10:54:21 +0000 (12:54 +0200)]
Merge branch 'master' into blender2.8

3 years agoUI: replace BLI_strncpy w/ memcpy
Campbell Barton [Sun, 27 May 2018 10:50:03 +0000 (12:50 +0200)]
UI: replace BLI_strncpy w/ memcpy

Size is already checked.

3 years agoGrid: Do not go over objects in front/side ortho views.
Clément Foucault [Sun, 27 May 2018 09:25:29 +0000 (11:25 +0200)]
Grid: Do not go over objects in front/side ortho views.

Fixes T55190 Grid displayed on top of objects in orthographic view

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 27 May 2018 09:06:29 +0000 (11:06 +0200)]
Merge branch 'master' into blender2.8

3 years agoCleanup: unused var
Campbell Barton [Sun, 27 May 2018 09:06:03 +0000 (11:06 +0200)]
Cleanup: unused var

3 years agoRecently added IES conflicts w/ EEVEE
Campbell Barton [Sun, 27 May 2018 09:01:46 +0000 (11:01 +0200)]
Recently added IES conflicts w/ EEVEE

3 years agoGrid: Fix T51813: Opaque grid on OSX.
Clément Foucault [Sun, 27 May 2018 08:50:39 +0000 (10:50 +0200)]
Grid: Fix T51813: Opaque grid on OSX.

3 years ago3D View: minor change to NDOF view orbit
Campbell Barton [Sun, 27 May 2018 08:34:01 +0000 (10:34 +0200)]
3D View: minor change to NDOF view orbit

This change is needed for 2.8, where the NULL check isn't a reliable way
of testing if dynamic offset is needed.

3 years agoFix restrict error in BLI_str_format_byte_unit
Campbell Barton [Sun, 27 May 2018 08:25:52 +0000 (10:25 +0200)]
Fix restrict error in BLI_str_format_byte_unit

Don't use sprintf to append a string to it's self.

Also correct BLI_str_rstrip_float_zero's return value.

3 years agomake.bat : Fix builtime.txt being written in the wrong folder.
Ray Molenkamp [Sun, 27 May 2018 01:20:07 +0000 (19:20 -0600)]
make.bat : Fix builtime.txt being written in the wrong folder.

3 years agoCycles: Add Support for IES files as textures for light strength
Lukas Stockner [Sat, 26 May 2018 22:46:37 +0000 (00:46 +0200)]
Cycles: Add Support for IES files as textures for light strength

This patch adds support for IES files, a file format that is commonly used to store the directional intensity distribution of light sources.
The new IES node is supposed to be plugged into the Strength input of the Emission node of the lamp.

Since people generating IES files do not really seem to care about the standard, the parser is flexible enough to accept all test files I have tried.
Some common weirdnesses are distributing values over multiple lines that should go into one line, using commas instead of spaces as delimiters and adding various useless stuff at the end of the file.

The user interface of the node is similar to the script node, the user can either select an internal Text or load a file.
Internally, IES files are handled similar to Image textures: They are stored in slots by the LightManager and each unique IES is assigned to one slot.

The local coordinate system of the lamp is used, so that the direction of the light can be changed. For UI reasons, it's usually best to add an area light,
rotate it and then change its type, since especially the point light does not immediately show its local coordinate system in the viewport.

Reviewers: #cycles, dingto, sergey, brecht

Reviewed By: #cycles, dingto, brecht

Subscribers: OgDEV, crazyrobinhood, secundar, cardboard, pisuke, intrah, swerner, micah_denn, harvester, gottfried, disnel, campbellbarton, duarteframos, Lapineige, brecht, juicyfruit, dingto, marek, rickyblender, bliblubli, lockal, sergey

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

3 years agoWorkbench: Shadow: Refine camera in shadow test.
Clément Foucault [Sat, 26 May 2018 22:15:47 +0000 (00:15 +0200)]
Workbench: Shadow: Refine camera in shadow test.

Test if all nearplane points are not in front of the shadow BBox.

3 years agoWorkbench: Shadows: Add frustum check and camera occlusion test.
Clément Foucault [Sat, 26 May 2018 20:28:35 +0000 (22:28 +0200)]
Workbench: Shadows: Add frustum check and camera occlusion test.

If the object is manifold and the camera is in the shadow side, we can
use the depth fail method to fix the inverted shadow glitch.

Unfortunately this does not really work for non-manifold.

Implementation details:
We try to be as efficient as we can, we precompute camera near plane
projected into 2D shadow space so we can test for intersection with the
shadow boundbox easily.

As the intersection test is done in 2D it's pretty fast.
Unfortunately, this means the shadow bounds are all aligned to the same
space and are not the smallest bound we could extract.

3 years agoArmature: Fix warning.
Clément Foucault [Sat, 26 May 2018 20:17:10 +0000 (22:17 +0200)]
Armature: Fix warning.

3 years agoDRW: Add new DRW_debug API.
Clément Foucault [Sat, 26 May 2018 20:08:56 +0000 (22:08 +0200)]
DRW: Add new DRW_debug API.

This new API aim to provide simple function that can be called by the draw
engines during any phase of the draw pipeline. All calls are saved and
issued after all engines have finished rendering.

This removes the need of setuping special passes and shading groups for some
simple debug drawing.

3 years agoWorkbench: Codestyle
Clément Foucault [Mon, 21 May 2018 17:18:01 +0000 (19:18 +0200)]
Workbench: Codestyle

3 years agoWorkbench: Shadow: Add shader variant for manifold case.
Clément Foucault [Mon, 21 May 2018 17:08:02 +0000 (19:08 +0200)]
Workbench: Shadow: Add shader variant for manifold case.

Totally Manifold objects only require a single increment/decrement of the
stencil value. This result in less geometry generated and less overdraw.

3 years agoWorkbench: Shadow: Use depth fail method for manifold objects.
Clément Foucault [Mon, 21 May 2018 11:21:26 +0000 (13:21 +0200)]
Workbench: Shadow: Use depth fail method for manifold objects.

Since this method have no failure case for manifold objects, use it.

3 years agoThreads: add spinlock hit for hyperthreading processors on Windows.
Brecht Van Lommel [Sat, 26 May 2018 20:29:10 +0000 (22:29 +0200)]
Threads: add spinlock hit for hyperthreading processors on Windows.

Suggested by Percy Ross Tiglao.

3 years agoArmature: Make Custom bone have the same appearance as other bones.
Clément Foucault [Sun, 20 May 2018 22:15:19 +0000 (00:15 +0200)]
Armature: Make Custom bone have the same appearance as other bones.

I had to correct some errors in the winding order of the normal bones.

3 years agoArmature: Fix missing bone edges in object mode.
Clément Foucault [Sun, 20 May 2018 20:53:33 +0000 (22:53 +0200)]
Armature: Fix missing bone edges in object mode.

3 years agoArmature: Modify Shape outline shader to use Line adjacency instead of tri.
Clément Foucault [Sun, 20 May 2018 20:48:35 +0000 (22:48 +0200)]
Armature: Modify Shape outline shader to use Line adjacency instead of tri.

This is much faster and simpler. This is also to make it compatible with
custom bone shape in the future.

3 years agoCleanup: unused defines
Campbell Barton [Sat, 26 May 2018 11:15:55 +0000 (13:15 +0200)]
Cleanup: unused defines

3 years agoCleanup: unused defines
Campbell Barton [Sat, 26 May 2018 11:12:00 +0000 (13:12 +0200)]
Cleanup: unused defines

3 years agoRNA: correct naming w/ last cleanup
Campbell Barton [Sat, 26 May 2018 11:06:40 +0000 (13:06 +0200)]
RNA: correct naming w/ last cleanup

3 years agoRNA: follow boolean naming conventions
Campbell Barton [Sat, 26 May 2018 09:54:25 +0000 (11:54 +0200)]
RNA: follow boolean naming conventions

3 years agoCleanup: whitespace, long lines, duplicate include
Campbell Barton [Sat, 26 May 2018 08:41:25 +0000 (10:41 +0200)]
Cleanup: whitespace, long lines, duplicate include

3 years agoCleanup: rename RNA property to match UI
Campbell Barton [Sat, 26 May 2018 07:51:21 +0000 (09:51 +0200)]
Cleanup: rename RNA property to match UI

3 years agoCOW Fix: Lamp manipulators
Campbell Barton [Sat, 26 May 2018 07:44:45 +0000 (09:44 +0200)]
COW Fix: Lamp manipulators

3 years agomake.bat: Add support for building with ninja.
Ray Molenkamp [Sat, 26 May 2018 03:46:42 +0000 (21:46 -0600)]
make.bat: Add support for building with ninja.

ninja is an alternative to msbuild designed for fast rebuilds. However there is no IDE support, builds only from the command line.

Comparison between msbuild and ninja for a full build, build time in seconds.

Full Clean Build
msbuild     867.5
Ninja       801.2
Difference  -66.3 (-7.6%)

Minor Change
msbuild      43.0
Ninja        14.9
Difference  -28.1 (-64.4%)

No Changes
msbuild      23.0
Ninja         6.1
Difference  -16.9 (-73.5%)