5 months agoCleanup: use BLI_kdtree_3d prefix
Campbell Barton [Tue, 19 Mar 2019 13:46:33 +0000 (00:46 +1100)]
Cleanup: use BLI_kdtree_3d prefix

Use prefix now there isn't only the 3d version.

5 months agoFix T62732: Bpy/Python is letting create inputs at the node level for node groups...
Bastien Montagne [Tue, 19 Mar 2019 13:43:14 +0000 (14:43 +0100)]
Fix T62732: Bpy/Python is letting create inputs at the node level for node groups that make blend file unsaveable.

Group nodes should not allow to add IO sockets to themselves directly,
in that case we actually want to add IO sockets to their underlying
node tree. Fairly straioght forward to support actually.

5 months agoFix T62595: Select co-planar faces fails
Campbell Barton [Tue, 19 Mar 2019 13:34:40 +0000 (00:34 +1100)]
Fix T62595: Select co-planar faces fails

5 months agoBLI_kdtree: refactor to support different numbers of dimensions
Campbell Barton [Mon, 18 Mar 2019 00:22:48 +0000 (11:22 +1100)]
BLI_kdtree: refactor to support different numbers of dimensions

This moves logic into kdtree_impl.h which is included in a source
file that defines the number of dimensions - so we can easily support
different numbers of dimensions as needed
(currently 3D and 4D are supported).

Macro use isn't so nice but avoids a lot of duplicate code.

5 months agoFix T61475 Particle edit does not render children if path step > 7
Clément Foucault [Tue, 19 Mar 2019 13:25:32 +0000 (14:25 +0100)]
Fix T61475 Particle edit does not render children if path step > 7

Gives 2 more bits to the segment count. Also subtract 1 because segment
count cannot be negative.

5 months agoGPencil: Include gpencil objects in BKE_object_minmax
Campbell Barton [Tue, 19 Mar 2019 13:05:58 +0000 (00:05 +1100)]
GPencil: Include gpencil objects in BKE_object_minmax

Also remove redundant check for meshes.

5 months agoCleanup: remove unused for gpencil bounds calculation
Campbell Barton [Tue, 19 Mar 2019 12:55:04 +0000 (23:55 +1100)]
Cleanup: remove unused for gpencil bounds calculation

5 months agoFix T62743: GPencil dimensions are large when no geometry exists
Campbell Barton [Tue, 19 Mar 2019 12:49:56 +0000 (23:49 +1100)]
Fix T62743: GPencil dimensions are large when no geometry exists

Use fallback when no data exists
matching bound-box for other kinds of geometry.

5 months agoEEVEE/LookDev: Fix Cache In Quad View
Jeroen Bakker [Tue, 19 Mar 2019 12:29:22 +0000 (13:29 +0100)]
EEVEE/LookDev: Fix Cache In Quad View

When using LookDev in Quad view the cache was only updated for the first
Q-view. The evaluation data of the last cache was not stored with the
lightprobe textures. As the evaluation data was reused between the
Q-views only the lightprobe textures of the first view was updated.

With this patch the evaluated data is stored amongside the actual
lightprobe textures.

Fix T59046

Reviewed By: fclem

Maniphest Tasks: T59046

5 months agoFix view selected ignoring all non-grease pencil objects
Campbell Barton [Tue, 19 Mar 2019 12:11:36 +0000 (23:11 +1100)]
Fix view selected ignoring all non-grease pencil objects

When the grease pencil was active no other objects were taken into
account. There is no need for a special case here since objects
bounding boxes are used.

5 months agoUI: Make UV Editor contextual menu more consistent with 3D View
William Reynish [Tue, 19 Mar 2019 12:14:35 +0000 (13:14 +0100)]
UI: Make UV Editor contextual menu more consistent with 3D View

-Use same ordering of Add, Modify, Remove
-Add back Remove Doubles here

5 months agoUI: Make EV Editor UV menu more consistent with 3D VIew
William Reynish [Tue, 19 Mar 2019 12:13:32 +0000 (13:13 +0100)]
UI: Make EV Editor UV menu more consistent with 3D VIew

