4 weeks agoSculpt/Paint: Ignore INBETWEEN_MOUSEMOVE events on certain brush tools
Pablo Dobarro [Tue, 6 Aug 2019 23:36:17 +0000 (01:36 +0200)]
Sculpt/Paint: Ignore INBETWEEN_MOUSEMOVE events on certain brush tools

Some brush tools were being executed too often when using devices with high polling rates, causing performance issues. This should improve the performance of brushes that don't need those updates.

Reviewed By: brecht

Differential Revision:

4 weeks agoFix crashes caused by library placeholders.
Bastien Montagne [Mon, 12 Aug 2019 09:54:37 +0000 (11:54 +0200)]
Fix crashes caused by library placeholders.

This fixes inconsistencies in materials between objects and obdata
due to placeholders generation for missing libdata.

Note that we cannot do that when generating the obdata placeholder,
as not all objects using it might be already loaded...
So this has to be done near the end of the reading/linking process.

Reported here by Blender Studio.

Reviewers: brecht

Subscribers: jbakker, zeddb

Tags: #datablocks_and_libraries

Differential Revision:

4 weeks agoFix T68542: ParticleSystem.uv_on_emitter returns always 0,0 while Particle.uv_on_emit...
Bastien Montagne [Mon, 12 Aug 2019 09:44:44 +0000 (11:44 +0200)]
Fix T68542: ParticleSystem.uv_on_emitter returns always 0,0 while Particle.uv_on_emitter returns a value.

'cached' particles (for paths actually) are only generated for some kind
(hair, keyed, and baked system afaik), not for all.

Note that we could probably just use directly `totpart` and `totchild`,
but keeping code as close to what it was as possible, for now...

4 weeks agoFix error displaying brush panel (sidebar) in Vertex Paint mode
Philipp Oeser [Mon, 12 Aug 2019 09:37:24 +0000 (11:37 +0200)]
Fix error displaying brush panel (sidebar) in Vertex Paint mode

oversight in rB83fc8342d827

5 weeks agoView3D: Circle Select optimization
mano-wii [Mon, 12 Aug 2019 01:12:11 +0000 (22:12 -0300)]
View3D: Circle Select optimization

Don't recreate `select_bitmap` for each edited object.

5 weeks agoCleanup: spelling
Campbell Barton [Sun, 11 Aug 2019 12:41:04 +0000 (22:41 +1000)]
Cleanup: spelling

5 weeks agoCleanup: use doxy comments
Campbell Barton [Sun, 11 Aug 2019 12:41:04 +0000 (22:41 +1000)]
Cleanup: use doxy comments

5 weeks agoDocs: improve comments
Campbell Barton [Sun, 11 Aug 2019 12:34:22 +0000 (22:34 +1000)]
Docs: improve comments

5 weeks agoBLI_math: add isect_tri_tri_v2, wrap via mathutils.geometry
Campbell Barton [Fri, 9 Aug 2019 19:34:30 +0000 (05:34 +1000)]
BLI_math: add isect_tri_tri_v2, wrap via mathutils.geometry

5 weeks agoText: support comment without selection
Campbell Barton [Sun, 11 Aug 2019 10:50:02 +0000 (20:50 +1000)]
Text: support comment without selection

D5451 by @Poulpator with fixes.

5 weeks agoPreferences: tag as dirty when loading factory startup
Campbell Barton [Sun, 11 Aug 2019 08:03:17 +0000 (18:03 +1000)]
Preferences: tag as dirty when loading factory startup

5 weeks agoUI: clarify auto-save preference
Campbell Barton [Sun, 11 Aug 2019 07:51:09 +0000 (17:51 +1000)]
UI: clarify auto-save preference

- Grey out the option when factory settings have been loaded.
- Note it it's tool-top that it's ignored when factory settings
  have been loaded.

Suggestions by @JulienKaspar

5 weeks agoCleanup: clang-format
Campbell Barton [Sat, 10 Aug 2019 16:41:29 +0000 (02:41 +1000)]
Cleanup: clang-format

5 weeks agoCleanup: unused var
Campbell Barton [Sat, 10 Aug 2019 16:46:29 +0000 (02:46 +1000)]
Cleanup: unused var

