blender.git
6 months agoFix T58088: OpenSubdiv not enabled by default in macOS builds.
Brecht Van Lommel [Tue, 27 Nov 2018 13:40:25 +0000 (14:40 +0100)]
Fix T58088: OpenSubdiv not enabled by default in macOS builds.

6 months agoFix file browser click to select not working on tablets, after recent changes.
Brecht Van Lommel [Tue, 27 Nov 2018 13:17:10 +0000 (14:17 +0100)]
Fix file browser click to select not working on tablets, after recent changes.

The highlight on mousemove operator should not swallow events.

6 months agoUI: Bring back User Preferences entry in Editors list.
Pablo Vazquez [Tue, 27 Nov 2018 13:19:00 +0000 (14:19 +0100)]
UI: Bring back User Preferences entry in Editors list.

It's nonstandard and kind of weird, but it's nice when making keymaps, themes, quickly test things without spawning a new window.

6 months agoDRW: Implement Hair Weight drawing
Clément Foucault [Tue, 27 Nov 2018 12:49:00 +0000 (13:49 +0100)]
DRW: Implement Hair Weight drawing

Fixes T57931 Particle weight edit mode is not supported.

There is a bug that prevent refresh of the toolsettings on which is based
the weight / non-weight display selection (see T58086).

6 months agofix: Collada Exporter: improve usage of viewlayer and depsgraph
Gaia Clary [Tue, 27 Nov 2018 11:14:03 +0000 (12:14 +0100)]
fix: Collada Exporter: improve usage of viewlayer and depsgraph

* The exporter now gets the view layer from the context
  instead of the depsgraph.
* The depsgrap is now fetched only on demand since the graph
  is not always needed for exporting (currently only for armature exports).

6 months agoPython API Docs: Examples for new timer api
Jacques Lucke [Tue, 27 Nov 2018 10:31:35 +0000 (11:31 +0100)]
Python API Docs: Examples for new timer api

6 months agomake node editor tool region background transparent
Philipp Oeser [Tue, 27 Nov 2018 09:00:20 +0000 (10:00 +0100)]
make node editor tool region background transparent

followup to rB1944bca49a22c18b059d84daf56908b6e15591ad

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

6 months agoFix T57929: missing UI updates when changing active object
Philipp Oeser [Tue, 27 Nov 2018 09:24:48 +0000 (10:24 +0100)]
Fix T57929: missing UI updates when changing active object

was caused by NC_SCENE notifier being skipped with a non-scene reference
showed e.g. in timeline not updating keyframes/cachelines

Maniphest Tasks: T57929

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

6 months agoPython API: Fix partial build
Jacques Lucke [Tue, 27 Nov 2018 09:56:17 +0000 (10:56 +0100)]
Python API: Fix partial build

`gpu_extras` was always visible

6 months agoFix T57070: Take Two of 2.8 Crash in sculpting mode with tilling and Dyntopo.
Bastien Montagne [Tue, 27 Nov 2018 09:43:01 +0000 (10:43 +0100)]
Fix T57070: Take Two of 2.8 Crash in sculpting mode with tilling and Dyntopo.

Accessing ob->bb directly is not a good idea anyway.

Still, would like to know why/where this bbox is freed, since it is
allocated at least once by depsgraph eval, as part of
`BKE_object_handle_data_update()` function...

6 months agoTool System: use tools for node editor
Campbell Barton [Tue, 27 Nov 2018 07:39:29 +0000 (18:39 +1100)]
Tool System: use tools for node editor

6 months agoKeymap: share annotation tool keymaps between spaces
Campbell Barton [Tue, 27 Nov 2018 06:33:52 +0000 (17:33 +1100)]
Keymap: share annotation tool keymaps between spaces

Not sharing caused duplication in the keymap and
required a factory class generator.

Simplify tool & keymap definitions by sharing them.

It's highly unlikely we will ever want these to use different keys
once they're set as the active tool.

6 months agoRNA: expose access to B-Bone shape data from Python.
Alexander Gavrilov [Sat, 24 Nov 2018 12:12:24 +0000 (15:12 +0300)]
RNA: expose access to B-Bone shape data from Python.

