blender.git
9 months 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.

9 months 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

9 months 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: https://developer.blender.org/D5420

9 months 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.

9 months 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

9 months 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

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

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

9 months 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).

9 months 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...

9 months 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.

9 months 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

9 months 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: https://developer.blender.org/D5436

9 months 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: https://developer.blender.org/D5438

9 months 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.

9 months 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

9 months 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.

9 months 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
thoroughly...

9 months 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

9 months 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: https://developer.blender.org/D5418

9 months 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

9 months 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

9 months 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.

9 months 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: https://developer.blender.org/D5340

9 months 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: https://developer.blender.org/D5431

9 months 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.

9 months 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.

9 months 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

9 months 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

9 months 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

9 months 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: https://developer.blender.org/D5415

9 months 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: https://developer.blender.org/D5415

9 months 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.

9 months 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

9 months 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

9 months 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.

9 months 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.

9 months 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.

9 months 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

9 months 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

9 months 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.

9 months 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

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

9 months 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

9 months 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: http://developer.blender.org/D5426

9 months 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.

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

9 months 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.

9 months 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

9 months 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.

9 months 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.

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

9 months 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: https://developer.blender.org/D5422

9 months 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...

9 months 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.

9 months 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.

9 months agoCleanup: redundant const usage
Campbell Barton [Tue, 6 Aug 2019 07:04:46 +0000 (17:04 +1000)]
Cleanup: redundant const usage

9 months agoFix T66100: WorkBench Banding Issues
Jeroen Bakker [Thu, 4 Jul 2019 06:27:17 +0000 (08:27 +0200)]
Fix T66100: WorkBench Banding Issues

Color banding issues can appear, as result of the 8 bitdepth RGBA that
is used in the viewport.

This change will use `GPU_RGBA16F` for final renderings and for drawing textures. This
allows displaying HDRI textures. Vertex Colors uses `GPU_RGBA16` to resolve
color banding issues. All other modes use `GPU_RGBA8` to reduce
bandwidth and gpu memory.

Reviewed By: fclem, brecht

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

9 months agoFix T66671: Memory Leak Material Preview
Jeroen Bakker [Thu, 11 Jul 2019 07:40:44 +0000 (09:40 +0200)]
Fix T66671: Memory Leak Material Preview

During generating of a material preview with world lighting only the
copy world was being freed. The material was removed from the main, but
was not freed.

Reviewed By: brecht

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

9 months agoDrawManager: Fix Camera Images Interfere During Selection
Jeroen Bakker [Wed, 17 Jul 2019 10:07:09 +0000 (12:07 +0200)]
DrawManager: Fix Camera Images Interfere During Selection

When drawing the selection buffer the camera images were drawn. This
resulted in unneeded extra clicking for the user. This change will
ignore camera images during the selection.

Reviewed By: fclem

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

9 months agoRefactor Paint Overlay Opacity Panel
Jeroen Bakker [Wed, 17 Jul 2019 11:50:24 +0000 (13:50 +0200)]
Refactor Paint Overlay Opacity Panel

It is now possible to translate this panel. Due to the previous
structure the translation tools were not able to pick the strings up as
translatable strings.

Reviewed By: brecht

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

9 months agoFix T67437: Vertex Colors Not Visible In SculptMode
Jeroen Bakker [Tue, 23 Jul 2019 06:29:53 +0000 (08:29 +0200)]
Fix T67437: Vertex Colors Not Visible In SculptMode

Recently Shader parameter names for UVMaps and vertex colors were renamed.
The sculpt drawing code still used the old parameter names.

Reviewed By: fclem

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

9 months agoUI: rename Border to Box Select
Campbell Barton [Tue, 6 Aug 2019 06:10:48 +0000 (16:10 +1000)]
UI: rename Border to Box Select

Missed in previous renaming commits.

9 months agoFix T68283: Missing operator in graph context menu
Campbell Barton [Tue, 6 Aug 2019 04:45:02 +0000 (14:45 +1000)]
Fix T68283: Missing operator in graph context menu

9 months agoFix T6813: Dopesheet Editor: Moving keyframes by a number value doesn't work
mano-wii [Tue, 6 Aug 2019 00:47:22 +0000 (21:47 -0300)]
Fix T6813: Dopesheet Editor: Moving keyframes by a number value doesn't work