5 weeks agoNodes: Display vector values expanded, except when specified as compact.
OmarSquircleArt [Sat, 10 Aug 2019 15:37:39 +0000 (17:37 +0200)]
Nodes: Display vector values expanded, except when specified as compact.

Change the default drawing method of vector sockets to use a column layout.
This allows more interactive use of nodes and avoids the one or two clicks
needed to edit vector sockets in the old default component layout.

Developers may still use the component layout by flaging the socket with the
`SOCK_COMPACT` socket flag. For now, we choose to draw the SSS scale vector
of the Principled and SSS nodes in a compact form because they don't require
much interactivity.

Reviewers: brecht, JacquesLucke

Differential Revision:

5 weeks agoGPencil: Refine tooltip for Simplify modifier
Antonio Vazquez [Sat, 10 Aug 2019 15:22:58 +0000 (17:22 +0200)]
GPencil: Refine tooltip for Simplify modifier

5 weeks agoGPencil: Hide selection tool in sculpt mode when mask is disabled
Matias Mendiola [Sat, 10 Aug 2019 15:19:54 +0000 (17:19 +0200)]
GPencil: Hide selection tool in sculpt mode when mask is disabled

The selection tool must be hidden if the sculpt mask is not enabled because these options are not usable in this mode.

Also, the Select tools have been moved to the bottom of the toolbar.

Now, the logic is similar to Meshes.

Differential Revision:

5 weeks agoGPencil: Add new Distance property to Simplify modifier
Antonio Vazquez [Sat, 10 Aug 2019 15:16:12 +0000 (17:16 +0200)]
GPencil: Add new Distance property to Simplify modifier

Before, the length variable was reused for Sample and Merge Simplify. Now, the Merge has its own distance property and variable in the modifier struct.

5 weeks agoGPencil: Fix tooltips for Simplify modifier
Antonio Vazquez [Sat, 10 Aug 2019 15:00:49 +0000 (17:00 +0200)]
GPencil: Fix tooltips for Simplify modifier

5 weeks agoGPencil: Disable Select operator for Sculpt mode if Mask is OFF
Antonio Vazquez [Sat, 10 Aug 2019 14:34:24 +0000 (16:34 +0200)]
GPencil: Disable Select operator for Sculpt mode if Mask is OFF

The selection is only valid when the mask is enabled, so the operators must be disabled.

This modification is part of D5452

5 weeks agoGPencil: New macros to check Sculpt and Weight Paint modes
Antonioya [Sat, 10 Aug 2019 14:26:59 +0000 (16:26 +0200)]
GPencil: New macros to check Sculpt and Weight Paint modes

5 weeks agoFix T68414: GPencil crash after using L key and Ctrl+Z in Draw Mode
Antonio Vazquez [Sat, 10 Aug 2019 08:44:44 +0000 (10:44 +0200)]
Fix T68414: GPencil crash after using L key and Ctrl+Z in Draw Mode

There is a segment fault because the operator was in modal but the Ctrl+Z breaks the custom data. Now, the Ctrl+Z ends the operator.

5 weeks agoAdd Constrained Delaunay Triangulation routine to Blenlib.
Howard Trickey [Sat, 10 Aug 2019 13:24:20 +0000 (08:24 -0500)]
Add Constrained Delaunay Triangulation routine to Blenlib.

See Design task T68277, and patch D5423.
This commit includes edits by @ideasman42 to patch in
branch temp-D5423-update, plus responses to his comments.

5 weeks agoGPencil: Improves Close stroke when the closing gap is very small
Antonio Vazquez [Sat, 10 Aug 2019 11:15:20 +0000 (13:15 +0200)]
GPencil: Improves Close stroke when the closing gap is very small

For very small gaps, we don't need generate geometry.

5 weeks agoUI: Add initial context menus for Info and Console editors
William Reynish [Sat, 10 Aug 2019 09:35:16 +0000 (11:35 +0200)]
UI: Add initial context menus for Info and Console editors

Both keymaps are also updated

5 weeks agoGPencil: Fix segment fault using Search menu
Antonio Vazquez [Sat, 10 Aug 2019 08:20:30 +0000 (10:20 +0200)]
GPencil: Fix segment fault using Search menu