-Transform, Mirror, Snap at the top
-Remove redundant Proportional Editing entry from this menu - we already have it in the header

5 months agoFix T62713: Paste Normal Vectors - needed better selection handling.
Bastien Montagne [Tue, 19 Mar 2019 11:23:32 +0000 (12:23 +0100)]
Fix T62713: Paste Normal Vectors - needed better selection handling.

Existing code was not really handling well cases were only edges or
faces were selected (with match select modes).

In those cases, we can assume user want to only affect loop normals of
selected faces/edges, not all lnors of all (indirectly) selected verts.

Also refactored the code a bit to move whole 'loop to edit' selection
process into its own single function.

5 months agoMinor cleanup/refactor of EditMesh custom normals copy code.
Bastien Montagne [Tue, 19 Mar 2019 10:10:30 +0000 (11:10 +0100)]
Minor cleanup/refactor of EditMesh custom normals copy code.

Do not compute temp helper data when we do not need it (even though in
that case it was totally cheap to compute).

5 months agoreadfile: add off64_t typedef for __APPLE__
Campbell Barton [Tue, 19 Mar 2019 10:59:26 +0000 (21:59 +1100)]
readfile: add off64_t typedef for __APPLE__

5 months agoGPencil: Rename annotation functions
Antonioya [Tue, 19 Mar 2019 10:01:27 +0000 (11:01 +0100)]
GPencil: Rename annotation functions

The annotation drawing functions were using gpencil prefix and it's better to keep all annotation code separated to avoid confusion.

5 months agoGPencil: Cleanup unused code
Antonioya [Tue, 19 Mar 2019 09:54:27 +0000 (10:54 +0100)]
GPencil: Cleanup unused code

5 months agoGPencil: Rename functions to annotation prefix
Antonioya [Tue, 19 Mar 2019 09:52:37 +0000 (10:52 +0100)]
GPencil: Rename functions to annotation prefix

This code was used only in annotations.

5 months agoFix T62734: Crash when annotations are rendered from the VSE .view menu.
Antonioya [Tue, 19 Mar 2019 09:48:24 +0000 (10:48 +0100)]
Fix T62734: Crash when annotations are rendered from the VSE .view menu.

The render was using the old grease pencil code and not the new annotation code for render.

5 months agoWindows: use int64_t instead of off_t
Campbell Barton [Tue, 19 Mar 2019 09:28:05 +0000 (20:28 +1100)]
Windows: use int64_t instead of off_t

Avoids 2gb file size limit.

5 months agoFix T62707: opening blend files over 2gb on win32 fails
Campbell Barton [Tue, 19 Mar 2019 09:04:23 +0000 (20:04 +1100)]
Fix T62707: opening blend files over 2gb on win32 fails

Regression in 358e07f447e9ed7 for ms-windows since off_t is an int32_t
even on 64bit systems causing files over 2gb not to load.

Poison off_t so this doesn't happen again.

5 months agoBLI_math: use fallback for compatible quaternion calculation
Campbell Barton [Tue, 19 Mar 2019 06:39:14 +0000 (17:39 +1100)]
BLI_math: use fallback for compatible quaternion calculation

Copy the new value when the compatible quaternion isn't usable.

5 months agoFix pose slide interpolation
Campbell Barton [Tue, 19 Mar 2019 06:17:34 +0000 (17:17 +1100)]
Fix pose slide interpolation

- Quaternions weren't normalized before interpolating
  causing incorrect results & assert.

- Make the newly calculated quaternion compatible with the previous
  to avoid axis-flipping & setting values with large changes compared
  to existing key-frames.

5 months agoBLI_math: add utility to calculate compatible quaternions
Campbell Barton [Tue, 19 Mar 2019 05:50:18 +0000 (16:50 +1100)]
BLI_math: add utility to calculate compatible quaternions

5 months agoCleanup: comment blocks
Campbell Barton [Tue, 19 Mar 2019 04:17:46 +0000 (15:17 +1100)]
Cleanup: comment blocks