It was a mistake to add the line `t->values_final[0] = t->values[0];`

9 months agoFix T68272: Annotations segment fault when use Simplify option
Antonio Vazquez [Mon, 5 Aug 2019 18:52:00 +0000 (20:52 +0200)]
Fix T68272: Annotations segment fault when use Simplify option

This error was introduced with the array dynamic system for very long stroke.

Now, instead to use a custom code for simplify annotations, it uses the standard simplify BKE function more robust and with better results.

The factor of 0.15f has been set fixed after testing a good result value.

9 months agoCleanup: use unsigned char for theme colors
Campbell Barton [Mon, 5 Aug 2019 18:20:17 +0000 (04:20 +1000)]
Cleanup: use unsigned char for theme colors

Nearly all byte-color functions use 'uchar'
causing casts when then colors were passed in.

Declare as uchar to remove the need for casts.

9 months agoCleanup: quiet cast warnings in recent commit
Campbell Barton [Mon, 5 Aug 2019 18:34:54 +0000 (04:34 +1000)]
Cleanup: quiet cast warnings in recent commit

9 months agoNew BLI Function: projmat_from_window_region
mano-wii [Mon, 5 Aug 2019 17:04:43 +0000 (14:04 -0300)]
New BLI Function: projmat_from_window_region

Creates a projection matrix for a small region of the viewport.

Reviewers: campbellbarton, brecht

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

9 months agoFix T67665 "Affect Alpha" in Texture Paint mode doesn't work as expected
Sebastian Parborg [Mon, 5 Aug 2019 16:49:24 +0000 (18:49 +0200)]
Fix T67665 "Affect Alpha" in Texture Paint mode doesn't work as expected

The "alpha lock" check was missing for the smear and soften brush.
Added checks to make sure that the alpha values are kept the same.

Reviewed By: Brecht

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

9 months agoFix (unreported) transfer mesh data operator not enabling autosmooth.
Bastien Montagne [Mon, 5 Aug 2019 16:43:03 +0000 (18:43 +0200)]
Fix (unreported) transfer mesh data operator not enabling autosmooth.

When we transfer custom normals and allow for data creation, we should
also enable autosmooth on destination meshes.

9 months agoCleanup/windows: Remove 32 bit support from make.bat helper script
Lazydodo [Mon, 5 Aug 2019 16:31:51 +0000 (10:31 -0600)]
Cleanup/windows: Remove 32 bit support from make.bat helper script

This change removes 32 bit support from the helper make.bat scripts
as we are dropping official 32 bit support, you can still build for
32 bit by configuring your build yourself using cmake and pointing
the LIBDIR cmake variable to your own 32 bit library folder.

9 months agoFix T68211: Transfer Mesh Data with Custom Normal crash when Auto Smooth is enabled.
Bastien Montagne [Mon, 5 Aug 2019 16:04:40 +0000 (18:04 +0200)]
Fix T68211: Transfer Mesh Data with Custom Normal crash when Auto Smooth is enabled.

Code in modifier stack ensuring requested CDLayers are provided was not
working very well for polynors in several cases:
* We cannot share the orig mesh if we have to generate pnors/lnors;
* Generating pnors without lnors was not possible.

9 months agoFix T67259 : Auto depth not working with multires in sculpt mode
mano-wii [Mon, 5 Aug 2019 14:04:05 +0000 (11:04 -0300)]
Fix T67259 : Auto depth not working with multires in sculpt mode

Basically the solution is to call `DRW_shgroup_call_sculpt` when `BKE_sculptsession_use_pbvh_draw(...)` is true.

Ref T67259

Reviewers: fclem, jbakker, brecht

Reviewed By: fclem, brecht

Maniphest Tasks: T67259

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

9 months agoFix T68145: Bone Rotate Individual Axes fail.
Bastien Montagne [Mon, 5 Aug 2019 13:42:48 +0000 (15:42 +0200)]
Fix T68145: Bone Rotate Individual Axes fail.

Rotation matrix would not get updated every time it would need to, after
own changes to handle 'big' rotations from keyboard input (rBcee484a4c51a3d2).

9 months agoCycles: Fix wrong number of threads on multi-socket machines
Sergey Sharybin [Mon, 5 Aug 2019 13:30:12 +0000 (15:30 +0200)]
Cycles: Fix wrong number of threads on multi-socket machines

