blender.git
12 months agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 11 Jun 2018 14:02:46 +0000 (16:02 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/intern/mesh_convert.c
source/blender/editors/interface/interface_eyedropper_color.c
source/blender/editors/object/object_add.c
source/blender/editors/space_image/image_ops.c
source/blender/makesrna/intern/rna_image.c
source/blender/windowmanager/intern/wm_draw.c

12 months agoWorkbench: API Changes
Jeroen Bakker [Mon, 11 Jun 2018 13:54:02 +0000 (15:54 +0200)]
Workbench: API Changes

- merged matcap and studioLight api

12 months agoCleanup: remove moar ugly G.main usages...
Bastien Montagne [Mon, 11 Jun 2018 13:40:37 +0000 (15:40 +0200)]
Cleanup: remove moar ugly G.main usages...

BKE_image was an ugly nest, could fix all but the ones from compositor,
so moved ugly G.main there, at least we know where the Evil is that way ;)

12 months agoFix T55440: Pose Mode Crash
Dalai Felinto [Mon, 11 Jun 2018 13:29:13 +0000 (15:29 +0200)]
Fix T55440: Pose Mode Crash

12 months agoGHOST: WGL: Delay context initialization for offscreen contexts.
fclem [Mon, 11 Jun 2018 11:06:54 +0000 (13:06 +0200)]
GHOST: WGL: Delay context initialization for offscreen contexts.

Same as 128926a41b368e166af63515370d9c9367e3dda2 but for windows.

12 months agoCycles: Cleanup, silence strict compiler warning
Sergey Sharybin [Mon, 11 Jun 2018 10:54:17 +0000 (12:54 +0200)]
Cycles: Cleanup, silence strict compiler warning

There is one legit place in the code where memcpy was used as an
optimization trick. Was needed for older version of GCC, but now
it should be re-evaluated and checked if it still helps to have
that trick.

In other places it's somewhat lazy programming to zero out all
object members. That is absolutely unsafe, at the moment when
less trivial class is used as a member in that object things
will break.

Other cases were using memcpy into an object which comes from
an external library. We don't control that object, and we can
not guarantee it will always be safe for such memory tricks
and debugging bugs caused by such low level access is far fun.

Ideally we need to use more proper C++, but needs to be done with
big care, including benchmarks of each change, For now do
annoying but simple cast to void*.

12 months agoLibmv: Cleanup, make strict compiler more happy
Sergey Sharybin [Mon, 11 Jun 2018 10:53:11 +0000 (12:53 +0200)]
Libmv: Cleanup, make strict compiler more happy

In C++ it is not really safe to memcpy objects, and newer GCC will warn
about this. However, we don't use our vector for unsafe-to-memcpy objects,
so just explicitly silence that warning.

12 months agoRender: Fix build problem with missing GL/glew.h
fclem [Mon, 11 Jun 2018 11:00:21 +0000 (13:00 +0200)]
Render: Fix build problem with missing GL/glew.h

12 months agoFix separator element for headers with multiple directions
Dalai Felinto [Mon, 11 Jun 2018 12:54:04 +0000 (14:54 +0200)]
Fix separator element for headers with multiple directions

12 months agoUI: Separator spacer
Dalai Felinto [Mon, 11 Jun 2018 12:33:53 +0000 (14:33 +0200)]
UI: Separator spacer

This support layout.separator_spacer() to be used by headers as a way to
dynamically separate the ui buttons.

Right now no UI file is changed, though we can use this right away in the
timeline, and shortly after in the viewport header (moving settings from
the topbar to it).

Original design by William Reynish.

Review: Campbell Barton
D3468

12 months agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 11 Jun 2018 12:44:03 +0000 (14:44 +0200)]
Merge branch 'master' into blender2.8