The poll was not checking Object type

5 weeks agoText: minor change to text prefix behavior
Campbell Barton [Fri, 9 Aug 2019 18:25:22 +0000 (04:25 +1000)]
Text: minor change to text prefix behavior

Don't keep the cursor at the start of the line,
this was creating a selection when adding a prefix without a selection.

5 weeks agoFix T68486: GPencil ehen interpolate strokes, only display one stroke not all
Antonio Vazquez [Fri, 9 Aug 2019 18:28:12 +0000 (20:28 +0200)]
Fix T68486: GPencil ehen interpolate strokes, only display one stroke not all

The drawing loop exit too early.

5 weeks agoUI: add menus for the info editor
Campbell Barton [Fri, 9 Aug 2019 15:45:58 +0000 (01:45 +1000)]
UI: add menus for the info editor

D5444 by @tintwotin with edits

5 weeks agoKeymap: Ctrl-G now maps to Find Set Selected
Campbell Barton [Fri, 9 Aug 2019 15:35:41 +0000 (01:35 +1000)]
Keymap: Ctrl-G now maps to Find Set Selected

This finds using the current selection instead
of using the text in the find side-bar.

More useful for quickly jump to other instances of a word.

5 weeks agoCleanup: Remove blank lines and trim end line spaces
Antonioya [Fri, 9 Aug 2019 15:46:05 +0000 (17:46 +0200)]
Cleanup: Remove blank lines and trim end line spaces

5 weeks agoFix T67591: Gpencil reorganize Edit Menu
Matias Mendiola [Fri, 9 Aug 2019 15:36:27 +0000 (17:36 +0200)]
Fix T67591: Gpencil reorganize Edit Menu

The Grease Pencil Stroke Menu in Edit mode is cluttered with operators that act over stroke, points or the entire object.

To keep the consistency of the edit menu with other Blender Objects, we should separate the menu in: Grease Pencil - Stroke - Point.
Also we should add some missing operators and other menus like Show/hide or Weights among others

Differential Revision:

5 weeks agoFix T67821: Snap to Symmetry not updating
Sebastian Parborg [Fri, 9 Aug 2019 15:25:47 +0000 (17:25 +0200)]
Fix T67821: Snap to Symmetry not updating

Added a missing depsgraph update.

5 weeks agoUI: add back header icons to toggle text display options
Campbell Barton [Fri, 9 Aug 2019 15:14:40 +0000 (01:14 +1000)]
UI: add back header icons to toggle text display options

These were removed in D5028, adding back by popular demand.

5 weeks agoCleanup: alternate fix for T66019
Campbell Barton [Fri, 9 Aug 2019 14:35:18 +0000 (00:35 +1000)]
Cleanup: alternate fix for T66019

Prefer triple quoting to avoid having to escape quotes.

5 weeks agoCleanup: simplify preview check in sequencer
Campbell Barton [Fri, 9 Aug 2019 14:21:47 +0000 (00:21 +1000)]
Cleanup: simplify preview check in sequencer

Also removed XXX comment which is now resolved.

5 weeks agoUI: Show suffix '*' instead of graying out 'Save Preferences'
Campbell Barton [Fri, 9 Aug 2019 14:06:54 +0000 (00:06 +1000)]
UI: Show suffix '*' instead of graying out 'Save Preferences'

Save preferences still works when preferences have not been edited.

5 weeks agoCleanup: move space types under DNA_DEPRECATED
Campbell Barton [Fri, 9 Aug 2019 13:57:25 +0000 (23:57 +1000)]
Cleanup: move space types under DNA_DEPRECATED

Prevent accidental use

5 weeks agoCleanup: remove redundant time check
Campbell Barton [Fri, 9 Aug 2019 13:59:04 +0000 (23:59 +1000)]
Cleanup: remove redundant time check

5 weeks agoUI: Clean up Sequencer/Preview Menu and Preview Menu
William Reynish [Fri, 9 Aug 2019 13:35:42 +0000 (15:35 +0200)]
UI: Clean up Sequencer/Preview Menu and Preview Menu

The Sequencer/Preview Menu is a mixture of both the Sequencer and the Preview menu functions, but they are currently not presented in an organized way.