The issue was caused by a limitation of GetNumaNodeProcessorMask():
on systems with more than 64 processors, this parameter is set to the
processor mask for the node only if the node is in the same processor
group as the calling thread. Otherwise, the parameter is set to zero.

Patch from Max Dmitrichenko, thanks!

9 months agoBuild: add ninja target to make wrapper
Brecht Van Lommel [Mon, 5 Aug 2019 12:40:26 +0000 (14:40 +0200)]
Build: add ninja target to make wrapper

To use the ninja build tool which is typically faster than make, especially
for quick rebuilds.

9 months agoBuild: add config for developers
Brecht Van Lommel [Fri, 28 Jun 2019 11:36:19 +0000 (13:36 +0200)]
Build: add config for developers

This has faster builds, error checks and tests. The number of cmake options
for this type of thing has grown over the years and it's convenient to be
able to point new developers to a single target.

Previously the combination of all these options did not work correctly, now
all tests should pass.

The easiest way to use this is with the make wrapper, for example:
make full developer debug

Or set it manually with CMake:
cmake -C ../blender/build_files/cmake/config/blender_developer.cmake .

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

9 months agoBuild: disable address sanitizer for Cycles optimized kernels with GCC
Brecht Van Lommel [Thu, 11 Jul 2019 17:29:29 +0000 (19:29 +0200)]
Build: disable address sanitizer for Cycles optimized kernels with GCC

It's extremely slow to compile and run, so just disable it unless
WITH_CYCLES_KERNEL_ASAN is manually enabled. For Clang it's always
enabled since that appears to work ok.

This also limits the -fno-sanitize=vptr flag to the Cycles kernel, as it
was added specifically to work around an issue there.

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

9 months agoPyRNA: support separators in enum-items lists
Campbell Barton [Mon, 5 Aug 2019 13:10:44 +0000 (23:10 +1000)]
PyRNA: support separators in enum-items lists

Resolves T68260

9 months agoGTest: test cases for polyfill2d bug T67109
Campbell Barton [Mon, 5 Aug 2019 12:37:21 +0000 (22:37 +1000)]
GTest: test cases for polyfill2d bug T67109

9 months agoFix T67109: n-gon tessellation error with co-linear edges
Campbell Barton [Mon, 5 Aug 2019 12:31:42 +0000 (22:31 +1000)]
Fix T67109: n-gon tessellation error with co-linear edges

Improve the area calculation method for better precision,
so faces offset from the center don't have a less precise area.

9 months agoED_view3D: Remove and replace `ED_view3d_select_id_read`
mano-wii [Sat, 3 Aug 2019 21:41:16 +0000 (18:41 -0300)]
ED_view3D: Remove and replace `ED_view3d_select_id_read`

It is very similar to `ED_view3d_select_id_read_rect`.