B-Bone shape is a non-trivial computation, so access to
the results would be useful for Python scripts working with
B-Bones, e.g. rig generation.

This exposes both final segment matrices, and the tangent
vectors computed from the custom handle bones.

Since the handle tangents use the axis+roll orientation math
of edit bones, add matrix conversion static methods to Bone.

Reviewers: campbellbarton

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

6 months agoWM: add print for missing tool keymap
Campbell Barton [Tue, 27 Nov 2018 06:04:32 +0000 (17:04 +1100)]
WM: add print for missing tool keymap

Also correct function name (gizmo -> tool).

6 months agoCleanup: move non-toolbar panels out of the toolbar
Campbell Barton [Tue, 27 Nov 2018 04:23:12 +0000 (15:23 +1100)]
Cleanup: move non-toolbar panels out of the toolbar

6 months agoRevert "Fix texture space not updating in edit mode."
Campbell Barton [Tue, 27 Nov 2018 03:18:33 +0000 (14:18 +1100)]
Revert "Fix texture space not updating in edit mode."

This reverts commit 3a038db576e97c0e720a92af05a218ed71ed121a.

Caused CoW crash switching from edit to sculpt mode.

6 months agoRevert "Inline function BKE_mesh_boundbox_calc inside BKE_mesh_texspace_calc to avoid...
Campbell Barton [Tue, 27 Nov 2018 03:17:54 +0000 (14:17 +1100)]
Revert "Inline function BKE_mesh_boundbox_calc inside BKE_mesh_texspace_calc to avoid confusion."

This reverts commit e6322abad23a8ae71b72e54befffc17ae35e30d9.

6 months agoKeymap: restore 3D view center w/ cursor (Shift-C)
Campbell Barton [Tue, 27 Nov 2018 02:19:55 +0000 (13:19 +1100)]
Keymap: restore 3D view center w/ cursor (Shift-C)

Pablo Vazquez requests this back, an quick way to reset the cursor.

6 months agoKeymap: 3D view center to cursor operator
Campbell Barton [Tue, 27 Nov 2018 02:24:40 +0000 (13:24 +1100)]
Keymap: 3D view center to cursor operator

Addition to Alt-MMB-Drag orbit,
Alt-MMB-Click centers the view on the mouse.

6 months agoKeymap: add preference for spacebar to run operator search
Campbell Barton [Tue, 27 Nov 2018 02:14:09 +0000 (13:14 +1100)]
Keymap: add preference for spacebar to run operator search

6 months agoUI Theme: Transparent toolbar for UV/Image Editor and consistency tweaks.
Pablo Vazquez [Tue, 27 Nov 2018 01:13:59 +0000 (02:13 +0100)]
UI Theme: Transparent toolbar for UV/Image Editor and consistency tweaks.

Spotted by the community during a live stream!

6 months agoUI: Fix Set Origin via Specials menu not prompting options.
Pablo Vazquez [Tue, 27 Nov 2018 00:59:47 +0000 (01:59 +0100)]
UI: Fix Set Origin via Specials menu not prompting options.

6 months agoFix T58062: Missing redo panel
Campbell Barton [Tue, 27 Nov 2018 00:52:56 +0000 (11:52 +1100)]
Fix T58062: Missing redo panel

6 months agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 27 Nov 2018 00:41:33 +0000 (11:41 +1100)]
Merge branch 'master' into blender2.8

6 months agoFix T56872: Edge slide gives invalid normals
Campbell Barton [Tue, 27 Nov 2018 00:39:51 +0000 (11:39 +1100)]
Fix T56872: Edge slide gives invalid normals

Add the ability to skip overwriting normals.

6 months agoSilence warning (potentially misused twidth)
Dalai Felinto [Mon, 26 Nov 2018 23:54:29 +0000 (21:54 -0200)]
Silence warning (potentially misused twidth)

6 months agoFont textbox overflow: Different methods
Dalai Felinto [Wed, 12 Sep 2018 16:00:30 +0000 (13:00 -0300)]
Font textbox overflow: Different methods

Sometimes the text doesn't fit. What to do in this case?

