blender.git
3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Tue, 8 May 2018 09:59:22 +0000 (11:59 +0200)]
Merge branch 'master' into blender2.8

3 years agoTracking: Use bmain from context
Sergey Sharybin [Tue, 8 May 2018 09:58:42 +0000 (11:58 +0200)]
Tracking: Use bmain from context

3 years agoClay: Simplify matcap manipulation
Sergey Sharybin [Mon, 7 May 2018 13:28:25 +0000 (15:28 +0200)]
Clay: Simplify matcap manipulation

No need to hard-coded handling of every individual matcap.

They are in the continuous index range anyway.

3 years agoClay: Don't use hardcoded constant in the string
Sergey Sharybin [Mon, 7 May 2018 13:25:21 +0000 (15:25 +0200)]
Clay: Don't use hardcoded constant in the string

Stringify the actual constant instead.

3 years agoMulti-Object-Editing: select random by Jefferson Rausseo with changes
Dalai Felinto [Tue, 8 May 2018 09:36:09 +0000 (11:36 +0200)]
Multi-Object-Editing: select random by Jefferson Rausseo with changes

Aside from identation, seed should change for each object. Otherwise to objects
with a copied mesh would get the exactly same "random" selection.

And we do so in a consistent way so it doesn't vary depending on
object order.

Seed bump using hash suggested by Campbell Barton and Sergey Sharybin.

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3231

3 years agoPorted Mesh Deform modifier
Sybren A. Stüvel [Tue, 8 May 2018 09:33:31 +0000 (11:33 +0200)]
Ported Mesh Deform modifier

This modifier still has issues that are not related to this port:

- While editing the deformation mesh, the deformed mesh doesn't update.
  This update only happens after exiting edit mode, making editing
  cumbersome.
- Binding doesn't work yet. It works fine when binding in master and
  loading pre-bound in 2.8. This was also an issue before this port, and
  will be investigated separately.

3 years agolooptri + bvhtree support for Mesh
Sybren A. Stüvel [Tue, 8 May 2018 08:07:21 +0000 (10:07 +0200)]
looptri + bvhtree support for Mesh

3 years agoMulti-Object-Editing: vertices smooth by Jefferson Rausseo
Dalai Felinto [Tue, 8 May 2018 09:28:36 +0000 (11:28 +0200)]
Multi-Object-Editing: vertices smooth by Jefferson Rausseo

Changes by me:
* Identation (tabs not space)
* Moving RNA_.*_get outside for loop)

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3230

3 years agoMulti-Object-Editing : Extrude Repeat by Falk David
Dalai Felinto [Tue, 8 May 2018 09:23:59 +0000 (11:23 +0200)]
Multi-Object-Editing : Extrude Repeat by Falk David

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3224

3 years agoPrevent segfault when opening file browser while a 2.79 file was loaded.
Sybren A. Stüvel [Tue, 8 May 2018 09:18:21 +0000 (11:18 +0200)]
Prevent segfault when opening file browser while a 2.79 file was loaded.

Loading a file that was written with the master branch into the 2.8 branch,
and then trying to load or save, caused a segfault.

3 years agoEdit Mesh: multi-object rotate_uvs support by Pablo Dobarro
Dalai Felinto [Tue, 8 May 2018 09:12:23 +0000 (11:12 +0200)]
Edit Mesh: multi-object rotate_uvs support by Pablo Dobarro

Changes by me: Moving RNA_.*get outside for loop and indentation fix.

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3221

3 years agoEdit Mesh: multi-object reverse_uvs support by Pablo Dobarro
Dalai Felinto [Tue, 8 May 2018 08:48:20 +0000 (10:48 +0200)]
Edit Mesh: multi-object reverse_uvs support by Pablo Dobarro

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3220

3 years agoModifiers stack: port Curve to new Mesh-based system.
Bastien Montagne [Tue, 8 May 2018 09:05:49 +0000 (11:05 +0200)]
Modifiers stack: port Curve to new Mesh-based system.