5 months agoCleanup: trailing space
Campbell Barton [Tue, 19 Mar 2019 04:03:21 +0000 (15:03 +1100)]
Cleanup: trailing space

5 months agoDocs: group debug/disable args in --help output
Campbell Barton [Tue, 19 Mar 2019 03:32:15 +0000 (14:32 +1100)]
Docs: group debug/disable args in --help output

5 months agoFix T61872: Sculpt key shortcut assignment fails
Campbell Barton [Tue, 19 Mar 2019 02:50:32 +0000 (13:50 +1100)]
Fix T61872: Sculpt key shortcut assignment fails

5 months agoFix assigning keys to paint operators
Campbell Barton [Tue, 19 Mar 2019 02:48:33 +0000 (13:48 +1100)]
Fix assigning keys to paint operators

Comparing context mode with object flag (decade old bug from 2.5x).

5 months agoCleanup: use enum for CTX_data_mode_enum
Campbell Barton [Tue, 19 Mar 2019 02:42:54 +0000 (13:42 +1100)]
Cleanup: use enum for CTX_data_mode_enum

Exposes errors in some cases when compared against incompatible values.

5 months agoFix T61368: Brush texture preview ignores rotation
Campbell Barton [Tue, 19 Mar 2019 02:07:48 +0000 (13:07 +1100)]
Fix T61368: Brush texture preview ignores rotation

5 months agoCleanup: unused warning
Campbell Barton [Mon, 18 Mar 2019 21:39:48 +0000 (08:39 +1100)]
Cleanup: unused warning

5 months agoFix T61104 Compositing two scenes with different output scales crashes
Clément Foucault [Mon, 18 Mar 2019 20:39:54 +0000 (21:39 +0100)]
Fix T61104 Compositing two scenes with different output scales crashes

Was due to incorrect output size. Use engine->resolution_x/y instead of
computing the size on the fly from the scene specific settings (which are
not overwritten by the rendering scene).

5 months agoUI: Use 'Display' instead of 'Draw' for show_particles
William Reynish [Mon, 18 Mar 2019 20:33:01 +0000 (21:33 +0100)]
UI: Use 'Display' instead of 'Draw' for show_particles

5 months agoUnits: Use PROP_DISTANCE for emitter_distance
William Reynish [Mon, 18 Mar 2019 20:32:02 +0000 (21:32 +0100)]
Units: Use PROP_DISTANCE for emitter_distance

5 months agoUI: Particle Edit Mode Tool Properties
William Reynish [Mon, 18 Mar 2019 20:30:56 +0000 (21:30 +0100)]
UI: Particle Edit Mode Tool Properties

-Use property split
-Use sub-panels for Options panel
-Slightly re-organize Options panel
-Remove redundant Deflect Emitter from Options panel (it was already in the tool settings for the Comb tool)

5 months agoScale waveforms & show clipping
Richard Antalik [Mon, 18 Mar 2019 19:10:33 +0000 (12:10 -0700)]
Scale waveforms & show clipping

Scale waveforms in sound strips by volume.
If any drawn line exceeds value 1 or -1 it is drawn by red color so user can see point, where clipping occurs.

Reviewers: brecht

Differential Revision:

5 months agoFix strip text hiding behind scrollers
Richard Antalik [Mon, 18 Mar 2019 19:09:22 +0000 (12:09 -0700)]
Fix strip text hiding behind scrollers

Reviewers: brecht

Differential Revision:

5 months agoFix VSE color picker
Richard Antalik [Mon, 18 Mar 2019 19:04:11 +0000 (12:04 -0700)]
Fix VSE color picker

Fix VSE color picker mouse coords calculation

Reviewers: brecht

Differential Revision:

5 months agoFix T54117 Movie clip undistorted - proxy not working
Richard Antalik [Mon, 18 Mar 2019 19:01:40 +0000 (12:01 -0700)]
Fix T54117 Movie clip undistorted - proxy not working
Add movieclip fallback render option, for case, when proxies are not enabled or built

Reviewers: sergey

Differential Revision:

5 months agoFix T57590: assert with zero length array buttons.
Brecht Van Lommel [Mon, 18 Mar 2019 18:56:14 +0000 (19:56 +0100)]
Fix T57590: assert with zero length array buttons.

5 months agoFix T56183: flip matcap not working for workbench as render engine.
Brecht Van Lommel [Mon, 18 Mar 2019 18:26:01 +0000 (19:26 +0100)]
Fix T56183: flip matcap not working for workbench as render engine.

5 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 18 Mar 2019 18:06:21 +0000 (19:06 +0100)]
Merge branch 'blender2.7'

5 months agoFix Cycles curve UVs wrong after recent changes.
Brecht Van Lommel [Mon, 18 Mar 2019 17:51:24 +0000 (18:51 +0100)]
Fix Cycles curve UVs wrong after recent changes.

5 months agoFix T62712: Cycles world light path node not working.
Brecht Van Lommel [Mon, 18 Mar 2019 17:45:17 +0000 (18:45 +0100)]
Fix T62712: Cycles world light path node not working.

5 months agoFix T62587: Particle instances Use Count not saved correctly
Jacques Lucke [Mon, 18 Mar 2019 16:53:03 +0000 (17:53 +0100)]
Fix T62587: Particle instances Use Count not saved correctly

Reviewers: brecht

Differential Revision:

5 months agoFix T62700: Disconnect hair bug
Sergey Sharybin [Mon, 18 Mar 2019 16:49:53 +0000 (17:49 +0100)]
Fix T62700: Disconnect hair bug

Need to use evaluated mesh from evaluated modifier data.

5 months agoFix T62636: Overlapping scrollbar in driver editor
Jacques Lucke [Mon, 18 Mar 2019 16:28:36 +0000 (17:28 +0100)]
Fix T62636: Overlapping scrollbar in driver editor

Instead of only `ymin` and `ymax`, `ANIM_channel_draw_widgets`
has a rectangle as input now.
This allows the caller to set a custom width for the channel.

Some space types need the extra space for the scrollbar
(drivers, graph), but the other don't have a scrollbar.

Reviewers: brecht

Differential Revision:

5 months agoSubdiv: Enable topology cache in edit mode
Sergey Sharybin [Mon, 18 Mar 2019 14:56:16 +0000 (15:56 +0100)]
Subdiv: Enable topology cache in edit mode

The general idea of this change is to have a runtime data pointer
in the ModifierData, so it can be preserved through copy-on-write
updates by the dependency graph.

This is where subdivision surface modifier can store its topology
cache, so it is not getting trashed on every copy-on-write which
is happening when moving a vertex.

Similar mechanism should be used by multiresolution, dynamic paint
and some other modifiers which cache evaluated data.

This fixes T61746.

Thing to keep in mind, that there are more reports about slow
subdivision surface in the tracker, but that boils down to the
fact that those have a lot of extraordinary vertices, and hence
a lot slower to evaluated topology.
Other thing is, this speeds up oeprations which doesn't change
topology (i.e. moving vertices).

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T61746

Differential Revision:

5 months agoFix T62706: Orphan Data : I have now to save a file, close and reopen it, only then...
Bastien Montagne [Mon, 18 Mar 2019 15:48:31 +0000 (16:48 +0100)]
Fix T62706: Orphan Data : I have now to save a file, close and reopen it, only then I can purge previous deleted meshes.

libquery code has some specific handling for IDs tagged as 'no_main',
among which to never consider them as refcounted/refcounting other IDs.

This is fine, but it also means we have to be careful when moving an ID
from main to out-of-main status, to do all id remapping we need
//before// we tag it as no_main.

That was a bit tedious to track down, we'll have to be careful that all
the corner cases we have to take care of, do not end up in a giant soup
of expections to exceptions, where nobody can find its way anymore...

5 months agoFix AMD OpenCL build error after recent changes.
Brecht Van Lommel [Mon, 18 Mar 2019 15:36:55 +0000 (16:36 +0100)]
Fix AMD OpenCL build error after recent changes.