* Overflow: The default behaviour still is to overflow the text.
* Truncated: If any text box is defined we can also not draw the text
  that goes outside the text boxes.
* Scale to Fit: For single-text box texts we can scale down the text until
  it fits.

To support textboxes we are bisecting the scale until we find a good
match. Right now the hardcoded iteration limit is 20, and the threshold 0.0001f.

An alternative in the future would be to tackle this by integrating existing
layout engines such as HarfBuzz.

Note: Scale to fit won't work for multiple text-boxes if any of them has
either width or height as zero.

Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D3874

Feature development sponsored by Viddyoze.

6 months agoFix crash iterating over empty view layer
Campbell Barton [Mon, 26 Nov 2018 23:25:29 +0000 (10:25 +1100)]
Fix crash iterating over empty view layer

6 months agofix: Collada exporter: take care of parent inverse for exports of Armatures with...
Gaia Clary [Mon, 26 Nov 2018 22:14:25 +0000 (23:14 +0100)]
fix: Collada exporter: take care of parent inverse for exports of Armatures with child objects

6 months agoFix: Collada Importer: Keep bindinfo option is not properly handled
Gaia Clary [Mon, 26 Nov 2018 22:11:29 +0000 (23:11 +0100)]
Fix: Collada Importer: Keep bindinfo option is not properly handled

Actually the option was not at all used and the importer always created the bindinfo custom properties.

6 months agofix: Collada: The limit precision option does nothing
Gaia Clary [Mon, 26 Nov 2018 22:05:55 +0000 (23:05 +0100)]
fix: Collada: The limit precision option does nothing

6 months agoGP: Correct Tonemapping for Blend Layers
Antonioya [Mon, 26 Nov 2018 21:52:28 +0000 (22:52 +0100)]
GP: Correct Tonemapping for Blend Layers

6 months agoGP: Make Multiply blend works with opacity
Antonioya [Mon, 26 Nov 2018 21:19:46 +0000 (22:19 +0100)]
GP: Make Multiply blend works with opacity

6 months agoCleanup: style, includes
Campbell Barton [Mon, 26 Nov 2018 21:00:49 +0000 (08:00 +1100)]
Cleanup: style, includes

6 months agoFix T57930 : Wrong hair shading in particle edit mode
Clément Foucault [Mon, 26 Nov 2018 19:34:04 +0000 (20:34 +0100)]
Fix T57930 : Wrong hair shading in particle edit mode

Implement strand selection visualisation but without any shading.

I think this is not the overlay job to draw the strands shaded.

We can already view the children strands shaded for now but we might add
an option to draw the shaded strand instead of (or in addition to) the
guide strand.

6 months agoDRW: Cleanup: Fix missing uniform warning in curve edit mode
Clément Foucault [Mon, 26 Nov 2018 14:34:39 +0000 (15:34 +0100)]
DRW: Cleanup: Fix missing uniform warning in curve edit mode

6 months agoDRW: Hair: Fix hairs not working properly with duplis
Clément Foucault [Mon, 26 Nov 2018 14:34:10 +0000 (15:34 +0100)]
DRW: Hair: Fix hairs not working properly with duplis

Fix T55355 Instanced hair not working well for EEVEE and workbench

6 months agoDRW: Add access to object dupli parent
Clément Foucault [Mon, 26 Nov 2018 14:23:16 +0000 (15:23 +0100)]
DRW: Add access to object dupli parent

6 months agoMOD_shrinkwrap: do not compute mesh when not needed.
Bastien Montagne [Mon, 26 Nov 2018 19:43:35 +0000 (20:43 +0100)]
MOD_shrinkwrap: do not compute mesh when not needed.

This modifier only uses mesh to get vgroup, which is only needed in case
modified object is indeed a mesh! Building a mesh from curve here is not
only useless and time-consuming, it will also easily fail the assert
about same number of vertices!

Note that surface_project and subsurf option also need more work at some
point, but this is probably not that urgent for now.

Also, use MOD_get_vgroup() helper in modifier code itself and pass
resulting MDeformVert & index to BKE_shrinkwrap's `shrinkwrapModifier_deform()`,
this is simpler and avoids duplicating vgroup handling code.