12 months agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 11 Jun 2018 12:39:38 +0000 (14:39 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
intern/cycles/blender/blender_object.cpp
source/blender/alembic/intern/abc_exporter.cc
source/blender/alembic/intern/abc_mball.cc
source/blender/alembic/intern/abc_mball.h
source/blender/blenkernel/BKE_anim.h
source/blender/blenkernel/BKE_displist.h
source/blender/blenkernel/BKE_dynamicpaint.h
source/blender/blenkernel/BKE_group.h
source/blender/blenkernel/BKE_mball.h
source/blender/blenkernel/BKE_mball_tessellate.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/BKE_scene.h
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mball_tessellate.c
source/blender/blenkernel/intern/mesh_convert.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/object_dupli.c
source/blender/blenkernel/intern/object_update.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/smoke.c
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/editors/include/ED_object.h
source/blender/editors/object/object_add.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_modifier.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt_uv.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_snap_object.c
source/blender/editors/util/ed_util.c
source/blender/gpu/intern/gpu_material.c
source/blender/makesrna/intern/rna_meta.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blenderplayer/bad_level_call_stubs/stubs.c

12 months agoRender: Create a separate gl context for rendering.
Clément Foucault [Mon, 11 Jun 2018 11:54:31 +0000 (13:54 +0200)]
Render: Create a separate gl context for rendering.

This should take care of all the threading stability issues some people
are reporting.

12 months agoGHOST: Delay opengl context initialization
Clément Foucault [Mon, 11 Jun 2018 09:49:10 +0000 (11:49 +0200)]
GHOST: Delay opengl context initialization

This way they can be init in their owner thread. Contexts should not be
shared accross threads. Once you make a context active on a thread it is
owned by the thread.

This commit only have the GLX backend updated but should not break orther
platform.

12 months agoDRW: Rename ogl_context to gl_context
Clément Foucault [Mon, 11 Jun 2018 09:38:26 +0000 (11:38 +0200)]
DRW: Rename ogl_context to gl_context

We might not use opengl forever :)

12 months agoDRW: Add cache reset.
Clément Foucault [Mon, 11 Jun 2018 09:36:09 +0000 (11:36 +0200)]
DRW: Add cache reset.

This is a temporary solution to the use of the shared cache.

Ideally this cache should be per gl drawing context.

12 months agoShading: Change icon of userpreference in Shading popover
Jeroen Bakker [Mon, 11 Jun 2018 10:41:35 +0000 (12:41 +0200)]
Shading: Change icon of userpreference in Shading popover

12 months agoCleanup: Moar G.main removal of Hell.
Bastien Montagne [Mon, 11 Jun 2018 10:14:18 +0000 (12:14 +0200)]
Cleanup: Moar G.main  removal of Hell.

This commit actually adds some G.main... but at much, much higher level
than the ones it removes, so should still be better ;)

12 months agoCleanup: remove some G.main usages...
Bastien Montagne [Mon, 11 Jun 2018 09:05:37 +0000 (11:05 +0200)]
Cleanup: remove some G.main usages...

12 months agoMetaBall support for Workbench + EEVEE
Jeroen Bakker [Mon, 11 Jun 2018 06:37:56 +0000 (08:37 +0200)]
MetaBall support for Workbench + EEVEE

Note: Metaballs only support the first material slot. Splicing it per
material would create empty Batches. In order to overcome this we set
the batch for other materials to NULL. We added extra checks in EEVEE
and Workbench to not draw when the geom is NULL.

12 months agoWorkbench: Flipping MatCaps for forward shading
Jeroen Bakker [Fri, 8 Jun 2018 14:45:23 +0000 (16:45 +0200)]
Workbench: Flipping MatCaps for forward shading

12 months agoFix pchan head/tail original values not being set
Campbell Barton [Mon, 11 Jun 2018 09:36:28 +0000 (11:36 +0200)]
Fix pchan head/tail original values not being set

12 months agoFix bad level stubs
Sergey Sharybin [Mon, 11 Jun 2018 09:36:22 +0000 (11:36 +0200)]
Fix bad level stubs

12 months agoRevert unintended changes to depsgraph
Dalai Felinto [Mon, 11 Jun 2018 09:31:13 +0000 (11:31 +0200)]
Revert unintended changes to depsgraph

This partially reverts f8d7df6f162.
I committed this bit by mistake.

12 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Mon, 11 Jun 2018 09:06:43 +0000 (11:06 +0200)]
Merge branch 'master' into blender2.8

12 months agoCleanup: Use BLI_strncpy
Sergey Sharybin [Mon, 11 Jun 2018 09:05:24 +0000 (11:05 +0200)]
Cleanup: Use BLI_strncpy

It has behavior which we expect, and silences strict compiler warning.

12 months agoFix T55278: Lightmap Pack > New Image broken when active object is None
Philipp Oeser [Mon, 11 Jun 2018 09:00:19 +0000 (11:00 +0200)]
Fix T55278: Lightmap Pack > New Image broken when active object is None