3 years agoRename BKE_bmesh_to_mesh to BKE_bmesh_to_mesh_nomain.
Bastien Montagne [Tue, 8 May 2018 09:03:16 +0000 (11:03 +0200)]
Rename BKE_bmesh_to_mesh to BKE_bmesh_to_mesh_nomain.

Let's be clear about functions generating datablocks outside of Main
database.

3 years agoBKE_mesh_new → BKE_mesh_new_nomain
Sybren A. Stüvel [Tue, 8 May 2018 08:59:41 +0000 (10:59 +0200)]
BKE_mesh_new → BKE_mesh_new_nomain

Including 'nomain' in the name explicitifies that the returned mesh is
NOT stored in any library.

3 years agoCleanup: quiet warning, whitespace
Campbell Barton [Tue, 8 May 2018 08:57:43 +0000 (10:57 +0200)]
Cleanup: quiet warning, whitespace

3 years agoFix crash cancelling search, caused by D3207
Campbell Barton [Tue, 8 May 2018 08:45:50 +0000 (10:45 +0200)]
Fix crash cancelling search, caused by D3207

3 years agoAdded BKE_mesh_ensure_normals()
Sybren A. Stüvel [Tue, 8 May 2018 08:06:37 +0000 (10:06 +0200)]
Added BKE_mesh_ensure_normals()

This calls BKE_mesh_calc_normals() only if the mesh vertex normals are
marked as dirty.

3 years agoAdded BKE_mesh_new()
Sybren A. Stüvel [Fri, 4 May 2018 09:42:55 +0000 (11:42 +0200)]
Added BKE_mesh_new()

This function creates a Mesh struct with a number of vertices/edges/etc.
It allocates the minimal number of CD layers needed.

Currently not yet used, but will be soon in the upcoming
BKE_new_mesh_from_curve_displist().

3 years agoMulti-Object-Editing : Support for MESH_OT_solidify by Lucas Boutrot
Dalai Felinto [Tue, 8 May 2018 08:39:06 +0000 (10:39 +0200)]
Multi-Object-Editing : Support for MESH_OT_solidify by Lucas Boutrot

Maniphest Tasks: T54641, T54643
Differential Revision: https://developer.blender.org/D3218

3 years agoMulti-Object-Editing Support for MESH_OT_wireframe by Lucas Boutrot
Dalai Felinto [Tue, 8 May 2018 08:22:33 +0000 (10:22 +0200)]
Multi-Object-Editing Support for MESH_OT_wireframe by Lucas Boutrot

Maniphest Tasks: T54641, T54643
Differential Revision: https://developer.blender.org/D3217

3 years agoEdit Mesh: multi-object faces_shade_flat support by Pablo Dobarro
Dalai Felinto [Tue, 8 May 2018 08:12:17 +0000 (10:12 +0200)]
Edit Mesh: multi-object faces_shade_flat support by Pablo Dobarro

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3219

3 years agoMulti-Object Editing: subdivide edgering support by Henry @Skippi
Dalai Felinto [Tue, 8 May 2018 07:58:34 +0000 (09:58 +0200)]
Multi-Object Editing: subdivide edgering support by Henry @Skippi

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3215

3 years agoMulti object editing - face dissolve support by Mateusz Grzeliński
Dalai Felinto [Tue, 8 May 2018 07:37:37 +0000 (09:37 +0200)]
Multi object editing - face dissolve support by Mateusz Grzeliński

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3214

3 years agoExtrude Widget: subscribe to operator settings
Campbell Barton [Tue, 8 May 2018 07:20:06 +0000 (09:20 +0200)]
Extrude Widget: subscribe to operator settings

Needed so changing orientation refreshes.

3 years agoAdd note about compat code in uber eval causing modifiers to be applied twice
Mai Lavelle [Tue, 8 May 2018 06:44:13 +0000 (02:44 -0400)]
Add note about compat code in uber eval causing modifiers to be applied twice

3 years agoWM: log message bus operations
Campbell Barton [Tue, 8 May 2018 06:34:06 +0000 (08:34 +0200)]
WM: log message bus operations

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 8 May 2018 05:53:48 +0000 (07:53 +0200)]
Merge branch 'master' into blender2.8