Related to T57972.

6 months agoMOD_curve: do not compute mesh when not needed.
Bastien Montagne [Mon, 26 Nov 2018 10:46:20 +0000 (11:46 +0100)]
MOD_curve: do not compute mesh when not needed.

This modifier only uses mesh to get vgroup, which is only needed in case
modified object is indeed a mesh! Building a mesh from curve here is not
only useless and time-consuming, it will also easily fail the assert
about same number of vertices!

Also, use MOD_get_vgroup() helper in modifier code itself and pass
reluting MDeformVert & index to BKE_curve's curve_deform_verts(),
this is simpler and avoids duplicating vgroup handling code.

Also fixes crash when used on lattice.

Related to T57972.

6 months agoMOD_cast: do not compute mesh when not needed.
Bastien Montagne [Mon, 26 Nov 2018 10:30:46 +0000 (11:30 +0100)]
MOD_cast: do not compute mesh when not needed.

This modifier only uses mesh to get vgroup, which is only needed in case
modified object is indeed a mesh! Building a mesh from curve here is not
only useless and time-consuming, it will also easily fail the assert
about same number of vertices!

Also fixes crash when used on lattice.

Related to T57972.

6 months agoTimer: Generic BLI_timer with Python wrapper
Jacques Lucke [Mon, 26 Nov 2018 19:25:15 +0000 (20:25 +0100)]
Timer: Generic BLI_timer with Python wrapper

There is a new `bpy.app.timers` api.
For more details, look in the Python API documentation.

Reviewers: campbellbarton

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

6 months agoUI: rename "OpenGL" render engine to "Workbench".
Brecht Van Lommel [Mon, 26 Nov 2018 18:00:01 +0000 (19:00 +0100)]
UI: rename "OpenGL" render engine to "Workbench".

Neither is very descriptive for its task, but at least workbench is more
future proof and distinguishes it from Eevee.

6 months agoFix broken face select in paint modes with RMB select.
Brecht Van Lommel [Mon, 26 Nov 2018 17:35:56 +0000 (18:35 +0100)]
Fix broken face select in paint modes with RMB select.

6 months agoViewport: implement hiding faces in paint modes.
Alexander Gavrilov [Sun, 25 Nov 2018 15:34:28 +0000 (18:34 +0300)]
Viewport: implement hiding faces in paint modes.

In 2.79 hiding works in paint modes with selection enabled,
so it is a missing feature. This implements it in texture
paint overlays and in workbench base shading.

Reviewers: fclem

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

6 months agoGP: New Blend Layers functionality
Antonioya [Mon, 26 Nov 2018 17:12:39 +0000 (18:12 +0100)]
GP: New Blend Layers functionality

Now it's possible define the blend mode between layers including the option to clamp the layer using underlying layers.

Also a new Simplify option has been added to disable blend layers.

6 months agoWorkbench: Add Curvature overlay for better visibility of surface detail for e.g...
Lukas Stockner [Mon, 26 Nov 2018 15:49:56 +0000 (16:49 +0100)]
Workbench: Add Curvature overlay for better visibility of surface detail for e.g. sculpting

The approach is fairly simple, just apply an edge detection filter to the view normal and scale the brightness based on that.

The overlay is disabled at object boundaries to avoid dark lines around objects.

Generally, this implementation follows the proposal of @monio at https://blender.community/c/rightclickselect/J9bbbc.
The changes are:
- Dynamic filter radius (on high-DPI displays, a radius of two is used)
- Options to reduce the strength of both ridges and valleys
- Tweaked function for the strength reduction (the original method actually had a local maximum, resulting in a brighter line inside valleys)
- Multiplication for blending instead of overlay, which doesn't work reliably with scene-referred intensities
- Renamed to point out the distinction between it and the SSAO-based cavity overlay

Reviewers: jbakker

Reviewed By: jbakker

Subscribers: billreynish, manitwo, linko, monio

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

6 months agoFix view layer set in the outliner of child window not syncing to parent window.
Brecht Van Lommel [Mon, 26 Nov 2018 15:57:59 +0000 (16:57 +0100)]
Fix view layer set in the outliner of child window not syncing to parent window.