thanx bblanimation (Christopher Gearhart) for spotting the issue and
providing the fix!

Reviewed By: brecht

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

12 months agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 11 Jun 2018 08:46:33 +0000 (10:46 +0200)]
Merge branch 'master' into blender2.8

12 months agopath_util: avoid overflow w/ strtoll use
Campbell Barton [Mon, 11 Jun 2018 08:43:34 +0000 (10:43 +0200)]
path_util: avoid overflow w/ strtoll use

Also style cleanup.

12 months ago3D View: move screen overlays to the top
Campbell Barton [Mon, 11 Jun 2018 08:02:29 +0000 (10:02 +0200)]
3D View: move screen overlays to the top

- Frame & object name now top left.
- Axis now top right (when view navigation disabled).

This is needed so we can use the lower area for redo popup, see T55386.

12 months agoMerge branch 'master' into blender2.8
Philipp Oeser [Mon, 11 Jun 2018 08:28:36 +0000 (10:28 +0200)]
Merge branch 'master' into blender2.8

12 months agoFix PyConsole: Drag events finished early in modal text selection
Philipp Oeser [Mon, 11 Jun 2018 08:18:51 +0000 (10:18 +0200)]
Fix PyConsole: Drag events finished early in modal text selection

12 months agoMerge branch 'master' into blender2.8
Philipp Oeser [Mon, 11 Jun 2018 08:03:42 +0000 (10:03 +0200)]
Merge branch 'master' into blender2.8

12 months agoFix T55140: opened image doesn't show up in movie clip editor
Philipp Oeser [Fri, 1 Jun 2018 09:58:50 +0000 (11:58 +0200)]
Fix T55140: opened image doesn't show up in movie clip editor

atoi usage in BLI_stringdec could overflow, use strtoll instead and
check
valid range with INT_MIN and INT_MAX

Reviewed By: campbellbarton

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

12 months agoWIP: Add driver eyedropper operator button beside the "add input" button
Joshua Leung [Mon, 11 Jun 2018 07:43:05 +0000 (19:43 +1200)]
WIP: Add driver eyedropper operator button beside the "add input" button

This doesn't work currently. Needs more investigation why.

12 months agoDrivers UI: Introduce more whitespace, to make the sections clearer
Joshua Leung [Mon, 11 Jun 2018 07:39:34 +0000 (19:39 +1200)]
Drivers UI: Introduce more whitespace, to make the sections clearer

12 months agoMerge branch 'master' into blender2.8
Philipp Oeser [Mon, 11 Jun 2018 07:34:04 +0000 (09:34 +0200)]
Merge branch 'master' into blender2.8

12 months agoCleanup: Remove the "all" parameter from "ANIM_OT_driver_button_edit"
Joshua Leung [Mon, 11 Jun 2018 07:27:42 +0000 (19:27 +1200)]
Cleanup: Remove the "all" parameter from "ANIM_OT_driver_button_edit"

This won't ever be used for this operator, as the "edit" operator should
only ever be used for dealign with a single driver - the one under the
cursor.

12 months agoOverlays: Reserve space for a "Onion Skins" overlay
Joshua Leung [Mon, 11 Jun 2018 07:14:39 +0000 (19:14 +1200)]
Overlays: Reserve space for a "Onion Skins" overlay

While we probably won't be getting a general purpose "Onion Skinning"
overlay anytime soon for meshes, etc. (at least not before the
depsgraph stabilises, and we also get geometry caching working),
for the Grease Pencil integration at least, it makes sense to move
GP objects to using a more general/future-proof solution, instead
of continuing to use a special/dedicated button in the header.

Currently the UI part of this is commented out. Also, the GP branch
doesn't need to move to this pre-merge. But, since 2.8 changes move
fast, it's better to reserve the space now to have it next to motionpaths,
than introduce it later.

12 months agoDrivers UI: Don't show the Copy/Paste driver dvars buttons in the popovers
Joshua Leung [Mon, 11 Jun 2018 07:10:08 +0000 (19:10 +1200)]
Drivers UI: Don't show the Copy/Paste driver dvars buttons in the popovers

The copy/paste driver variables buttons currently only work when used in the
Graph Editor as they rely on being able to have the "active F-Curve" context
info that's only present in the Graph Editor (in Drivers Editor mode).
Instead of having them constantly greyed out in the popover, it's easier
to just hide them for now. Besides, this is probably more of an "advanced"
feature that we don't need to expose in the simple UI.