3 years agoCleanup: remove unused wmReport struct
Campbell Barton [Tue, 8 May 2018 05:52:13 +0000 (07:52 +0200)]
Cleanup: remove unused wmReport struct

3 years agoWM: refresh tool on object mode switch
Campbell Barton [Tue, 8 May 2018 05:25:36 +0000 (07:25 +0200)]
WM: refresh tool on object mode switch

The tool manipulator could become disabled when set in the wrong mode.

3 years agoWM: publish Object.mode changes on mode switching
Campbell Barton [Tue, 8 May 2018 05:22:52 +0000 (07:22 +0200)]
WM: publish Object.mode changes on mode switching

3 years agoWM: quiet GCC redundant declaration warnings
Campbell Barton [Tue, 8 May 2018 05:18:49 +0000 (07:18 +0200)]
WM: quiet GCC redundant declaration warnings

3 years agoMulti-Object-Editing : Support for Edge Dissolve by Lucas Boutrot
Dalai Felinto [Mon, 7 May 2018 19:54:11 +0000 (21:54 +0200)]
Multi-Object-Editing : Support for Edge Dissolve by Lucas Boutrot

With minor indentation changes by me.

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3211

3 years agoMulti object editing - verticle dissolve support by Mateusz Grzeliński
Dalai Felinto [Mon, 7 May 2018 19:42:19 +0000 (21:42 +0200)]
Multi object editing - verticle dissolve support by Mateusz Grzeliński

With changes by me:
* Indentation (tabs)
* Removing RNA_boolean_get tests out of the for loop.
* Continue iterator if no selected vertice.

Maniphest Tasks: T54643
Differential Revision: https://developer.blender.org/D3210

3 years agoExtrude Widget: Add orientation to topbar
Campbell Barton [Mon, 7 May 2018 19:30:55 +0000 (21:30 +0200)]
Extrude Widget: Add orientation to topbar

Add extrude operator that's intended to work on the current selection
and be activated as a tool.

3 years agoExtrude Widget: orient correctly w/ rotated object
Campbell Barton [Mon, 7 May 2018 17:38:48 +0000 (19:38 +0200)]
Extrude Widget: orient correctly w/ rotated object

3 years agoExtrude Widget: don't show when moving
Campbell Barton [Mon, 7 May 2018 13:30:23 +0000 (15:30 +0200)]
Extrude Widget: don't show when moving

3 years agoCleanup: style
Campbell Barton [Mon, 7 May 2018 19:38:43 +0000 (21:38 +0200)]
Cleanup: style

3 years agoMulti Object Smooth shading by Ethan Brierley
Dalai Felinto [Mon, 7 May 2018 19:30:29 +0000 (21:30 +0200)]
Multi Object Smooth shading by Ethan Brierley

With small changes by Dalai Felinto.

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

3 years agoFix: Select all didnt' work with COW pose bones
Joshua Leung [Mon, 7 May 2018 17:03:29 +0000 (19:03 +0200)]
Fix: Select all didnt' work with COW pose bones

3 years agoUpdate Flatty Light theme with topbar and minor tweaks
Pablo Vazquez [Mon, 7 May 2018 16:46:30 +0000 (18:46 +0200)]
Update Flatty Light theme with topbar and minor tweaks

3 years agoDRW: Fix incorrect blending function reset.
Clément Foucault [Mon, 7 May 2018 16:29:37 +0000 (18:29 +0200)]
DRW: Fix incorrect blending function reset.

3 years agoModifier stack: move vgroup editing modifiers to new Mesh-based system.
Bastien Montagne [Mon, 7 May 2018 16:15:27 +0000 (18:15 +0200)]
Modifier stack: move vgroup editing modifiers to new Mesh-based system.

Some notes here:
* Proximity with non-mesh objects (like curve, see TEST_2 scene in
weightvg testfile) are not working currently. This is known TODO of COW
depsgraph project.
* Proximity modifier is slower, due to some other TODO pending on
BVHTree creation/caching for Mesh.