6 months agoKeymaps: for LMB keymap, add ctrl+LMB to select bones in weight paint mode.
Brecht Van Lommel [Mon, 26 Nov 2018 15:25:11 +0000 (16:25 +0100)]
Keymaps: for LMB keymap, add ctrl+LMB to select bones in weight paint mode.

6 months agoKeymaps: don't do CLICK event when PRESS was already handled.
Brecht Van Lommel [Mon, 26 Nov 2018 13:50:09 +0000 (14:50 +0100)]
Keymaps: don't do CLICK event when PRESS was already handled.

This fixes conflicts where the tool and editor keymap use different event
types. Tools need to be able to mouse buttons on PRESS without triggering
CLICK events in the editor keymap.

6 months agoEnable OpenSubdiv modifier by default
Sergey Sharybin [Mon, 26 Nov 2018 14:39:08 +0000 (15:39 +0100)]
Enable OpenSubdiv modifier by default

This commit makes it so that subsurf/multires modifiers will respect
the WITH_OPENSUBDIV option. The WITH_OPENSUBDIV_MODIFIER option is
now gone.

For artists it mean that subsurf modifier will behave same as it is
planned for 2.80. Multires will now support sculpting, but it has some
known limitations. Those will be worked on before the final release.

If OpenSubdiv is disabled, no subsurf/multires functionality will
present.

For the details see:

  https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Modeling#Subsurf.2FMultires

6 months agoInline function BKE_mesh_boundbox_calc inside BKE_mesh_texspace_calc to avoid confusion.
mano-wii [Mon, 26 Nov 2018 12:48:27 +0000 (10:48 -0200)]
Inline function BKE_mesh_boundbox_calc inside BKE_mesh_texspace_calc to avoid confusion.

6 months agoHide OpenSubdiv compute device
Sergey Sharybin [Mon, 26 Nov 2018 13:21:24 +0000 (14:21 +0100)]
Hide OpenSubdiv compute device

That is only used by GPU side of OpenSubdiv, which was not yet
brought back.

6 months agoKeymaps: keep Select Box as default tool.
Brecht Van Lommel [Mon, 26 Nov 2018 12:51:30 +0000 (13:51 +0100)]
Keymaps: keep Select Box as default tool.

6 months agoFix gizmos not using same tweak threshold as other places.
Brecht Van Lommel [Mon, 26 Nov 2018 12:46:20 +0000 (13:46 +0100)]
Fix gizmos not using same tweak threshold as other places.

The low hardcoded threshold made clicking on the navigation gizmo difficult
on tablets.

6 months agoUI: expand tooltips for left/right click select.
Brecht Van Lommel [Mon, 26 Nov 2018 11:18:28 +0000 (12:18 +0100)]
UI: expand tooltips for left/right click select.

6 months agoFix inverted texture paint overlay display icons.
Alexander Gavrilov [Mon, 26 Nov 2018 11:52:24 +0000 (14:52 +0300)]
Fix inverted texture paint overlay display icons.

6 months agoDefaults: set "release confirms", for transform tweak with single click and drag.
Brecht Van Lommel [Mon, 26 Nov 2018 11:18:28 +0000 (12:18 +0100)]
Defaults: set "release confirms", for transform tweak with single click and drag.

The old behavior with two clicks evolved out of a gesture system, and it can
have some advantages if you want to press more keys to constrain for example. But
this seems a better default.

6 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Mon, 26 Nov 2018 11:00:36 +0000 (12:00 +0100)]
Merge branch 'master' into blender2.8

6 months agoCMake: Remove Cycles specific OpenSubdiv options
Sergey Sharybin [Mon, 26 Nov 2018 10:41:38 +0000 (11:41 +0100)]
CMake: Remove Cycles specific OpenSubdiv options

Just use one flag which enables OpenSubdiv globally for all the
areas of Blender.

6 months agoFix texture space not updating in edit mode.
mano-wii [Sun, 25 Nov 2018 19:47:54 +0000 (17:47 -0200)]
Fix texture space not updating in edit mode.