12 months agoFix T55349: crash adding paint slot when object is on hidden layer
Philipp Oeser [Mon, 11 Jun 2018 07:12:29 +0000 (09:12 +0200)]
Fix T55349: crash adding paint slot when object is on hidden layer

use better poll and get ob with 'ED_object_active_context' (instead of
'CTX_data_active_object')

Reviewed By: campbellbarton

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

12 months agoCleanup: warnings
Campbell Barton [Mon, 11 Jun 2018 07:03:39 +0000 (09:03 +0200)]
Cleanup: warnings

12 months agoDrivers UI Fix: Use uiLayoutSetContextFromBut() so that operators will work in the...
Joshua Leung [Mon, 11 Jun 2018 06:51:15 +0000 (18:51 +1200)]
Drivers UI Fix: Use uiLayoutSetContextFromBut() so that operators will work in the panel

This fixes the problem where the "Show in Drivers Editor" button would
not actually select and highlight the driver under the mouse.

(TODO: The channels still aren't getting selected properly in the
channels list, but at least the properties show correctly)

12 months agoDriver Workflow (T55145): Tweak to default expression used for new drivers created...
Joshua Leung [Mon, 11 Jun 2018 05:44:08 +0000 (17:44 +1200)]
Driver Workflow (T55145): Tweak to default expression used for new drivers created from UI

Previously, newly created drivers were set to "Scripted Expression"
mode and had their 'expression' field set to the pre-driver value of the
property, so that adding a driver didn't cause the property to immediately
lose its old value (and potentially causing havok in the scene).
However, this had the unintended consequence of making the driver setup
workflow more cumbersome, as you first had to replace that value with
the name of the driver variable before your driver would work.

This commit works around this issue by trying to combine the best of both
worlds (quite literally):  Now, the driver expression for drivers created
using Ctrl-D will be "var + <old value>".

Thus, in the simplest case, the driver will do something as soon as you fill
out the driver variable settings (e.g. just filling out the Target Object field
will do it), meaning you get your drivers working faster. Of course, it may now
be necessary to edit out the old-value, and/or it might be a bit more confusing
what/why it's there for newbies. However, the improved ease of setup, and/or
a more tangible example of how an expression may be constructed outweigh the
downsides IMO.

12 months agoDrivers Workflow (T55145): Improvements to "Add Driver" workflow
Joshua Leung [Mon, 11 Jun 2018 05:35:13 +0000 (17:35 +1200)]
Drivers Workflow (T55145): Improvements to "Add Driver" workflow

This commit implements a new behaviour for the "Add Driver" functionality
(invoked from the RMB menu on a property, or by pressing Ctrl-D).

Instead of spawning a context menu asking you to pick the way
you want to create a driver, it will now just create a driver on the
property under the mouse and then show the "Edit Drivers" popover so
that you can immediately start editing the properties of this driver.
This way, the whole process is more visual and feels less blocking /
constrained, with less upfront decisions needed immediately.

Notes:
* The new behaviour is equivalent to choosing the "Manually Create (Single)"
  and then doing a "Edit Driver" on the property
* Renamed the old "ANIM_OT_driver_button_add" operator to
  "ANIM_OT_driver_button_add_menu". It will probably go away
  in the near future, but it's better to keep it around for a
  while longer still until the new workflow settles down.

12 months agoSub-panels for Cycles Depth of Field
Pablo Vazquez [Sun, 10 Jun 2018 19:27:43 +0000 (21:27 +0200)]
Sub-panels for Cycles Depth of Field

12 months agoSub-panel for camera DoF for EEVEE
Pablo Vazquez [Sun, 10 Jun 2018 19:06:49 +0000 (21:06 +0200)]
Sub-panel for camera DoF for EEVEE

12 months agoWorkbench: Xray: Fix hairs with matcaps.
Clément Foucault [Sun, 10 Jun 2018 18:28:04 +0000 (20:28 +0200)]
Workbench: Xray: Fix hairs with matcaps.

12 months agoWorkbench: Xray: Make dithered depth dependant on alpha.
Clément Foucault [Sun, 10 Jun 2018 18:06:02 +0000 (20:06 +0200)]
Workbench: Xray: Make dithered depth dependant on alpha.

The range is 0.25 to 0.75 opacity when the Xray opacity is between 0.0 to 1.0.