3 years agoModifier stack: add new get_texture_coords_mesh() helper.
Bastien Montagne [Mon, 7 May 2018 16:14:15 +0000 (18:14 +0200)]
Modifier stack: add new get_texture_coords_mesh() helper.

Will eventually fully replace get_texture_coords().

3 years agoFix ARMATURE_OT_layers_show_all now works with COW
Joshua Leung [Mon, 7 May 2018 16:06:16 +0000 (18:06 +0200)]
Fix ARMATURE_OT_layers_show_all now works with COW

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 7 May 2018 16:04:16 +0000 (18:04 +0200)]
Merge branch 'master' into blender2.8

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 7 May 2018 16:02:48 +0000 (18:02 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix (unreported) memleak when copying object with some modifiers.
Bastien Montagne [Mon, 7 May 2018 15:58:35 +0000 (17:58 +0200)]
Fix (unreported) memleak when copying object with some modifiers.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 7 May 2018 15:54:10 +0000 (17:54 +0200)]
Merge branch 'master' into blender2.8

3 years agoCleanup: rename char/float conversion functions
Campbell Barton [Mon, 7 May 2018 15:31:28 +0000 (17:31 +0200)]
Cleanup: rename char/float conversion functions

- FTOCHAR       -> unit_float_to_uchar_clamp
- F3TOCHAR3     -> unit_float_to_uchar_clamp_v3 (swap args)
- F4TOCHAR4     -> unit_float_to_uchar_clamp_v4 (swap args)
- FTOUSHORT     -> unit_float_to_ushort_clamp
- USHORTTOUCHAR -> unit_ushort_to_uchar

3 years agoCleanup: move unit char/short/float to functions
Campbell Barton [Mon, 7 May 2018 15:14:28 +0000 (17:14 +0200)]
Cleanup: move unit char/short/float to functions

This caused GCC 8.1 to crash at build time,
but was also not very nice use of macros.

3 years agoArmature: Transparent Bone: Fix envelope not being alpha blended.
Clément Foucault [Mon, 7 May 2018 15:12:04 +0000 (17:12 +0200)]
Armature: Transparent Bone: Fix envelope not being alpha blended.

3 years agoArmature: Add new Transparent Bone overlay option.
Clément Foucault [Mon, 7 May 2018 13:10:11 +0000 (15:10 +0200)]
Armature: Add new Transparent Bone overlay option.

This is half the replacement of the old wireframe mode. It's not doing any
XRay drawing at the moment.

3 years agoDRW: Do not multiply alpha or color by alpha if not in blend more.
Clément Foucault [Mon, 7 May 2018 13:03:01 +0000 (15:03 +0200)]
DRW: Do not multiply alpha or color by alpha if not in blend more.

3 years agoDRW: Add DRW_pass_state_add and DRW_pass_state_remove
Clément Foucault [Mon, 7 May 2018 13:01:58 +0000 (15:01 +0200)]
DRW: Add DRW_pass_state_add and DRW_pass_state_remove

3 years agoFix: Left in debug prints
Joshua Leung [Mon, 7 May 2018 14:55:13 +0000 (16:55 +0200)]
Fix: Left in debug prints

3 years agoFixes for motion path evaluation (part of T54810 work)
Joshua Leung [Mon, 7 May 2018 14:52:42 +0000 (16:52 +0200)]
Fixes for motion path evaluation (part of T54810 work)

This commit brings back motion path calculations working on same level
as 2.7x.  Caveats:
* You cannot actually see anything, as all the drawing code for motion
  paths was removed and not reimplmented in 2.8 draw engines yet
* This doesn't actually use a separate depsgraph instance for fast
  background calculations yet. That's a separate topic, and will require
  further investigation (probably after code quest, according to original
  planning).
* The work here *does* however pave the path forwards towards fully separate
  COW evaluation though. We only need to stub in a different depsgraph instance
  here to get things working.

3 years agoFix: Tag armature for copy on write when selecting bones, so active bone gets updated
Ines Almeida [Mon, 7 May 2018 12:12:20 +0000 (14:12 +0200)]
Fix: Tag armature for copy on write when selecting bones, so active bone gets updated

see 8a2d2f1bb40 for similar