6 months agotransform_snap_object: fix ray_start_correction in snap to edit_mesh.
mano-wii [Sun, 25 Nov 2018 19:15:05 +0000 (17:15 -0200)]
transform_snap_object: fix ray_start_correction in snap to edit_mesh.

6 months agoFix T56167: Crash when extruding + snap to face.
mano-wii [Sun, 25 Nov 2018 18:00:26 +0000 (16:00 -0200)]
Fix T56167: Crash when extruding + snap to face.

This is a local fix.
The problem with duplicate looptris still remains.
That is, it can still be released in one place but not upgraded in the other.

(note: setting the looptris to NULL in the evaluated mesh and assert whether it is still NULL when the mesh is freed could indicate where those cases are).

6 months agoFix T57985: Out of the edit mode, the texture space is affected by the modifiers...
Bastien Montagne [Mon, 26 Nov 2018 09:29:13 +0000 (10:29 +0100)]
Fix T57985: Out of the edit mode, the texture space is affected by the modifiers of a mesh.

Go for the simple solution for now (disable auto-texspace in evaluated mesh).
Proper fix would be part of known TODO redesign of bbox handling.

Solution suggested by @sergey, thanks!

6 months agoFix T58032: particle children 'Use Clump Curve' crash
Philipp Oeser [Sun, 25 Nov 2018 13:21:02 +0000 (14:21 +0100)]
Fix T58032: particle children 'Use Clump Curve' crash

Maniphest Tasks: T58032

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

6 months agoUI: collapse redo panel by default
Campbell Barton [Mon, 26 Nov 2018 06:43:58 +0000 (17:43 +1100)]
UI: collapse redo panel by default

For some operators this fills a lot of vertical space,
users can expand it if they need.

Also remove workaround for T56752 (now fixed).

6 months agoCorrect last commit
Campbell Barton [Mon, 26 Nov 2018 06:43:23 +0000 (17:43 +1100)]
Correct last commit

Initial display was fixed, broke refreshing.

6 months agoUI: fix glitch showing redo panel
Campbell Barton [Mon, 26 Nov 2018 06:29:02 +0000 (17:29 +1100)]
UI: fix glitch showing redo panel

There were still cases it would show for the first time w/o content.

6 months agoFix crash accessing mesh.point_normals default
Campbell Barton [Mon, 26 Nov 2018 05:26:47 +0000 (16:26 +1100)]
Fix crash accessing mesh.point_normals default

This memory needs to be static,
in this case the argument isn't needed so remove it.

6 months agoKeymap: use 'W' key for select toolbar shortcut
Campbell Barton [Mon, 26 Nov 2018 05:10:00 +0000 (16:10 +1100)]
Keymap: use 'W' key for select toolbar shortcut

6 months agoCleanup: remove unused code & add comments
Campbell Barton [Mon, 26 Nov 2018 05:07:03 +0000 (16:07 +1100)]
Cleanup: remove unused code & add comments

6 months agoFix T58027: Scene.ray_cast crash
Campbell Barton [Mon, 26 Nov 2018 04:50:59 +0000 (15:50 +1100)]
Fix T58027: Scene.ray_cast crash

Reintroduce BASE_VISIBLE_BGMODE

D3987 by @Soundwave

6 months agoFix object selection in edit-mode
Campbell Barton [Mon, 26 Nov 2018 04:28:59 +0000 (15:28 +1100)]
Fix object selection in edit-mode

Ctrl-RMB in edit-mode is needed for setting vertex parent.

6 months agoFix proportional edit-mode w/ multi-object editing
Campbell Barton [Mon, 26 Nov 2018 03:20:51 +0000 (14:20 +1100)]
Fix proportional edit-mode w/ multi-object editing

D3992 by @Al

6 months ago3D View: remove 3D cursor
Campbell Barton [Mon, 26 Nov 2018 02:49:17 +0000 (13:49 +1100)]
3D View: remove 3D cursor

Use 3D cursor from the scene (was previously used for local-view).

6 months agoFix extended shading pie menu not having same order as before.
Brecht Van Lommel [Mon, 26 Nov 2018 00:00:05 +0000 (01:00 +0100)]
Fix extended shading pie menu not having same order as before.