This is to avoid loosing completely the sense of occlusion when having no
other solid drawing than the wireframe and loosing the transparency when
xray alpha is at 1.0.

Also replace Bayer (checkerboard) method by interlieved gradient noise to
minimize the chance to loose an occluded line completely.

Other noise function could be tested in the future.

12 months agoWorkbench: Xray: Add selected/active non-occluded outlines
Clément Foucault [Sun, 10 Jun 2018 17:35:25 +0000 (19:35 +0200)]
Workbench: Xray: Add selected/active non-occluded outlines

This Fix the problem when multiple objects are selected and one of them
occlude the others. You cannot see clearly what is selected.

With this option, selection is more clear when Xray mode is enabled.

12 months agoWorkbench: Xray: Make nearest surfaces more clear
Clément Foucault [Sun, 10 Jun 2018 15:31:28 +0000 (17:31 +0200)]
Workbench: Xray: Make nearest surfaces more clear

By using equation 7 from the paper, we make the surfaces nearest to the
viewpoint appear more "opaque". This gives better sense of ordering than
the previous weighting function that was really not doing anything.

12 months agoWorkbench: Xray: Lower hairs opacity
Clément Foucault [Sun, 10 Jun 2018 13:46:10 +0000 (15:46 +0200)]
Workbench: Xray: Lower hairs opacity

Since hairs are very likely to owerflow the weight buffer, we divide their
alpha value by 3.

This might become a particle system setting if needed.

12 months agoWorkbench: Xray: Optimize and fix implementation.
Clément Foucault [Sun, 10 Jun 2018 13:30:49 +0000 (15:30 +0200)]
Workbench: Xray: Optimize and fix implementation.

There was a method explained in the Weighted Blended Order-Independent
Transparency paper to support hardware that does not support per render
target blending function.

So now only 2 geometry passes are required instead of 3 (one being the
outline/depth fill pass).

This also fix how the blending is done. There was some premult confusion
in the implementation.

12 months agoUI: Add redo last to edit-menu
Campbell Barton [Sun, 10 Jun 2018 15:15:24 +0000 (17:15 +0200)]
UI: Add redo last to edit-menu

12 months agoExperimental Tweak: Only show relationship lines between objects when either the...
Joshua Leung [Sun, 10 Jun 2018 14:38:44 +0000 (02:38 +1200)]
Experimental Tweak: Only show relationship lines between objects when either the parent/child object is selected

As in Pose Mode, the idea here it to try to reduce viewport complexity
without requiring users to turn off the overlay completely all the time.
For example, a background prop (e.g. a tree with a tyre hanging off it,
or a branch with hand-placed leaves) won't be cluttering the viewport with
its relationship lines all the time, when you're trying to do something else.

When you really do need to see these lines, you can still select the object
in question, and you'll see the lines for which objects are its children
or what its parent is. And to see all lines, you can still always select all
objects.

12 months agoViewport: "Show Relationship Lines" overlay toggle is now respected by Object Mode...
Joshua Leung [Sun, 10 Jun 2018 14:21:26 +0000 (02:21 +1200)]
Viewport: "Show Relationship Lines" overlay toggle is now respected by Object Mode & Armatures (Edit/Pose)

12 months agoUI: change toolbar icon size from 38 -> 32
Campbell Barton [Sun, 10 Jun 2018 14:42:19 +0000 (16:42 +0200)]
UI: change toolbar icon size from 38 -> 32

12 months agoUI: use property split for UV mask panel
Campbell Barton [Sun, 10 Jun 2018 14:29:55 +0000 (16:29 +0200)]
UI: use property split for UV mask panel

12 months agoUI: correct jitter button
Campbell Barton [Sun, 10 Jun 2018 14:08:19 +0000 (16:08 +0200)]
UI: correct jitter button

12 months agoUI: use split property for tool settings
Campbell Barton [Sun, 10 Jun 2018 13:55:19 +0000 (15:55 +0200)]
UI: use split property for tool settings

Patch by @billreynish w/ edits

12 months agoUI: remove tab use in the tool-settings
Campbell Barton [Sun, 10 Jun 2018 13:40:02 +0000 (15:40 +0200)]
UI: remove tab use in the tool-settings

12 months agoUI: use two columns for the overlay popover
Campbell Barton [Sun, 10 Jun 2018 13:22:47 +0000 (15:22 +0200)]
UI: use two columns for the overlay popover