Reviewers: aligorith, sergey

Reviewed By: aligorith

Maniphest Tasks: T54812

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

3 years agoFix Movieclip editors 'graph' and 'dopesheet' view using themes region
Philipp Oeser [Mon, 7 May 2018 12:57:05 +0000 (14:57 +0200)]
Fix Movieclip editors 'graph' and 'dopesheet' view using themes region
background setting

mentioned in T54942

Reviewed By: campbellbarton

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

3 years agoFix T54525: crash when setting number of frames to use between dupoff
Philipp Oeser [Mon, 7 May 2018 12:49:09 +0000 (14:49 +0200)]
Fix T54525: crash when setting number of frames to use between dupoff
frames

caused division by zero if both dupli_frames_on and dupli_frames_off are
zero. doing this doesnt seem useful, dupliframes can be disabled in
other ways.

Reviewed By: campbellbarton

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

3 years agoUI: add particle mode popovers
Campbell Barton [Mon, 7 May 2018 13:01:37 +0000 (15:01 +0200)]
UI: add particle mode popovers

3 years agoWorkbench: Texture Shading mode
Jeroen Bakker [Mon, 7 May 2018 13:00:16 +0000 (15:00 +0200)]
Workbench: Texture Shading mode

- draws the active texture of the material
- if the texture cannot be found it will fallback to solid/material

3 years agoWorkbench: Texture Shading mode
Jeroen Bakker [Mon, 7 May 2018 12:59:27 +0000 (14:59 +0200)]
Workbench: Texture Shading mode

3 years agoFix Movieclip editors 'graph' and 'dopesheet' view using themes region
Philipp Oeser [Mon, 7 May 2018 12:57:05 +0000 (14:57 +0200)]
Fix Movieclip editors 'graph' and 'dopesheet' view using themes region
background setting

mentioned in T54942

Reviewed By: campbellbarton

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

3 years agoFix T54525: crash when setting number of frames to use between dupoff
Philipp Oeser [Mon, 7 May 2018 12:49:09 +0000 (14:49 +0200)]
Fix T54525: crash when setting number of frames to use between dupoff
frames

caused division by zero if both dupli_frames_on and dupli_frames_off are
zero. doing this doesnt seem useful, dupliframes can be disabled in
other ways.

Reviewed By: campbellbarton

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

3 years agoModifier stack: port 'normals edit' to new Mesh-based system.
Bastien Montagne [Mon, 7 May 2018 12:36:00 +0000 (14:36 +0200)]
Modifier stack: port 'normals edit' to new Mesh-based system.

Note that custom normals drawing seems to be broken, and there also are
some refresh issues in some cases... But this is same with old DM-based
code, so not related to modifiers themselves probably.

3 years agoClear dirty normals flag from Mesh at least in main BKE_mesh_calc_normals().
Bastien Montagne [Mon, 7 May 2018 12:34:49 +0000 (14:34 +0200)]
Clear dirty normals flag from Mesh at least in main BKE_mesh_calc_normals().

3 years agoChange mesh dirty runtime flags to signed int64_t.
Bastien Montagne [Mon, 7 May 2018 12:33:20 +0000 (14:33 +0200)]
Change mesh dirty runtime flags to signed int64_t.

Because CD_MASK_XXX are signed longlong, so when assigning to unsigned
longlong you get grumpy compiler errors!

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Mon, 7 May 2018 12:29:54 +0000 (14:29 +0200)]
Merge branch 'master' into blender2.8

3 years agoMore tweaks to strict compiler flags
Sergey Sharybin [Mon, 7 May 2018 12:28:22 +0000 (14:28 +0200)]
More tweaks to strict compiler flags

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Mon, 7 May 2018 12:20:47 +0000 (14:20 +0200)]
Merge branch 'master' into blender2.8

3 years agoSilence compilation error around possible fall-through
Sergey Sharybin [Mon, 7 May 2018 12:19:12 +0000 (14:19 +0200)]
Silence compilation error around possible fall-through

3 years agoFix wrong comparison of drop target URI on X11
Sergey Sharybin [Mon, 7 May 2018 12:08:33 +0000 (14:08 +0200)]
Fix wrong comparison of drop target URI on X11