6 months agoCleanup: unused vars, imports
Campbell Barton [Sun, 25 Nov 2018 22:27:25 +0000 (09:27 +1100)]
Cleanup: unused vars, imports

6 months agoCleanup: unused vars
Campbell Barton [Sun, 25 Nov 2018 22:26:38 +0000 (09:26 +1100)]
Cleanup: unused vars

6 months agoCleanup: unused vars, imports
Campbell Barton [Sun, 25 Nov 2018 22:26:15 +0000 (09:26 +1100)]
Cleanup: unused vars, imports

6 months agoFix some errors in the Blender Light theme.
Brecht Van Lommel [Sun, 25 Nov 2018 19:36:47 +0000 (20:36 +0100)]
Fix some errors in the Blender Light theme.

6 months agoFix missing versioning code for user preferences navigation bar.
Brecht Van Lommel [Sun, 25 Nov 2018 19:13:09 +0000 (20:13 +0100)]
Fix missing versioning code for user preferences navigation bar.

6 months agoTools: add Select tool, with transform tweak on drag and no click delay.
Brecht Van Lommel [Thu, 22 Nov 2018 15:05:28 +0000 (16:05 +0100)]
Tools: add Select tool, with transform tweak on drag and no click delay.

For users that want the 2.7 LMB keymap behavior, this provides a way of
working without tools interfering. For RMB select this operator is quite
redundant with the Cursor tool, we may have to find a solution for that.

Note that we also might later add transform tweak to the transform tools,
when nothing is selected. But this is important for existing users who
preferred the existing workflow.

6 months agoKeymaps: add 3D view click empty space to deselect all.
Brecht Van Lommel [Sun, 25 Nov 2018 17:59:58 +0000 (18:59 +0100)]
Keymaps: add 3D view click empty space to deselect all.

The implementation of this operator was modified to be more efficient and
ensure the undo history has the exact operator used.

6 months agoCleanup: Silent compiler warning
Antonioya [Sun, 25 Nov 2018 19:00:18 +0000 (20:00 +0100)]
Cleanup: Silent compiler warning

A void function cannot return a value.

6 months agoUI: Disable font shadow in tooltip
Julian Eisel [Sun, 25 Nov 2018 17:48:52 +0000 (18:48 +0100)]
UI: Disable font shadow in tooltip

When I added this a few years ago, it was meant to create a fake bold effect.
With the new text shadow drawing code, that doesn't work well though.

6 months agoFix mesh_build_data() calling mesh_finalize_eval() before copying texspace.
Bastien Montagne [Sun, 25 Nov 2018 17:39:57 +0000 (18:39 +0100)]
Fix mesh_build_data() calling mesh_finalize_eval() before copying texspace.

mesh_finalize_eval() may set ob->data to evaluated mesh, needs to be
done *after* call to BKE_mesh_texspace_copy_from_object(), else that one
is meaningless.