Moved the Preview Zoom functions up next to the Sequencer Zoom functions with a separator in between.
Moved the Preview Show functions up next to the Sequencer Show functions with a separator in between.
Uncommented Show Framenumber Indicator, since it does not work or have a function after scrubbing in the timebar was implemented.
Renamed Show Metadata to Show Image Metadata, since it does only show metadata for images.
Added Show Annotations to View Menu for consistency.
Added Frame Overlay to View Menu for consistency.
Added Fractional Zoom to a sub-menu, since Sequencer/Preview View menu became too long. This sub-menu is in consistency with the Fractional Zoom menu in the Image Editor.
In Sequencer/Preview mode the Fractional Zoom will be named Fractional Preview Zoom, to specify that this function is only for the Preview.

Patch by Peter Fog (tintwotin)

Differential Revision:

5 weeks agoFix T68322: Shear in Dopesheet causes crash
Sybren A. Stüvel [Thu, 8 Aug 2019 16:21:40 +0000 (18:21 +0200)]
Fix T68322: Shear in Dopesheet causes crash

The Shear transform operator is now disallowed in the timeline and
dopesheet editors.

Reviewers: campbellbarton

Differential Revision:

5 weeks agoClarify "Save on Exit" tooltip
Sybren A. Stüvel [Fri, 9 Aug 2019 12:35:28 +0000 (14:35 +0200)]
Clarify "Save on Exit" tooltip

The old text, "Save modified preferences on exit" suggests that only the
modified preferences are saved. This is not the case: all preferences
are saved at once. This distinction is especially important after having
loaded factory default settings.

As discussed with @campbellbarton and @JulienKaspar.

5 weeks agoUI: Sequencer Sidebar Text-Strip Panel adjustments
William Reynish [Fri, 9 Aug 2019 12:08:20 +0000 (14:08 +0200)]
UI: Sequencer Sidebar Text-Strip Panel adjustments

The functions are now divided into two nested sub panels, since it makes it easier to navigate through the options.

The Location values are moved above the Alignment values, to avoid the confusion that the alignment values could be presets for the location.

In the menu and context menu the Text Effect strip was among the functions which had the Input sub menu visible. Text strips do not take strip inputs, so this is a bug, which is solved with this diff.

Patch by Peter Fog (tintwotin)

Differential Revision:

5 weeks agoCleanup: Fix stupid style error in previous commit
Antonio Vazquez [Fri, 9 Aug 2019 09:41:50 +0000 (11:41 +0200)]
Cleanup: Fix stupid style error in previous commit

5 weeks agoGPencil: Add "Self Overlap" parameter to materials to disable Stencil
Antonioya [Fri, 9 Aug 2019 09:04:14 +0000 (11:04 +0200)]
GPencil: Add "Self Overlap" parameter to materials to disable Stencil

This parameter was removed in 2.80 and we decided to back again, but now is inverted.

5 weeks agoUI: expand on console menus
Campbell Barton [Fri, 9 Aug 2019 09:05:15 +0000 (19:05 +1000)]
UI: expand on console menus

Some features weren't exposed anywhere in the interface.

D5443 by @tintwotin

5 weeks agoUI: Sculpt menus cleanup
William Reynish [Thu, 8 Aug 2019 20:54:57 +0000 (22:54 +0200)]
UI: Sculpt menus cleanup

This removes the Brush pulldown menu from Sculpt and Paint modes. This menu only contained a random duplicated subset of brush options. Now everything is accessible centrally in the Brush Tool Settings.

The Sculpt menu likewise contained various random brush options. These are removed and replaced by a list of commands, just like the other paint modes.

Also removes the Show Mask option from the mode options panel since this is also in Overlays.

Reviewers: Campbell Barton

Differential Revision:

5 weeks agoBMesh: add utility to calculate normal from a vertex cloud
Campbell Barton [Thu, 8 Aug 2019 19:27:49 +0000 (05:27 +1000)]
BMesh: add utility to calculate normal from a vertex cloud

Extract from BM_verts_sort_radial_plane & simplify.

5 weeks agoCleanup: remove function already implemented in BKE_deform
Campbell Barton [Thu, 8 Aug 2019 16:02:32 +0000 (02:02 +1000)]
Cleanup: remove function already implemented in BKE_deform