Need to compare, NOT to override passed file name.

3 years agoFix crash in debug drawing of fullscreen exit icon
Julian Eisel [Mon, 7 May 2018 11:46:00 +0000 (13:46 +0200)]
Fix crash in debug drawing of fullscreen exit icon

Steps to recreate were:
* Go into fullscreen mode (Alt+F10)
* Open debug menu (Ctrl+Alt+D)
* Set value to 1
* Confirming should crash (at least in debug builds)

3 years agoRemove alternative action-zone drawing for collapsed regions
Julian Eisel [Mon, 7 May 2018 11:26:48 +0000 (13:26 +0200)]
Remove alternative action-zone drawing for collapsed regions

Was hidden behind debug values 1, 2 and 3.

Also cleaned up logic in region_azone_edge_initialize. It was using a variable
called is_hidden that actually should've been called is_visible.

3 years agoEevee: Hair: Fix wrong color when shader is compiling.
Clément Foucault [Mon, 7 May 2018 11:06:57 +0000 (13:06 +0200)]
Eevee: Hair: Fix wrong color when shader is compiling.

3 years agoArmature: Fix BBones base face winding.
Clément Foucault [Mon, 7 May 2018 10:27:59 +0000 (12:27 +0200)]
Armature: Fix BBones base face winding.

Was producing wrong outline and backface culling.

3 years agoArmature: Remove big outlines for active bones & reduce axes color.
Clément Foucault [Mon, 7 May 2018 10:23:15 +0000 (12:23 +0200)]
Armature: Remove big outlines for active bones & reduce axes color.

3 years agoFix Bevel percent mode bug 54228
Howard Trickey [Mon, 7 May 2018 11:04:12 +0000 (07:04 -0400)]
Fix Bevel percent mode bug 54228

Previous new adjust pass commit should have excluded percent mode.

3 years agoFix T54324: remove stencil entries from weight paint keymap
Philipp Oeser [Mon, 7 May 2018 10:28:15 +0000 (12:28 +0200)]
Fix T54324: remove stencil entries from weight paint keymap

Reviewed By: mont29

Differential Revision: http://developer.blender.org/D3178

3 years agoModifier stack: move Edge Split to new Mesh-based system.
Bastien Montagne [Mon, 7 May 2018 10:26:42 +0000 (12:26 +0200)]
Modifier stack: move Edge Split to new Mesh-based system.

3 years agoModifier stack: Fix broken 'dirty normals' flag for new mesh-aware modifiers.
Bastien Montagne [Mon, 7 May 2018 10:24:23 +0000 (12:24 +0200)]
Modifier stack: Fix broken 'dirty normals' flag for new mesh-aware modifiers.

Since modifier stack is still primarily based on DM in blender2.8, we
need to copy over 'dirty normals' flag from temp Mesh to DM after
modifier has been evaluated.

3 years agoFix T54324: remove stencil entries from weight paint keymap
Philipp Oeser [Mon, 7 May 2018 10:28:15 +0000 (12:28 +0200)]
Fix T54324: remove stencil entries from weight paint keymap

Reviewed By: mont29