Also use sub-panels.

Patch by @billreynish w/ edits.

12 months agoUI: Use flow layout for object properties context
Pablo Vazquez [Sun, 10 Jun 2018 11:56:23 +0000 (13:56 +0200)]
UI: Use flow layout for object properties context

Mainly as a proof of concept and test to use in other contexts.

12 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 10 Jun 2018 10:11:16 +0000 (12:11 +0200)]
Merge branch 'master' into blender2.8

12 months agoWM: add macros to check mouse button/gesture/wheel
Campbell Barton [Sun, 10 Jun 2018 10:08:09 +0000 (12:08 +0200)]
WM: add macros to check mouse button/gesture/wheel

Use to check click/drag,
fixes issue with mouse wheel triggering pie menu.

12 months agoFix T55423: GLSL compilation error Flat + XRay
Jeroen Bakker [Sun, 10 Jun 2018 09:51:07 +0000 (11:51 +0200)]
Fix T55423: GLSL compilation error Flat + XRay

12 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 10 Jun 2018 06:21:38 +0000 (08:21 +0200)]
Merge branch 'master' into blender2.8

12 months agoCleanup: trailing space in CMake files
Campbell Barton [Sun, 10 Jun 2018 06:12:13 +0000 (08:12 +0200)]
Cleanup: trailing space in CMake files

12 months agoWorkbench: Fix material compilation.
Clément Foucault [Sat, 9 Jun 2018 19:10:35 +0000 (21:10 +0200)]
Workbench: Fix material compilation.

12 months agoEevee: Improve compilation time (reduce branching).
Clément Foucault [Sat, 9 Jun 2018 18:48:19 +0000 (20:48 +0200)]
Eevee: Improve compilation time (reduce branching).

This patch reduce the branching in the lamp loop, improving compilation time
noticeably (2372ms to 1785ms for the default shader).

This should not change the appearance of the shader.

Performance impact is negligeable.

12 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 9 Jun 2018 16:58:14 +0000 (18:58 +0200)]
Merge branch 'master' into blender2.8

12 months agoRNA: remove Layout.introspect
Campbell Barton [Sat, 9 Jun 2018 16:55:51 +0000 (18:55 +0200)]
RNA: remove Layout.introspect

This was added as an experiment to extract information for docs
but this was never all that useful for its intended purpose.

12 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 9 Jun 2018 16:48:11 +0000 (18:48 +0200)]
Merge branch 'master' into blender2.8

12 months agoCleanup: unused functions
Campbell Barton [Sat, 9 Jun 2018 16:47:39 +0000 (18:47 +0200)]
Cleanup: unused functions

12 months agoUI: always show popover subpanel header text
Campbell Barton [Sat, 9 Jun 2018 16:15:08 +0000 (18:15 +0200)]
UI: always show popover subpanel header text

12 months agoUI: fix popover subpanel header display
Campbell Barton [Sat, 9 Jun 2018 16:03:22 +0000 (18:03 +0200)]
UI: fix popover subpanel header display

12 months agoUI: use draw_header function for popover buttons
Campbell Barton [Sat, 9 Jun 2018 15:36:28 +0000 (17:36 +0200)]
UI: use draw_header function for popover buttons

Add 'is_popover' for panel draw functions to check if they're in a popup.
This puts dyntopo toggle next to the popover.

12 months agoAdd new GridFlow layout.
Bastien Montagne [Sat, 9 Jun 2018 14:50:05 +0000 (16:50 +0200)]
Add new GridFlow layout.

This mimics the 'spreadsheet' behavior. Columns and/or rows can have
equal sizes, or adapt to their content - but always in a grid way (i.e.
all items in a same column will always have same available width, and
all items in a same row will always have same available height).
Also, you can fill (order) the grid in a row- or column-major way.

Not used anywhere for now.

Differential: https://developer.blender.org/D2395

12 months agoCleanup: style
Campbell Barton [Sat, 9 Jun 2018 14:39:40 +0000 (16:39 +0200)]
Cleanup: style