Related to investigations on T57985, but does not solve it at all. :(

6 months agoCleanup: remove useless redundant NULL check.
Bastien Montagne [Sun, 25 Nov 2018 17:36:43 +0000 (18:36 +0100)]
Cleanup: remove useless redundant NULL check.

6 months agoFix T57070, T57389, and other bbox-related issues with meshes.
Bastien Montagne [Sun, 25 Nov 2018 16:16:11 +0000 (17:16 +0100)]
Fix T57070, T57389, and other bbox-related issues with meshes.

Thinks whole bbox code needs a complete rewrite, one can see a lot of
old history in it, it has way too many functions doing
nearly-the-same-thing(c), it spreads in very inconsistent ways across a
lot of files, ... But have no time for this right now, and would not be
a good idea with Beta comming up close anyway.

So for now going the simple and (hopefully) sane & safe way: forbid
object-level functions to affect data-level bbox. Mesh and curve ones
would generate bbox in obdata instead of object, for some reason (all
other obdata types only use object's bbox ever). That may have been
working in old ages, but with CoW and threaded depsgraph this is just
calling for piles of issues.

6 months agoUI: Disable font shadow in tabs
Julian Eisel [Sun, 25 Nov 2018 17:34:07 +0000 (18:34 +0100)]
UI: Disable font shadow in tabs

This was used to fake a 3D look, however that doesn't work well with the new,
flat style. It just made text appear blurry.

6 months agoUI: Initial User-Preferences redesign
Julian Eisel [Sun, 25 Nov 2018 15:21:35 +0000 (16:21 +0100)]
UI: Initial User-Preferences redesign

Implements the first changes for T54115:

* Rename "User Preferences" window to "Settings" in the UI.
  We'll likely put workspace settings in there, separate from the global
  user settings. System settings should become separate from user
  settings in future to allow settings for specific hardware.
* Add sidebar region for navigation (scrolls independently).
  Addresses space problems, so we can add more categories as needed now.
* Increase size of Settings window to compensate new navigation bar.
* Group sections into User Preferences and System.
  Icons for section groups by Andrzej Ambroz. Thanks!
* Bumps subversion for file compatibility.

Screenshot: https://developer.blender.org/F5715337

I also added categories for future work, but commented them out.
We may also want to redesign contents of each section now.

Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D3088
Design Task: https://developer.blender.org/T54115

6 months agoTexture Paint: prevent normal angle masking duplicating backface culling.
Alexander Gavrilov [Sun, 25 Nov 2018 15:50:21 +0000 (18:50 +0300)]
Texture Paint: prevent normal angle masking duplicating backface culling.

If backface culling is off, the user obviously wants to paint on
back faces, so the normal angle cutoff designed to prevent painting
at glancing angles shouldn't do the culling as a side effect.

6 months agoLocal View
Dalai Felinto [Sun, 25 Nov 2018 11:50:34 +0000 (09:50 -0200)]
Local View

Bring back per-viewport localview. This is based on Blender 2.79.
We have a limit of 16 different local view viewports.

We are using both the numpad /, as well as the regular /.

Missing features:
* Hack to make sure lights are always visible.
* Make rendered mode with external engines to support this as well
  (probably just need to support this in the RNA iterators).
* Support over 16 viewports by taking existing viewports out of local view.

The code can use a cleanup pass in the future to unify the test to see
if an object is visible (or we can use TESTBASE in more places).

6 months agoUse orig_pchan when searching for the original copy of a constraint.
Alexander Gavrilov [Sun, 25 Nov 2018 07:58:30 +0000 (10:58 +0300)]
Use orig_pchan when searching for the original copy of a constraint.

6 months agoFix box select of edges not working when box does not fully contain edge.
Brecht Van Lommel [Sun, 25 Nov 2018 01:12:48 +0000 (02:12 +0100)]
Fix box select of edges not working when box does not fully contain edge.

6 months agoAddons: enable GLTF 2.0 addon by default.
Brecht Van Lommel [Sat, 24 Nov 2018 22:46:40 +0000 (23:46 +0100)]
Addons: enable GLTF 2.0 addon by default.

6 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Sat, 24 Nov 2018 22:44:17 +0000 (23:44 +0100)]
Merge branch 'master' into blender2.8

6 months agoFix T58006: smart UV project island margin should not use length units.
Brecht Van Lommel [Sat, 24 Nov 2018 22:01:50 +0000 (23:01 +0100)]
Fix T58006: smart UV project island margin should not use length units.

This distance is in UV space, not world space.

6 months agoSequencer: remove unnecessary limit on transform rotation.
Brecht Van Lommel [Fri, 9 Nov 2018 09:05:06 +0000 (10:05 +0100)]
Sequencer: remove unnecessary limit on transform rotation.

6 months agoFix X11 tablet pen and eraser distinction being wrong in some cases.
Brecht Van Lommel [Sat, 24 Nov 2018 22:21:13 +0000 (23:21 +0100)]
Fix X11 tablet pen and eraser distinction being wrong in some cases.

This extends the earlier fix to use the latest logic from Wine's wintab.c,
to better handle eraser detection.

6 months agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 24 Nov 2018 21:06:22 +0000 (08:06 +1100)]
Merge branch 'master' into blender2.8