Differential Revision: http://developer.blender.org/D3178

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Mon, 7 May 2018 10:26:06 +0000 (12:26 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix T54594: Lattice with Armature modifier not updating correctly
Sergey Sharybin [Mon, 7 May 2018 10:04:50 +0000 (12:04 +0200)]
Fix T54594: Lattice with Armature modifier not updating correctly

3 years agoUI: Hide & shrink scroll-bars based on cursor position
Julian Eisel [Sun, 6 May 2018 23:31:18 +0000 (01:31 +0200)]
UI: Hide & shrink scroll-bars based on cursor position

Scroll-bars are now hidden unless the cursor approaches them, in which case they
smoothly grow and become more & more visible. Note that since 0d309144020168e55,
scroll-bars are drawn on top of editor contents. There's no more jumping of
buttons when scroll-bars appear.

Technical notes:
* AZones are used to adjust scrollbars based on mouse movements

  We may want to support screen level AZones if we want scrollbars to also
  smoothly appear when approaching them from a different area.
  I also plan to make further changes to AZones to clean up stuff a bit.
* Had to move AZone handling to a post ARegion init stage, since we need the
  updated View2D data from there.
* View2D masks and scroller rectangles are now updated on every redraw. It's
  cheap to do that though.

3 years agoUI: Draw scroll-bars overlapping with editor content
Julian Eisel [Thu, 26 Apr 2018 22:49:00 +0000 (00:49 +0200)]
UI: Draw scroll-bars overlapping with editor content

Scroll-bars used to draw in a little extra space in the editor, causing
buttons to jump a bit when they appeared/disappeared. Now they draw on
top of the buttons, just small enough to avoid bigger overlaps. Followup commits
will do further adjustments.

With this we can get rid of a hack that was calling the (often Python
defined) panel definition - the panel 'draw' callback - twice.

3 years agoMulti-object edge collapse
Dalai Felinto [Mon, 7 May 2018 09:26:00 +0000 (11:26 +0200)]
Multi-object edge collapse

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 7 May 2018 09:15:31 +0000 (11:15 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix T54966: mathutils.noise.voronoi Memory leak
Bastien Montagne [Mon, 7 May 2018 09:07:11 +0000 (11:07 +0200)]
Fix T54966: mathutils.noise.voronoi Memory leak

C code was not correctly handling release of temp data, not technically
a memory leak, but indeed rather annoying bug! ;)

3 years agoArmature: Add back relationship lines.
Clément Foucault [Sun, 6 May 2018 22:24:30 +0000 (00:24 +0200)]
Armature: Add back relationship lines.

3 years agoObject Mode: Use stipple shader for relationship lines.
Clément Foucault [Sun, 6 May 2018 22:22:03 +0000 (00:22 +0200)]
Object Mode: Use stipple shader for relationship lines.

3 years agoReset number values when entering an empty value
Dalai Felinto [Sun, 6 May 2018 17:30:47 +0000 (19:30 +0200)]
Reset number values when entering an empty value

Note: This rely on the property having a pre-defined default.

Also, be aware that trying to multi-drag and multi-ui-edit is not working
at the moment (T54976).

With changes by Campbell Barton.

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

3 years agoRNA default: Scene start/end frames
Dalai Felinto [Sun, 6 May 2018 17:31:16 +0000 (19:31 +0200)]
RNA default: Scene start/end frames

3 years agoFix wrong header alignment in user preferences, after recent commit.
Brecht Van Lommel [Sun, 6 May 2018 19:23:53 +0000 (21:23 +0200)]
Fix wrong header alignment in user preferences, after recent commit.

3 years agoUI: fix popover menus sometimes going off screen, after recent commit.
Brecht Van Lommel [Sun, 6 May 2018 18:43:02 +0000 (20:43 +0200)]
UI: fix popover menus sometimes going off screen, after recent commit.

3 years agoUI: keep header top/bottom alignment the same when switching editor types.
Brecht Van Lommel [Sun, 6 May 2018 18:20:40 +0000 (20:20 +0200)]
UI: keep header top/bottom alignment the same when switching editor types.

3 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Sun, 6 May 2018 18:15:14 +0000 (20:15 +0200)]
Merge branch 'master' into blender2.8

3 years agoUI: fixes for 3D viewport popovers moving / flipping on edits.
Brecht Van Lommel [Sun, 6 May 2018 16:08:27 +0000 (18:08 +0200)]
UI: fixes for 3D viewport popovers moving / flipping on edits.

* Ensure popover does not change direction or location.
* Open popover towards the relevant editor, like pulldown menus.
* Use a bigger maximum assumed size to deal with some corner cases.
* Do proper 3D viewport header refresh on shading mode changes.

3 years agoCleanup: deprecate area.headertype.
Brecht Van Lommel [Sun, 6 May 2018 16:36:54 +0000 (18:36 +0200)]
Cleanup: deprecate area.headertype.

This was still used in a few places but not kept in sync with the actual
header position. Always get alignment from the header region now.