12 months agoMerge branch 'master' into blender2.8
Bastien Montagne [Sat, 9 Jun 2018 13:18:21 +0000 (15:18 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/editors/space_view3d/drawobject.c

12 months agoCleanup: remove some G.main usages.
Bastien Montagne [Sat, 9 Jun 2018 13:16:44 +0000 (15:16 +0200)]
Cleanup: remove some G.main usages.

12 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 9 Jun 2018 12:42:01 +0000 (14:42 +0200)]
Merge branch 'master' into blender2.8

12 months agoCleanup: trailing space in RNA
Campbell Barton [Sat, 9 Jun 2018 12:40:09 +0000 (14:40 +0200)]
Cleanup: trailing space in RNA

12 months agoCleanup: style
Campbell Barton [Sat, 9 Jun 2018 12:30:32 +0000 (14:30 +0200)]
Cleanup: style

12 months agoUI: initial support for parent panels in popovers
Campbell Barton [Sat, 9 Jun 2018 12:21:39 +0000 (14:21 +0200)]
UI: initial support for parent panels in popovers

Currently this just includes the panels, no support for collapsing yet.

12 months agoRNA: revert object mode re-order
Campbell Barton [Sat, 9 Jun 2018 10:55:10 +0000 (12:55 +0200)]
RNA: revert object mode re-order

This was done so numbered shortcuts made sense.
Now order matches master.

12 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 9 Jun 2018 10:56:37 +0000 (12:56 +0200)]
Merge branch 'master' into blender2.8

12 months agoGHOST/X11: Print the keycode w/ debug enabled
Campbell Barton [Sat, 9 Jun 2018 10:53:39 +0000 (12:53 +0200)]
GHOST/X11: Print the keycode w/ debug enabled

12 months agoWorkbench: Fix xray normal not being normalized.
Clément Foucault [Sat, 9 Jun 2018 10:29:21 +0000 (12:29 +0200)]
Workbench: Fix xray normal not being normalized.

12 months agoWorkbench: Matcaps: Fix matcap under perspective.
Clément Foucault [Sat, 9 Jun 2018 10:28:22 +0000 (12:28 +0200)]
Workbench: Matcaps: Fix matcap under perspective.

This fixes the problem that matcaps have when using a very larg FOV in
perspective view.

This was because it was stupidly using the normal direction which can not
aligned with the view vector under perspective.

So to workaround this problem we don't use the normal as is, but compute
how much it's facing the camera.

This changes how matcaps looks in perspective because they now always use
the full range of the matcap (which is expected).

12 months agoWorkbench: Fix incident vector calculation.
Clément Foucault [Sat, 9 Jun 2018 10:21:19 +0000 (12:21 +0200)]
Workbench: Fix incident vector calculation.

This fixes specular in perspective view.

12 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 9 Jun 2018 10:06:33 +0000 (12:06 +0200)]
Merge branch 'master' into blender2.8

12 months agoGHOST/X11: Correct non-latin kb workaround case
Campbell Barton [Sat, 9 Jun 2018 10:04:07 +0000 (12:04 +0200)]
GHOST/X11: Correct non-latin kb workaround case

Harmless since this is always enabled,
only do this for easier troubleshooting when disabling the define.

12 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 9 Jun 2018 09:27:22 +0000 (11:27 +0200)]
Merge branch 'master' into blender2.8

12 months agoGHOST/X11: support accessing physical keycodes
Campbell Barton [Sat, 9 Jun 2018 09:23:41 +0000 (11:23 +0200)]
GHOST/X11: support accessing physical keycodes

This means we can check keys such as tilde in a generic way.

12 months agoGHOST/X11: Map unknown us.intl key to accentgrave
Campbell Barton [Sat, 9 Jun 2018 07:10:04 +0000 (09:10 +0200)]
GHOST/X11: Map unknown us.intl key to accentgrave

12 months agoLayout for materials closer to single column
Pablo Vazquez [Fri, 8 Jun 2018 21:56:28 +0000 (23:56 +0200)]
Layout for materials closer to single column

12 months agoAudaspace: add support for latest ffmpeg.
Jörg Müller [Fri, 8 Jun 2018 21:10:52 +0000 (23:10 +0200)]
Audaspace: add support for latest ffmpeg.

12 months agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 8 Jun 2018 20:19:39 +0000 (22:19 +0200)]
Merge branch 'master' into blender2.8

12 months agoWM: correct recent change to click/drag detection
Campbell Barton [Fri, 8 Jun 2018 20:17:21 +0000 (22:17 +0200)]
WM: correct recent change to click/drag detection

fb1915d87090a - caused click/drag events not to be detected.

Now check a key is a mouse or keyboard event.