5 weeks agoDocs: improve description of 3D view distance offset utility
Campbell Barton [Thu, 8 Aug 2019 13:18:20 +0000 (23:18 +1000)]
Docs: improve description of 3D view distance offset utility

5 weeks agoCleanup: use doxy sections
Campbell Barton [Thu, 8 Aug 2019 15:50:15 +0000 (01:50 +1000)]
Cleanup: use doxy sections

5 weeks agoCleanup: warnings
Campbell Barton [Thu, 8 Aug 2019 15:54:50 +0000 (01:54 +1000)]
Cleanup: warnings

5 weeks agoCleanup: Typo in naming (BLE instead of BKE, tssttt).
Bastien Montagne [Thu, 8 Aug 2019 15:18:15 +0000 (17:18 +0200)]
Cleanup: Typo in naming (BLE instead of BKE, tssttt).

5 weeks agoFix T52551: undo causes crash after enabling a new rigid body when scene uses a refer...
Bastien Montagne [Thu, 8 Aug 2019 15:16:54 +0000 (17:16 +0200)]
Fix T52551: undo causes crash after enabling a new rigid body when scene uses a referenced rigid body world.

Poll functions were not correct here, we cannot make objects part of
rigidbody sim if the RB collection is a linked one...

5 weeks agoGPencil: Add mode Merge to Simplify modifier
Antonio Vazquez [Thu, 8 Aug 2019 15:16:06 +0000 (17:16 +0200)]
GPencil: Add mode Merge to Simplify modifier

This option uses the same logic of the merge by distance but as an option of modifier to allow dynamic merge.

This option will be very useful for LANPR generated strokes.

5 weeks agoGPencil: New Simplify modifier mode Sample and operator
Antonioya [Thu, 8 Aug 2019 14:12:13 +0000 (16:12 +0200)]
GPencil: New Simplify modifier mode Sample and operator

This mode simplify the stroke doing a resampling of the points and generate new geometry at the distance defined.

Sample function developed by @NicksBest

New Resample Stroke operator

This operator recreates the stroke geometry with a predefined length between points.

The operator uses the same code used in Simplify modifier.

Reviewers: @mendio

5 weeks agoFix T68393: lift hardcoded limit on particle children 'child_radius'
Philipp Oeser [Thu, 8 Aug 2019 10:38:56 +0000 (12:38 +0200)]
Fix T68393: lift hardcoded limit on particle children 'child_radius'

Reviewers: jacqueslucke

Maniphest Tasks: T68393

Differential Revision:

5 weeks agoFix T68375: Polyline: can not make segment (cyclic)
Philipp Oeser [Thu, 8 Aug 2019 11:56:07 +0000 (13:56 +0200)]
Fix T68375: Polyline: can not make segment (cyclic)

Reviewers: campbellbarton

Maniphest Tasks: T68375

Differential Revision:

5 weeks agoFix T68360: Zoom too sensitive with hi-dpi
Campbell Barton [Thu, 8 Aug 2019 12:08:10 +0000 (22:08 +1000)]
Fix T68360: Zoom too sensitive with hi-dpi

Scale pixel-input by pixel size for zoom operators.

5 weeks agoCleanup: use static for undeclared function
Campbell Barton [Thu, 8 Aug 2019 12:47:10 +0000 (22:47 +1000)]
Cleanup: use static for undeclared function

5 weeks agoFix T67545: GPencil - New Merge by Distance operator
Antonioya [Thu, 8 Aug 2019 08:23:05 +0000 (10:23 +0200)]
Fix T67545: GPencil - New Merge by Distance operator

Merge points when the distance is less than a predefined value.

The method to interpolate the position created a wrong merge. Now, always the secondary point is merged with the first one (merge at first), except the last point.

5 weeks ago2nd attempt to fix build error from rB22bdd08dfd08
Philipp Oeser [Thu, 8 Aug 2019 08:44:32 +0000 (10:44 +0200)]
2nd attempt to fix build error from rB22bdd08dfd08

sorry for the noise, if that doesnt do it, I'll revert and check this