Always use native function since this was already the case due to
__CL_USE_NATIVE__ not being defined in time, and seems to have caused no
known issues.

5 months agoFix: Cycles Subdivisions panel was showing, even when using Eevee
William Reynish [Mon, 18 Mar 2019 14:56:54 +0000 (15:56 +0100)]
Fix: Cycles Subdivisions panel was showing, even when using Eevee

5 months agoDepsgraph: Store original modifier pointer
Sergey Sharybin [Mon, 18 Mar 2019 13:21:35 +0000 (14:21 +0100)]
Depsgraph: Store original modifier pointer

Currently not needed that much, but will ease some further
development which is related on preserving runtime modifier

5 months agoCleanup: Comments
Sergey Sharybin [Mon, 18 Mar 2019 11:51:01 +0000 (12:51 +0100)]
Cleanup: Comments

5 months agoFix T62633: Model normals not updating in a modifier stack after a deform modifier.
Bastien Montagne [Mon, 18 Mar 2019 14:37:46 +0000 (15:37 +0100)]
Fix T62633: Model normals not updating in a modifier stack after a deform modifier.

A deform-only modifier that needs access to normals need a copy of
evaluated mesh with those normals updated, when it is not the first one
in the stack.

That issue had been partially fixed in Object mode a long time ago
(see T23673), but it was still broken for deform-only stacks cases.

And it was also completely missing from the Edit mode code
(`editbmesh_calc_modifiers()` function).

5 months agoSilence sorted function declaration/const warnings
Dalai Felinto [Mon, 18 Mar 2019 14:40:29 +0000 (14:40 +0000)]
Silence sorted function declaration/const warnings

5 months agoCleanup: fix compiler warnings.
Brecht Van Lommel [Mon, 18 Mar 2019 13:56:08 +0000 (14:56 +0100)]
Cleanup: fix compiler warnings.

5 months agoFix (unreported) broken Py API doc after adding gpencil to buttons_context...
Bastien Montagne [Mon, 18 Mar 2019 13:42:07 +0000 (14:42 +0100)]
Fix (unreported) broken Py API doc after adding gpencil to buttons_context...

5 months agoCleanup: remove compare_len_squared utility
Campbell Barton [Mon, 18 Mar 2019 13:35:24 +0000 (00:35 +1100)]
Cleanup: remove compare_len_squared utility

There isn't any advantage to this over comparing the squared length.

5 months agoFix T62643: ID user decrement error, likely related to custom material PointerProperty.
Bastien Montagne [Mon, 18 Mar 2019 12:55:26 +0000 (13:55 +0100)]
Fix T62643: ID user decrement error, likely related to custom material PointerProperty.

We are in a totally out-of-main context here, so no refcounting of any ID...

Note that this whole 'render preview' area could use some refactor with
modern ID management API, but that would go way beyond a mere bugfix,
and it is not the time to do such things.

5 months agoFix T61226: Make hair editing (more?) thread safe
Jacques Lucke [Mon, 18 Mar 2019 12:31:54 +0000 (13:31 +0100)]
Fix T61226: Make hair editing (more?) thread safe

This replaces the global `PEData->dist` with a thread local variable
that is passed into the callback functions separately.

There are two new function types which have `Hit` in the name.
Those take the distance to the mouse as an additional parameter.

Reviewers: sergey

Differential Revision:

5 months agoCleanup: C++ style of structure definition
Sergey Sharybin [Mon, 18 Mar 2019 11:47:18 +0000 (12:47 +0100)]
Cleanup: C++ style of structure definition

5 months agoMerge branch 'blender2.7'
Sergey Sharybin [Mon, 18 Mar 2019 11:03:22 +0000 (12:03 +0100)]
Merge branch 'blender2.7'

5 months agoCycles: Cleanup strict compiler warnings
Sergey Sharybin [Mon, 18 Mar 2019 11:02:41 +0000 (12:02 +0100)]
Cycles: Cleanup strict compiler warnings