9 months agoFix (unreported0 bad usage of `do_versions_find_region()` in versionning code.
Bastien Montagne [Mon, 5 Aug 2019 12:24:44 +0000 (14:24 +0200)]
Fix (unreported0 bad usage of `do_versions_find_region()` in versionning code.

When NULL pointer can be a valid return value, one has to use
`do_versions_find_region_or_null()` instead...

Fixes asserts as reported in rBa2fe386153e.

9 months agoCycles: Fix compilation on 32bit Linux with GCC-9
Sergey Sharybin [Mon, 5 Aug 2019 09:47:47 +0000 (11:47 +0200)]
Cycles: Fix compilation on 32bit Linux with GCC-9

We don't use explicit SIMD flags on 32bit, so trying to use
intrinsics was causing issues.

9 months agoText: only un-comment blocks which are completely commented
Campbell Barton [Mon, 5 Aug 2019 04:10:36 +0000 (14:10 +1000)]
Text: only un-comment blocks which are completely commented

It's common to select a block of code and comment it
which may already contains some comments.

Now only un-comment blocks which are completely commented
(ignoring white-space).

Makes toggle comments behave more usefully, resolves T68060.

9 months agoText: merge toggle comments into a single operator
Campbell Barton [Mon, 5 Aug 2019 03:54:27 +0000 (13:54 +1000)]
Text: merge toggle comments into a single operator

This allows users to map comment/un-comment to be mapped to keys.

9 months agoUI: rename rotate to orbit for viewport sensitivity
Campbell Barton [Mon, 5 Aug 2019 03:07:55 +0000 (13:07 +1000)]
UI: rename rotate to orbit for viewport sensitivity

Matches names of related preferences.

9 months agoCleanup: remove underscore prefix for used vars
Campbell Barton [Mon, 5 Aug 2019 02:47:55 +0000 (12:47 +1000)]
Cleanup: remove underscore prefix for used vars

Also remove unused vars.

9 months agoCleanup: add braces
Campbell Barton [Mon, 5 Aug 2019 02:33:00 +0000 (12:33 +1000)]
Cleanup: add braces

9 months agoCleanup: Fix eeve_lut arrays being duplicated in blender binary.
Lazydodo [Sun, 4 Aug 2019 20:32:53 +0000 (14:32 -0600)]
Cleanup: Fix eeve_lut arrays being duplicated in blender binary.

Both eevee_materials.c and workbench_deferred.c include eeve_lut.h which has its arrays marked as static leading to the blue_noise array being embedded into our binary twice.

This change takes the arrays out of the header and properly marks them as const since they are lookup tables and should not be written to.

Reviewers: fclem, brecht

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

9 months agoCleanup: Mark large arrays of of constant data as const.
Lazydodo [Sun, 4 Aug 2019 20:24:29 +0000 (14:24 -0600)]
Cleanup: Mark large arrays of of constant data as const.

For background information see D5345

Reviewers: brecht, sergey

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

9 months agoFix: msgfmt add support for cr-lf style line endings
Lazydodo [Sun, 4 Aug 2019 17:46:00 +0000 (11:46 -0600)]
Fix: msgfmt add support for cr-lf style line endings

linux did not recognize cr as a valid character.

Reviewers: brecht

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

9 months agoSculpting: Remove Show Diffuse Color Option
Your Name [Sun, 4 Aug 2019 15:53:48 +0000 (11:53 -0400)]
Sculpting: Remove Show Diffuse Color Option

This should have been removed in 2.80 as the functionality was removed.
This feature now does not do anything and can be removed.

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

9 months agoAdd a new Copy As Driver context menu option for properties.
Alexander Gavrilov [Wed, 31 Jul 2019 15:42:03 +0000 (18:42 +0300)]
Add a new Copy As Driver context menu option for properties.

It is a very common need to create drivers that set the value of
a property to the value of some other property, but it currently
requires multiple actions: Copy Data Path on the input property,
adding a driver to the output property, selecting the input ID
reference, and pasting the path.

This adds a new Copy As Driver context menu option, which creates
a complete driver in the clipboard that reads the current property,
so all that remains is to paste it to the output property. It is
also possible to paste just the new driver variable into an existing
driver to combine multiple inputs.

Reviewers: brecht, billreynish

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

9 months agoText Editor UI
William Reynish [Sun, 4 Aug 2019 10:51:28 +0000 (12:51 +0200)]
Text Editor UI

Tweak Text Editor to fit better with the rest of Blender 2.8:

  - Move sidebar to the right
  - Add proper context menu
  - Move view toggles to the View menu
  - Change the indentation option to be an enum between spaces and tabs
  - Several layout tweaks

Patch by @tintwotin / Peter Fog with additional tweaks by me.

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

Reviewers: Brecht, Campbell

9 months agoTweak Brush Gradient UI
William Reynish [Sun, 4 Aug 2019 10:37:22 +0000 (12:37 +0200)]
Tweak Brush Gradient UI

Gradient and Color are mutually exclusive, so we now communicate this in the UI much more clearly

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

Reviewers: brechrt

9 months agoFix T68202: GPencil Set Origin do not refresh until object is moved
Antonio Vazquez [Sun, 4 Aug 2019 08:21:02 +0000 (10:21 +0200)]
Fix T68202: GPencil Set Origin do not refresh until object is moved

9 months agoCleanup: improve comments
Campbell Barton [Sun, 4 Aug 2019 02:52:01 +0000 (12:52 +1000)]
Cleanup: improve comments

9 months agoCleanup: spelling
Campbell Barton [Sun, 4 Aug 2019 02:51:44 +0000 (12:51 +1000)]
Cleanup: spelling