5 weeks agoattempt to fix build error from rB22bdd08dfd08
Philipp Oeser [Thu, 8 Aug 2019 08:38:01 +0000 (10:38 +0200)]
attempt to fix build error from rB22bdd08dfd08

5 weeks agoFix T68250: Camera keyframing (Walk/Fly) despite canceling movement
Philipp Oeser [Thu, 8 Aug 2019 07:41:19 +0000 (09:41 +0200)]
Fix T68250: Camera keyframing (Walk/Fly) despite canceling movement

Reviewers: campbellbarton (thx!)

Maniphest Tasks: T68250

Differential Revision:

5 weeks agoKeymap: don't use 'any' modifiers for the text editor context menu
Campbell Barton [Thu, 8 Aug 2019 06:40:40 +0000 (16:40 +1000)]
Keymap: don't use 'any' modifiers for the text editor context menu

5 weeks agoCleanup: rename text toolbox to context menu
Campbell Barton [Thu, 8 Aug 2019 06:39:50 +0000 (16:39 +1000)]
Cleanup: rename text toolbox to context menu

5 weeks agoText: reorganize menus
Campbell Barton [Thu, 8 Aug 2019 05:49:21 +0000 (15:49 +1000)]
Text: reorganize menus

- Add "Live Edit" to Text menu.
- "Top/Bottom of File" renamed to "Top/Bottom" and placed in Navigation sub-menu.
- Added navigation functions to Navigation menu,
  since they were not exposed in the menus.
- Added selection functions to Select menu,
  since they were not exposed in the menus.
- Moved the Select menu to the Header in consistency with the 3D View.
- Inserted comment in context menu.

D5434 with edits.

5 weeks agoFix T67587: Fix Drawing in Wireframe Non X-Ray Mode
Jeroen Bakker [Thu, 25 Jul 2019 06:51:59 +0000 (08:51 +0200)]
Fix T67587: Fix Drawing in Wireframe Non X-Ray Mode

When using Vertex or Weight paint mode on a wireframe the overlay was
blended with the background. In this case we now use alpha blending.

Reviewed By: fclem

Differential Revision:

5 weeks agoFix T67638: Stretched Camera Background Images
Jeroen Bakker [Wed, 7 Aug 2019 13:43:44 +0000 (15:43 +0200)]
Fix T67638: Stretched Camera Background Images

The matrices that projects background images in the 3d view
were incorrect. The root cause was that the coordinate systems were not
respected, that was most noticeable when rotating a stretched image.

We re-validated conversions of coordinate spaces (UV -> Image -> Camera -> Window)
and made sure that the rotation is done in image space.

Reviewed By: campbellbarton

Differential Revision:

5 weeks agoKeymap: only use Alt-Left/Right for legacy keymap
Campbell Barton [Thu, 8 Aug 2019 05:31:47 +0000 (15:31 +1000)]
Keymap: only use Alt-Left/Right for legacy keymap

Ctrl-Left/Right aren't in conflict for the default keymap.

5 weeks agoUI: Remove Grease Pencil Interpolation from stroke menu
Aaron Carlisle [Wed, 7 Aug 2019 23:56:52 +0000 (19:56 -0400)]
UI: Remove Grease Pencil Interpolation from stroke menu

This is a bit redundant because there is the interpolation popover.
Also these options were available while drawing which is not useful.

5 weeks agoAPI Docs: Correct Hotkey
Aaron Carlisle [Wed, 7 Aug 2019 21:20:40 +0000 (17:20 -0400)]
API Docs: Correct Hotkey

Here we can link to the manual and keep the hotkey updated in the manual
rather than the API docs.

Fixes T68371

5 weeks agoFix T68268: Crash switching to Weight Paint mode
Campbell Barton [Wed, 7 Aug 2019 17:51:24 +0000 (03:51 +1000)]
Fix T68268: Crash switching to Weight Paint mode

Also applied to sculpt mode

5 weeks agoFix unassigned return argument in recent select refactor
Campbell Barton [Wed, 7 Aug 2019 18:36:21 +0000 (04:36 +1000)]
Fix unassigned return argument in recent select refactor