5 months agoCleanup: we now have a way to tag 'from' ID pointers in libquery code.
Bastien Montagne [Mon, 18 Mar 2019 10:47:54 +0000 (11:47 +0100)]
Cleanup: we now have a way to tag 'from' ID pointers in libquery code.

So no need to have custom verbose own detection cases for those guys...

5 months agoFix mistake in previous commit.
Bastien Montagne [Mon, 18 Mar 2019 10:40:03 +0000 (11:40 +0100)]
Fix mistake in previous commit.

5 months agoFix T62670: insert_link() method not working for ShaderNodeCustomGroup.
Miguel Porces [Mon, 18 Mar 2019 10:16:34 +0000 (11:16 +0100)]
Fix T62670: insert_link() method not working for ShaderNodeCustomGroup.

Allow Python to override this method.

Differential Revision:

5 months agoCleanup: Main id looping: add FOREACH_MAIN_LISTBASE macro.
Bastien Montagne [Mon, 18 Mar 2019 10:32:06 +0000 (11:32 +0100)]
Cleanup: Main id looping: add FOREACH_MAIN_LISTBASE macro.

We don't want to use flow control like `break` statement into the basic
`FOREACH_MAIN_ID` macro, as this is a nested loop.

When refined behavior is needed (like breaking whole iteration, or just
skipping to next ID type), FOREACH_MAIN_LISTBASE and
FOREACH_MAIN_LISTBASE_ID macros should be used instead.

Based on D4382 by @campbellbarton
(Other potential solution, using flow control macros: D4384).

5 months agoAdd-ons: disable 3ds add-on in all existing preferences.
Brecht Van Lommel [Mon, 18 Mar 2019 10:00:15 +0000 (11:00 +0100)]
Add-ons: disable 3ds add-on in all existing preferences.

Silences warning when running with --debug. If/when this add-on is ported,
users that need it can enable it again.

5 months agoCleanup: fix compiler warning.
Brecht Van Lommel [Mon, 18 Mar 2019 09:42:40 +0000 (10:42 +0100)]
Cleanup: fix compiler warning.

5 months agoFix noisy console messages about unported add-ons by default.
Bastien Montagne [Mon, 18 Mar 2019 09:36:50 +0000 (10:36 +0100)]
Fix noisy console messages about unported add-ons by default.

* Make those single-line warning, there is really no reason to raise
exception (i.e. error) for that.
* Only show them when `--debug` option is set.

5 months agoCleanup: unused vars in last commit
Campbell Barton [Mon, 18 Mar 2019 09:30:05 +0000 (20:30 +1100)]
Cleanup: unused vars in last commit

5 months agoFix T58763: Sample color fails with mirror modifier
Campbell Barton [Mon, 18 Mar 2019 09:01:59 +0000 (20:01 +1100)]
Fix T58763: Sample color fails with mirror modifier

5 months agoCleanup: rename color band to color ramp
Campbell Barton [Mon, 18 Mar 2019 07:20:44 +0000 (18:20 +1100)]
Cleanup: rename color band to color ramp

5 months agoFix color ramp eyedropper menu item
Campbell Barton [Mon, 18 Mar 2019 06:41:37 +0000 (17:41 +1100)]
Fix color ramp eyedropper menu item

This couldn't be accessed because the poll function was checking the
active button.

Add a "color_ramp" context pointer which is set by the menu.

Alternative fix to D3984

5 months agoCleanup: spaces around operators in DNA headers
Campbell Barton [Mon, 18 Mar 2019 03:21:37 +0000 (14:21 +1100)]
Cleanup: spaces around operators in DNA headers

5 months agoCleanup: style, duplicate include
Campbell Barton [Mon, 18 Mar 2019 03:13:06 +0000 (14:13 +1100)]
Cleanup: style, duplicate include

5 months agoUI: clarify "Remap Relative" tooltip
Campbell Barton [Mon, 18 Mar 2019 02:57:16 +0000 (13:57 +1100)]
UI: clarify "Remap Relative" tooltip

Resolves T62612

5 months agoFix T62684: Crash transforming w/ snap enabled
Campbell Barton [Mon, 18 Mar 2019 02:42:53 +0000 (13:42 +1100)]
Fix T62684: Crash transforming w/ snap enabled

5 months agoFix T62685: Rename 'Align' to 'Only Origins'
Campbell Barton [Mon, 18 Mar 2019 02:28:00 +0000 (13:28 +1100)]
Fix T62685: Rename 'Align' to 'Only Origins'

The RNA name didn't match the name used in the UI,
making the quick favourites menu show this as 'Align'.

5 months agoCleanup: rename BLI_kdtree vars & args for clarity
Campbell Barton [Sun, 17 Mar 2019 23:21:45 +0000 (10:21 +1100)]
Cleanup: rename BLI_kdtree vars & args for clarity

5 months agoBLI_kdtree: refactor boids specific logic into callback
Campbell Barton [Sun, 17 Mar 2019 22:28:32 +0000 (09:28 +1100)]
BLI_kdtree: refactor boids specific logic into callback

Logic to for boids to avoid head-on collisions was in BLI_kdtree.

Move this into a callback which is now defined in boids.c
so the kdtree code can be kept generic.

5 months agoUI: add light/world settings in shader node editor.
Brecht Van Lommel [Sun, 17 Mar 2019 16:52:05 +0000 (17:52 +0100)]
UI: add light/world settings in shader node editor.

Material was already there. Implementation was changed so it's just a
single line of code to adapt a panel to the node editor.

5 months agoGPencil: Cleanup extra lines
Antonioya [Sun, 17 Mar 2019 19:04:09 +0000 (20:04 +0100)]
GPencil: Cleanup extra lines

5 months agoGPencil: Changes in Fill and new 3D Cursor View Plane
Antonioya [Sun, 17 Mar 2019 18:47:31 +0000 (19:47 +0100)]
GPencil: Changes in Fill and new 3D Cursor View Plane

This commit groups several options that were tested in grease pencil branch:

- Changes to fill algorithms and improves, specially in small areas and stroke corners.
  New options has been added in order to define how the fill is working and internally there are optimizations in detect the small areas in the extremes.

  Kudos to @charlie for coding this fill improvements.

- New 3D cursor view plane option.

  Now it's possible to lock the drawing plane to the 3D cursor and use the 3D cursor orientation. This allows more flexibility when you are drawing and reduce the need to create geometry to draw over surfaces.

- Canvas Grid now can be locked to 3D cursor.
- New option to reproject stroke using 3D cursor.
- Small tweaks and fixes.

Changes reviewed by @pepeland and @mendio

5 months agoFix T62570: Append Particles System not working properly.
Bastien Montagne [Sun, 17 Mar 2019 17:07:13 +0000 (18:07 +0100)]
Fix T62570: Append Particles System not working properly.

T62570 and T61796 show that we need two slightly different behaviors in
post-linking collection process:
* For linking, we never want to instantiate indirectly-linked
collections or objects.
* For appending however, since all collections and objects will become
local and hence need instantiation, we want to 'link to scene' all
collections first, better than instantiating the objects in the master
collection opf current scene.

5 months agoFix T62589: Particle system Instance Collection option fails to set a user for a...
Bastien Montagne [Sun, 17 Mar 2019 15:00:52 +0000 (16:00 +0100)]
Fix T62589: Particle system Instance Collection option fails to set a user for a linked collection.

Forgot to tag properly RNA property in rB439437fa3a44.

5 months agoFix T62240: Bleed artifacts with degenerate triangles
Luca Rood [Sun, 17 Mar 2019 14:40:46 +0000 (15:40 +0100)]
Fix T62240: Bleed artifacts with degenerate triangles

This makes degenerate triangles be ignored, as they cause artifacts and
don't contribute to the result anyway. There is an extra cost for
all triangles, to check if they are degenerate. Though not ideal, this
seems to be the safest solution at the moment (see code comments).

This commit also changes the clamp value for the bleed len_fact from 5
to 10, to give good corner results with some sharper angles, considering
they will be rounded later.