5 weeks agoEdit Mesh Selection: Move ED_view3d_select_ functions to bf_draw
mano-wii [Wed, 7 Aug 2019 15:43:04 +0000 (12:43 -0300)]
Edit Mesh Selection: Move ED_view3d_select_ functions to bf_draw

It is easier to deal with private values of the DRW_select engine and gives room for improvement.

Reviewers: campbellbarton, fclem

Differential Revision:

5 weeks agoSelect utils refactor: remove lagacy `ED_view3d_select_id_read_rect`
mano-wii [Mon, 5 Aug 2019 21:02:43 +0000 (18:02 -0300)]
Select utils refactor: remove lagacy `ED_view3d_select_id_read_rect`

`ED_view3d_select_id_read_rect` serves only as a bridge to `DRW_framebuffer_select_id_read`.
Keeping these codes similar only increases the complexity of some functions.

Reviewers: campbellbarton

Differential Revision:

5 weeks agoUV: select overlap operator
Campbell Barton [Wed, 7 Aug 2019 15:25:54 +0000 (01:25 +1000)]
UV: select overlap operator

New operator to select overlapping UV's,
from all visible edit-mesh UV's.

D5421 @deadpin with edits.

5 weeks agoFix T67623 Eevee: Modulo node making unexpected/inconsistent behaviour
Clément Foucault [Wed, 7 Aug 2019 11:08:28 +0000 (13:08 +0200)]
Fix T67623 Eevee: Modulo node making unexpected/inconsistent behaviour

This was a precision error. Using a more robust approach

5 weeks agoFix error in recent trackball aspect cleanup
Campbell Barton [Wed, 7 Aug 2019 11:02:19 +0000 (21:02 +1000)]
Fix error in recent trackball aspect cleanup

Error in 7f8d620e20c23

5 weeks agoFix T68348: Hotkeys do nothing when over viewport gizmos
Campbell Barton [Wed, 7 Aug 2019 09:59:13 +0000 (19:59 +1000)]
Fix T68348: Hotkeys do nothing when over viewport gizmos

This was done intentionally so mouse press events tools didn't prevent gizmos
receiving click events before `USE_GIZMO_MOUSE_PRIORITY_HACK` was added.

5 weeks agoFix tool-tips remaining after operators start
Campbell Barton [Wed, 7 Aug 2019 10:31:55 +0000 (20:31 +1000)]
Fix tool-tips remaining after operators start

It was possible for e.g. to have a header tooltip displayed,
then start walk-navigation which didn't close the tool-tip.

5 weeks ago3D View: utility function to set the depth from a location
Campbell Barton [Wed, 7 Aug 2019 08:27:21 +0000 (18:27 +1000)]
3D View: utility function to set the depth from a location

Avoids having to do projection/offset calculations inline.

5 weeks agoFix T68340: Add reference image to hidden collection fails
Campbell Barton [Wed, 7 Aug 2019 06:40:27 +0000 (16:40 +1000)]
Fix T68340: Add reference image to hidden collection fails

5 weeks agoRemove compiler fix for unsupported MSVC version
Julian Eisel [Tue, 6 Aug 2019 23:46:35 +0000 (01:46 +0200)]
Remove compiler fix for unsupported MSVC version

5 weeks agoFix not reported: Face selection sometimes does not work in weight, paint and texture...
mano-wii [Tue, 6 Aug 2019 20:26:52 +0000 (17:26 -0300)]
Fix not reported: Face selection sometimes does not work in weight, paint and texture mode.

5 weeks agoCleanup: use BKE_ prefix for BKE_colortools.h
Campbell Barton [Tue, 6 Aug 2019 17:21:55 +0000 (03:21 +1000)]
Cleanup: use BKE_ prefix for BKE_colortools.h

5 weeks agoCleanup: clang-format
Campbell Barton [Tue, 6 Aug 2019 17:34:34 +0000 (03:34 +1000)]
Cleanup: clang-format

5 weeks agoFix Dopesheet transform regressions due to rB81dc76c19cff
mano-wii [Tue, 6 Aug 2019 17:02:19 +0000 (14:02 -0300)]
Fix Dopesheet transform regressions due to rB81dc76c19cff

Functions that begin with the name `apply` closely resemble the main callback to apply.
Ref T68137