A lot of the texture paint initialization code could be optimized
by caching the results throughout the session, instead of rerunning it
for each stroke. Stroke initialization is way too expensive at the
moment, and does many redundant computations.

5 months agoFix T62678: Wrong text clipping
Jacques Lucke [Sun, 17 Mar 2019 13:15:26 +0000 (14:15 +0100)]
Fix T62678: Wrong text clipping

There are two issues at play here.
First, BLF_width computed a width that was not wide
enough to actually hold the text.
Second, blf_glyph_calc_rect_test computed an incorrect
rect->xmax when the glyph was moved to the left a bit.
We ignore the overlap on the left, but the right side
should still be adjusted accordingly.

5 months agoCocoa: Fix missing key window after closing "About"
Sergey Sharybin [Sun, 17 Mar 2019 11:14:09 +0000 (12:14 +0100)]
Cocoa: Fix missing key window after closing "About"

The cause of this issue goes deeper inside of the custom nature of
the event loop. In short, when not using [NSApp run] closing "About"
window does not make previous key window a key again.

The solution is quite similar to other projects, but we only force
key window from handler when closing one appears to be "About" window.
In all other cases we leave it up to Blender's window manager to make
decision and do not interfere with it.

Test plan:
- Open Blender application
- Go to Blender -> About Blender menu item
- Close About window
- Note that Blender's window does not become active again.

Reviewers: brecht

Reviewed By: brecht

Differential Revision:

5 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Sun, 17 Mar 2019 11:54:19 +0000 (12:54 +0100)]
Merge branch 'blender2.7'

5 months agoFix bl_pyapi_idprop unit test.
Howard Trickey [Sat, 16 Mar 2019 22:48:49 +0000 (18:48 -0400)]
Fix bl_pyapi_idprop unit test.

Scenes can now have a 'cycles' key when starting, so account for that.

5 months agoGPencil: Cancel all transformations in Draw mode
Antonioya [Sun, 17 Mar 2019 11:20:15 +0000 (12:20 +0100)]
GPencil: Cancel all transformations in Draw mode

Actually, when you press G/R/S in Draw mode, the transformations can be done, but this is annoying in draw mode and must be captured an cancel.

This patch capture the transformation and cancel it.

Reviewed by @brecht

5 months agoCleanup: remove unused buildbot code.
Brecht Van Lommel [Sun, 17 Mar 2019 02:02:00 +0000 (03:02 +0100)]
Cleanup: remove unused buildbot code.

5 months agoFix Windows 32bit buildbot trying to use CUDA, should be disabled.
Brecht Van Lommel [Sun, 17 Mar 2019 01:56:22 +0000 (02:56 +0100)]
Fix Windows 32bit buildbot trying to use CUDA, should be disabled.

5 months agoCycles: optimization for constant background colors.
Brecht Van Lommel [Tue, 19 Feb 2019 16:44:58 +0000 (17:44 +0100)]
Cycles: optimization for constant background colors.

Skip shader evaluation then, as we already do for lights. Less than
1% faster in my tests, but might as well be consistent for both.

5 months agoFix Cycles OpenCL compile waiting unnecessarily for background shader.
Brecht Van Lommel [Sun, 17 Mar 2019 00:56:08 +0000 (01:56 +0100)]
Fix Cycles OpenCL compile waiting unnecessarily for background shader.

Makes preview kernel appear quicker when background color is fixed.

5 months agoCleanup: simplify kernel features definition.
Brecht Van Lommel [Sat, 16 Mar 2019 15:45:50 +0000 (16:45 +0100)]
Cleanup: simplify kernel features definition.

No functional changes, logic here got too complex after many changes over
the years.

5 months agoCleanup: remove unused code.
Brecht Van Lommel [Sat, 16 Mar 2019 13:59:31 +0000 (14:59 +0100)]
Cleanup: remove unused code.

5 months agoFix Cycles not doing versioning for some files saved in 2.80.
Brecht Van Lommel [Sat, 16 Mar 2019 22:36:34 +0000 (23:36 +0100)]
Fix Cycles not doing versioning for some files saved in 2.80.