5 weeks agoAnnotations: Remove Simplify option from Userprefs
Antonio Vazquez [Tue, 6 Aug 2019 16:53:24 +0000 (18:53 +0200)]
Annotations: Remove Simplify option from Userprefs

This option was an old option for Grease Pencil tools and it's not logic for Annotations.

Differential Revision:

5 weeks agoFix T68320: measure tool memoryleak
mano-wii [Tue, 6 Aug 2019 15:50:08 +0000 (12:50 -0300)]
Fix T68320: measure tool memoryleak

It was a stupid mistake with the wrong pointer being referenced.
It was a serious problem because the memory leak was considerable.

5 weeks agoDrawManager: Fixed Assertion In Workbench
Jeroen Bakker [Tue, 6 Aug 2019 14:49:02 +0000 (16:49 +0200)]
DrawManager: Fixed Assertion In Workbench

5 weeks agoFix T68227: Pinning the particles system data-block causes error
Sybren A. Stüvel [Tue, 6 Aug 2019 13:31:39 +0000 (15:31 +0200)]
Fix T68227: Pinning the particles system data-block causes error

The 'Seed' setting is not part of the pinned data-block. When pinning,
the local variable `psys` is `None`, and this wasn't properly checked for
when drawing the 'Seed' setting.

5 weeks agoKeymap: add sequencer left/right select
Campbell Barton [Tue, 6 Aug 2019 12:39:16 +0000 (22:39 +1000)]
Keymap: add sequencer left/right select

Matches graph editor keys.

D5192 by @tintwotin

5 weeks agoFix crash when opening files with missing armature libaries
Sebastian Parborg [Tue, 6 Aug 2019 12:32:29 +0000 (14:32 +0200)]
Fix crash when opening files with missing armature libaries

In the case where the library is missing, the armature object is
replaced with an empty. This would crash the armature modifier.

Now we check if the armature object really is an armature or not.

5 weeks agoCleanup: move utf8 offset conversion into BLI_string_utf8
Campbell Barton [Tue, 6 Aug 2019 07:16:27 +0000 (17:16 +1000)]
Cleanup: move utf8 offset conversion into BLI_string_utf8

There isn't anything specific to text data with these functions.

5 weeks agoCleanup: spelling (neighbor)
Campbell Barton [Tue, 6 Aug 2019 07:09:07 +0000 (17:09 +1000)]
Cleanup: spelling (neighbor)

5 weeks agoFix T68291: crash snapping to both verts and edges with linked meshes
Philipp Oeser [Tue, 6 Aug 2019 08:10:21 +0000 (10:10 +0200)]
Fix T68291: crash snapping to both verts and edges with linked meshes

this was also happening in snapping with the measure tool

same method as in snap_mesh_polygon() (from rB59286ddcf80c) now used in
snap_mesh_edge_verts_mixed() as well...

Reviewers: mano-wii

Maniphest Tasks: T68291

Differential Revision:

5 weeks agoFix T66731: Part 3: Labels translations when tools are in 'compact' mode.
Bastien Montagne [Tue, 6 Aug 2019 10:18:42 +0000 (12:18 +0200)]
Fix T66731: Part 3: Labels translations when tools are in 'compact' mode.

Very annoying that this whole UI thingy uses its own cooking... This is
more a quick-slap fix than a proper solution, would expect it to work in
nearly all cases though...

5 weeks agoAnnotation: Simplify only 3D annotations and reduce factor
Antonio Vazquez [Tue, 6 Aug 2019 07:06:16 +0000 (09:06 +0200)]
Annotation: Simplify only 3D annotations and reduce factor

The old factor was too much and the lines could be changed. Anyway, when use simplify the number of points is reduced and the general shape is the same but not as smooth as original stroke.

Also, the simplify is only used in 3D view.

Note: Not sure if we would have to remove this simplify option for annotations.

5 weeks agoSequencer: frame offset feature usability
Campbell Barton [Tue, 6 Aug 2019 06:56:14 +0000 (16:56 +1000)]
Sequencer: frame offset feature usability

- Expose the operator in the panel,
  (wasn't available in the UI at all).
- Offset frame was hard coded to a color matching the background.
  Use the current frame color with dashes instead.
- Overlay toggle had wrong name.