7 weeks agoCleanup: renamed `do_draw_overlay` to `do_draw_paintcursor`
Jeroen Bakker [Tue, 23 Jun 2020 10:07:50 +0000 (12:07 +0200)]
Cleanup: renamed `do_draw_overlay` to `do_draw_paintcursor`

To make a better distinction with region overlay.

7 weeks agoPerformance: Draw play head as an overlay
Jeroen Bakker [Tue, 23 Jun 2020 05:59:34 +0000 (07:59 +0200)]
Performance: Draw play head as an overlay

When playing back animations a playhead is updated in all the animation editors.
The drawing of the playhead is part of the drawing of the main region
`RGN_TYPE_WINDOW` that redraws the whole region.

This change will draw the play head and window scrollers when updating the
screen. This affects the Action editor, Timeline, Graph editor, NLA editor and
Sequence editor. There is noticeable speedup when using complex animation files.

Spring 02_020_A.anim.blend fps went from 11.8 to 12.5 when showing a timeline
and a action editor on a Ryzen 1700.

* When playing back animation the markers don't jump up/down when near the
  frame. This could be added back.

Reviewed By: Brecht van Lommel

Differential Revision:

7 weeks agoPreferences: New experimental settings for particle system and hair
Jacques Lucke [Tue, 23 Jun 2020 09:30:46 +0000 (11:30 +0200)]
Preferences: New experimental settings for particle system and hair

This replaces the cmake options `WITH_NEW_OBJECT_TYPES` and
`WITH_NEW_SIMULATION_TYPE` with two experimental userpref settings:

* `use_new_particle_system`: Enables the point cloud type and the simulation editor.
* `use_new_hair_type`: Only displays the add-operator in the add menu for now.

Note, in the current state you can't do anything productive with the new particle
system or the new hair type. Features will be added step by step in the upcoming
weeks and months.

Reviewers: brecht

Differential Revision:

7 weeks agoCleanup: USD, move code from `USD` to `blender::io::usd` namespace
Sybren A. Stüvel [Tue, 23 Jun 2020 09:07:44 +0000 (11:07 +0200)]
Cleanup: USD, move code from `USD` to `blender::io::usd` namespace

No functional changes.

7 weeks agoTransform: default to median center instead of bounds
Campbell Barton [Tue, 23 Jun 2020 08:31:10 +0000 (18:31 +1000)]
Transform: default to median center instead of bounds

When neither bounds or median is selected, snapping the cursor to
the selection was using bounds which often doesn't give useful results.

Resolves T78135

7 weeks agoFunctions: Multi Function Network
Jacques Lucke [Tue, 23 Jun 2020 08:16:14 +0000 (10:16 +0200)]
Functions: Multi Function Network

A multi-function network is a graph data structure, where nodes are
multi-functions (or dummies) and links represent data flow.
New multi-functions can be derived from such a network. For that
one just has to specify two sets of sockets in the network that
represent the inputs and outputs of the new function.

It is possible to do optimizations like constant folding on this
data structure, but that is not implemented in this patch yet.

In a next step, user generated node trees are converted into a
MFNetwork, so that they can be evaluated efficiently for many particles.

This patch also includes some tests that cover the majority of the code.
However, this seems to be the kind of code that is best tested by some
.blend files. Building graph structures in code is possible, but is
not easy to understand afterwards.

Reviewers: brecht

Differential Revision:

7 weeks agoFix T77743: Number pad key-map items missing from search
Yevgeny Makarov [Tue, 23 Jun 2020 07:54:51 +0000 (17:54 +1000)]
Fix T77743: Number pad key-map items missing from search

7 weeks agoCleanup: use doxy sections for BLI read/write headers
Campbell Barton [Tue, 23 Jun 2020 06:38:52 +0000 (16:38 +1000)]
Cleanup: use doxy sections for BLI read/write headers

Add reference between the read/write functions too.

7 weeks agoFix T78146: Crash using scroll bars
Campbell Barton [Tue, 23 Jun 2020 05:21:30 +0000 (15:21 +1000)]
Fix T78146: Crash using scroll bars

Regression in 2fdca5bd1981c

7 weeks agoCorrect recent 'name' -> 'filepath' rename (missed Collada)
Campbell Barton [Tue, 23 Jun 2020 04:58:38 +0000 (14:58 +1000)]
Correct recent 'name' -> 'filepath' rename (missed Collada)

7 weeks agoCleanup: move text.c comments to the struct/flag declarations
Campbell Barton [Tue, 23 Jun 2020 04:09:13 +0000 (14:09 +1000)]
Cleanup: move text.c comments to the struct/flag declarations

Also update/correct some of the comments.

7 weeks agoCleanup: remove Text.nlines
Campbell Barton [Tue, 23 Jun 2020 03:48:19 +0000 (13:48 +1000)]
Cleanup: remove Text.nlines

This isn't needed and wasn't properly updated when new-lines were added.

7 weeks agoCleanup: use static sets instead of tuples
Campbell Barton [Tue, 23 Jun 2020 03:30:21 +0000 (13:30 +1000)]
Cleanup: use static sets instead of tuples

7 weeks agoCleanup: A few small comment & naming changes in bevel
Hans Goudey [Tue, 23 Jun 2020 02:41:02 +0000 (22:41 -0400)]
Cleanup: A few small comment & naming changes in bevel

7 weeks agoBevel: Refactor profile type input to use an enum
Hans Goudey [Tue, 23 Jun 2020 02:25:55 +0000 (22:25 -0400)]
Bevel: Refactor profile type input to use an enum

This will allow the easier addition of a constant radius mode in the
future and some changes in the UI to mirror the recent similar change
from "Only Vertices" to the "Affect" enum.

7 weeks agoCleanup: rename 'name' to 'filepath' for DNA types
Campbell Barton [Mon, 22 Jun 2020 23:54:14 +0000 (09:54 +1000)]
Cleanup: rename 'name' to 'filepath' for DNA types

Using 'name' for the full path of a file reads badly,
especially when is used in related code.

7 weeks agoCleanup: rename Library.filepath to filepath_abs
Campbell Barton [Mon, 22 Jun 2020 23:54:07 +0000 (09:54 +1000)]
Cleanup: rename Library.filepath to filepath_abs

Make it clear that this is the absolute path,
allow the 'name' to be renamed to 'filepath'.

Rename is safe since this is only for run-time.

7 weeks agoCleanup: unused argument
Campbell Barton [Mon, 22 Jun 2020 23:52:52 +0000 (09:52 +1000)]
Cleanup: unused argument

7 weeks agoFix T78045: CTL-ALT-S does nothing in pose mode and crashes when called from the...
Germano Cavalcante [Mon, 22 Jun 2020 22:06:04 +0000 (19:06 -0300)]
Fix T78045: CTL-ALT-S does nothing in pose mode and crashes when called from the menu

7 weeks agoRefactoring: View2DScrollers memory allocation
Jeroen Bakker [Mon, 22 Jun 2020 19:44:18 +0000 (21:44 +0200)]
Refactoring: View2DScrollers memory allocation

View2DScrollers used the memory manager to allocate memory. This isn't a
problem but in a upcoming change the scrollers will be drawn more often
than it used to (See {D8066}). To limit the number of allocations and
frees this patch will use the stack for allocation.

Reviewed By: Campbell Barton

Differential Revision:

7 weeks agoTrasnform: Support for other snapping types on Edge Slide
Germano Cavalcante [Mon, 22 Jun 2020 18:28:25 +0000 (15:28 -0300)]
Trasnform: Support for other snapping types on Edge Slide

This completes T66426.

Since Vert Slide supports these other snapping types (since rBe2fc9a88bc),
it would be easy to miss this on Edge Slide.

So add support for Edge Slide too.

7 weeks agoFix T78136: Image editor - crash to desktop with changing the threshold for extract...
Antonio Vazquez [Mon, 22 Jun 2020 18:06:28 +0000 (20:06 +0200)]
Fix T78136: Image editor - crash to desktop with changing the threshold for extract palette

Also fixed the same error in generate GPencil object from image.

The problem was the Render Result image hasn't  ibuf.

7 weeks agoUI: Widget: Replace geometry by fragment shader drawing
Clément Foucault [Mon, 22 Jun 2020 17:57:53 +0000 (19:57 +0200)]
UI: Widget: Replace geometry by fragment shader drawing

This means all the antiailasing is done inside the fragment shader.

We use a Signed Distance Field to draw the 2D rounded boxes. This ensure
the best quality for AA.

This reduce the averge Batch for widget to 16 verts instead of ~600 and
reduce overshading a lot.

Theme Emboss alpha and tria alpha needs to be changed after this refactor.

The shadow drawing is left unchanged and still use geometry.

Reviewed By: Severin

Differential Revision:

7 weeks agoGPencil: Cleanup comments
Antonio Vazquez [Mon, 22 Jun 2020 17:27:58 +0000 (19:27 +0200)]
GPencil: Cleanup comments

7 weeks agoFix T78134: GPencil interpolation crash
Antonio Vazquez [Mon, 22 Jun 2020 17:09:11 +0000 (19:09 +0200)]
Fix T78134: GPencil interpolation crash

Need to verify active frame not NULL.

7 weeks agoFix T77754: Crash after any alembic import undo in an empty scene
Sybren A. Stüvel [Mon, 22 Jun 2020 15:53:14 +0000 (17:53 +0200)]
Fix T77754: Crash after any alembic import undo in an empty scene

Thanks @mont29 for this patch.

This creates an explicit undo step after the Alembic importer has finished
running. This is necessary when the importer runs as a background job.

7 weeks agoFix: Wrong fake user icons in outliner orphan mode
Nathan Craddock [Mon, 22 Jun 2020 15:34:50 +0000 (09:34 -0600)]
Fix: Wrong fake user icons in outliner orphan mode

The icons for toggling fake users on orphan datablocks in the outliner
were drawn as the quit and x icons instead of the fake user icon. This
changes to the correct icon, and removes the redundant "F" column.

7 weeks agoUV Editor: Fix Vertex Overlay color not being color managed
Clément Foucault [Mon, 22 Jun 2020 15:31:42 +0000 (17:31 +0200)]
UV Editor: Fix Vertex Overlay color not being color managed

Could be backported to 2.83 LTS

7 weeks agoFix T62917 UV editor: Edge overlay not shown when edge overlay type is Dash
Clément Foucault [Mon, 22 Jun 2020 15:30:45 +0000 (17:30 +0200)]
Fix T62917 UV editor: Edge overlay not shown when edge overlay type is Dash

Fix by changing the shader to always compute dash for uv and just change
dash size to something really big for other overlay types.

7 weeks agoSubdiv CCG: Add access to first grid index of a face
Sergey Sharybin [Mon, 22 Jun 2020 15:15:20 +0000 (17:15 +0200)]
Subdiv CCG: Add access to first grid index of a face

Is lazily-initialized array owned by the SubdivCCG. Allows to access
index of a first grid of a given face in the flat array of grids.

Currently unused, but is needed for multires bake.

7 weeks agoFix (unreported) broken UI of modifiers for liboverrides.
Bastien Montagne [Mon, 22 Jun 2020 14:52:53 +0000 (16:52 +0200)]
Fix (unreported) broken UI of modifiers for liboverrides.

Broken in recent refactor of modifiers UI code...

7 weeks agoFix random crash in Cycles smoke volume loading
Brecht Van Lommel [Mon, 22 Jun 2020 14:36:07 +0000 (16:36 +0200)]
Fix random crash in Cycles smoke volume loading

Don't access evaluated mesh data after freeing Blender depsgraph.

Potentially related to T77954.

7 weeks agoSubdiv: Cleanup, remove unused code
Sergey Sharybin [Mon, 22 Jun 2020 14:39:04 +0000 (16:39 +0200)]
Subdiv: Cleanup, remove unused code

7 weeks agoFunctions: add utilities that allow creating some multi-functions with less typing
Jacques Lucke [Mon, 22 Jun 2020 13:50:08 +0000 (15:50 +0200)]
Functions: add utilities that allow creating some multi-functions with less typing

7 weeks agoFunctions: Various improvements to the spans and generic data structures
Jacques Lucke [Mon, 22 Jun 2020 13:48:08 +0000 (15:48 +0200)]
Functions: Various improvements to the spans and generic data structures

Most of this code is covered by unit tests.

7 weeks agoFix Preferences not saved when changing translation settings
Julian Eisel [Mon, 22 Jun 2020 13:46:26 +0000 (15:46 +0200)]
Fix Preferences not saved when changing translation settings

7 weeks agoUI: Fix untranslated layout headings
Julian Eisel [Mon, 22 Jun 2020 13:06:13 +0000 (15:06 +0200)]
UI: Fix untranslated layout headings

7 weeks agoUI/BPY: Make layout headings translatable from BPY
Julian Eisel [Mon, 22 Jun 2020 12:47:12 +0000 (14:47 +0200)]
UI/BPY: Make layout headings translatable from BPY

This was an oversight when layout headings were added. There's now the regular
translation context option in the Python API.

7 weeks agoFix constraint alignment check on snap axis to plane
Germano Cavalcante [Mon, 22 Jun 2020 12:53:33 +0000 (09:53 -0300)]
Fix constraint alignment check on snap axis to plane

7 weeks agoTools: rename 'Extrude, Dissolve and Intersect' to 'Extrude Manifold'
Germano Cavalcante [Mon, 22 Jun 2020 12:20:43 +0000 (09:20 -0300)]
Tools: rename 'Extrude, Dissolve and Intersect' to 'Extrude Manifold'

7 weeks agoTransform: Full snapping support for Vert Slide
Germano Cavalcante [Mon, 22 Jun 2020 12:07:51 +0000 (09:07 -0300)]
Transform: Full snapping support for Vert Slide

Now all options for "snap to" affect the Vert Slide mode.

Reviewed By: campbellbarton

Maniphest Tasks: T66426

Differential Revision:

7 weeks agoLibOverride: Add CacheFile properties as overridable.
Bastien Montagne [Mon, 22 Jun 2020 12:03:02 +0000 (14:03 +0200)]
LibOverride: Add CacheFile properties as overridable.

7 weeks agoExternal Player: update DJV to version 2
Damien Picard [Mon, 22 Jun 2020 11:15:49 +0000 (21:15 +1000)]
External Player: update DJV to version 2

7 weeks agoCleanup: remove workaround for boost 1.46
Campbell Barton [Mon, 22 Jun 2020 11:09:07 +0000 (21:09 +1000)]
Cleanup: remove workaround for boost 1.46

Part of D8055 by @pioverfour

7 weeks agoCleanup: remove blender 2.4 reference in animation playback
Campbell Barton [Mon, 22 Jun 2020 11:06:39 +0000 (21:06 +1000)]
Cleanup: remove blender 2.4 reference in animation playback

7 weeks agoCycles: enable Embree by default for CPU rendering
Brecht Van Lommel [Sun, 23 Feb 2020 08:14:52 +0000 (09:14 +0100)]
Cycles: enable Embree by default for CPU rendering

For GPU debugging purposes, it is still possible to render with the same BVH2
on the CPU using the Debug panel in the render properties.

Note that building Blender without Embree will now lead to significantly reduced
performance in CPU rendering, and a few of the Cycles regression tests will fail
due to small pixel differences.

Ref T73778

Depends on D8014

Maniphest Tasks: T73778

Differential Revision:

7 weeks agoCycles: internal refactoring to make thick/ribbon curve separate primitives
Brecht Van Lommel [Wed, 10 Jun 2020 17:07:07 +0000 (19:07 +0200)]
Cycles: internal refactoring to make thick/ribbon curve separate primitives

Also removing the curve system manager which only stored a few curve intersection
settings. These are all changes towards making shape and subdivision settings
per-object instead of per-scene, but there is more work to do here.

Ref T73778

Depends on D8013

Maniphest Tasks: T73778

Differential Revision:

7 weeks agoCycles: port curve-ray intersection from Embree for use in Cycles GPU
Brecht Van Lommel [Tue, 18 Feb 2020 19:54:41 +0000 (20:54 +0100)]
Cycles: port curve-ray intersection from Embree for use in Cycles GPU

This keeps render results compatible for combined CPU + GPU rendering.
Peformance and quality primitives is quite different than before. There
are now two options:

* Rounded Ribbon: render hair as flat ribbon with (fake) rounded normals, for
  fast rendering. Hair curves are subdivided with a fixed number of user
  specified subdivisions.

  This gives relatively good results, especially when used with the Principled
  Hair BSDF and hair viewed from a typical distance. There are artifacts when
  viewed closed up, though this was also the case with all previous primitives
  (but different ones).

* 3D Curve: render hair as 3D curve, for accurate results when viewing hair
  close up. This automatically subdivides the curve until it is smooth.

  This gives higher quality than any of the previous primitives, but does come
  at a performance cost and is somewhat slower than our previous Thick curves.

The main problem here is performance. For CPU and OpenCL rendering performance
seems usually quite close or better for similar quality results.

However for CUDA and Optix, performance of 3D curve intersection is problematic,
with e.g. 1.45x longer render time in Koro (though there is no equivalent quality
and rounded ribbons seem fine for that scene). Any help or ideas to optimize this
are welcome.

Ref T73778

Depends on D8012

Maniphest Tasks: T73778

Differential Revision:

7 weeks agoCycles: remove SIMD BVH optimizations, to be replaced by Embree
Brecht Van Lommel [Wed, 10 Jun 2020 16:55:33 +0000 (18:55 +0200)]
Cycles: remove SIMD BVH optimizations, to be replaced by Embree

Ref T73778

Depends on D8011

Maniphest Tasks: T73778

Differential Revision:

7 weeks agoCycles: remove __UV__ and __INSTANCING__ as kernel options
Brecht Van Lommel [Sun, 23 Feb 2020 09:15:35 +0000 (10:15 +0100)]
Cycles: remove __UV__ and __INSTANCING__ as kernel options

The kernel did not work correctly when these were disabled anyway. The
optimized BVH traversal for the no instances case was also only used on
the CPU, so no longer makes sense to keep.

Ref T73778

Depends on D8010

Maniphest Tasks: T73778

Differential Revision:

7 weeks agoCycles: always perform backface culling for curve, remove option
Brecht Van Lommel [Wed, 10 Jun 2020 16:34:18 +0000 (18:34 +0200)]
Cycles: always perform backface culling for curve, remove option

The hair BSDFs are already designed to assume this, and disabling backface
culling would break them in some cases.

Ref T73778

Depends on D8009

Maniphest Tasks: T73778

Differential Revision:

7 weeks agoCycles: remove support for rendering hair as triangle and lines
Brecht Van Lommel [Thu, 4 Jun 2020 13:12:31 +0000 (15:12 +0200)]
Cycles: remove support for rendering hair as triangle and lines

Triangles were very memory intensive. The only reason they were not removed yet
is that they gave more accurate results, but there will be an accurate 3D curve
primitive added for this.

Line rendering was always poor quality since the ends do not match up. To keep CPU
and GPU compatibility we just remove them entirely. They could be brought back if
an Embree compatible implementation is added, but it's not clear to me that there
is a use case for these that we'd consider important.

Ref T73778

Reviewers: #cycles


7 weeks agoCycles: use TBB for task pools and task scheduler
Brecht Van Lommel [Fri, 5 Jun 2020 14:39:57 +0000 (16:39 +0200)]
Cycles: use TBB for task pools and task scheduler

No significant performance improvement is expected, but it means we have a
single thread pool throughout Blender. And it should make adding more
parallellization in the future easier.

After previous refactoring commits this is basically a drop-in replacement.
One difference is that the task pool had a mechanism for scheduling tasks to
the front of the queue to minimize memory usage. TBB has a smarter algorithm
to balance depth-first and breadth-first scheduling of tasks and we assume that
removes the need to manually provide hints to the scheduler.

Fixes T77533

7 weeks agoCleanup: remove task pool stop() and finished()
Brecht Van Lommel [Fri, 5 Jun 2020 12:36:31 +0000 (14:36 +0200)]
Cleanup: remove task pool stop() and finished()

7 weeks agoCleanup: use lambdas instead of functors for task pools, remove threadid
Brecht Van Lommel [Fri, 5 Jun 2020 12:18:02 +0000 (14:18 +0200)]
Cleanup: use lambdas instead of functors for task pools, remove threadid

7 weeks agoCycles: make TBB a required library dependency, and use in a few places
Brecht Van Lommel [Fri, 5 Jun 2020 10:53:38 +0000 (12:53 +0200)]
Cycles: make TBB a required library dependency, and use in a few places

Now that the rest of Blender also relies on TBB, no point in maintaining custom
code for paraller_for and thread local storage.

7 weeks agoCleanup: minor refactoring around DeviceTask
Brecht Van Lommel [Fri, 5 Jun 2020 09:39:11 +0000 (11:39 +0200)]
Cleanup: minor refactoring around DeviceTask

7 weeks agoCleanup: use move semantics for task pool functions
Brecht Van Lommel [Fri, 5 Jun 2020 08:37:45 +0000 (10:37 +0200)]
Cleanup: use move semantics for task pool functions

7 weeks agoCleanup: compiler warning
Brecht Van Lommel [Mon, 22 Jun 2020 10:32:34 +0000 (12:32 +0200)]
Cleanup: compiler warning

7 weeks agoAdd undo step to Alembic and Collada importers...
Bastien Montagne [Mon, 22 Jun 2020 10:13:09 +0000 (12:13 +0200)]
Add undo step to Alembic and Collada importers...

Re T77754.

7 weeks agoFix initialization of Edge Slide with Single Side
Germano Cavalcante [Sun, 21 Jun 2020 23:27:41 +0000 (20:27 -0300)]
Fix initialization of Edge Slide with Single Side

It was not being initialized.
Error introduced in cf42721fe28f

7 weeks agoTransform: Simplify and rearrange mirror code
Germano Cavalcante [Sun, 21 Jun 2020 14:40:08 +0000 (11:40 -0300)]
Transform: Simplify and rearrange mirror code

No real functional changes.

7 weeks agoTransform: Do not compute island center when not used
Germano Cavalcante [Sat, 20 Jun 2020 16:52:17 +0000 (13:52 -0300)]
Transform: Do not compute island center when not used

No functional changes from the user's point of view.

7 weeks agoCleanup: Remove goto in transform_convert_mesh code
Germano Cavalcante [Sat, 20 Jun 2020 16:58:57 +0000 (13:58 -0300)]
Cleanup: Remove goto in transform_convert_mesh code

7 weeks agoCleanup: Rearrange transform_convert_mesh into doxy sections
Germano Cavalcante [Sat, 20 Jun 2020 15:14:25 +0000 (12:14 -0300)]
Cleanup: Rearrange transform_convert_mesh into doxy sections

7 weeks agoGPencil: Remove Fill selection with Tweak tool and fix bug
Antonio Vazquez [Mon, 22 Jun 2020 08:40:50 +0000 (10:40 +0200)]
GPencil: Remove Fill selection with Tweak tool and fix bug

* Fixed selection of point in multiframe mode. The point was not selected.

* Removed the fill area selection because makes the tool imprecise, and for this tool need to be precise or the selection is impossible. Now only select if it's over the point, not over the filled area.

7 weeks agoFix T78123: Can't remove preset with brackets in the name
Campbell Barton [Mon, 22 Jun 2020 08:25:15 +0000 (18:25 +1000)]
Fix T78123: Can't remove preset with brackets in the name

7 weeks agoFix T77942: Add Cube scales immediately upon creation after changing Size attribute...
Philipp Oeser [Wed, 17 Jun 2020 11:05:44 +0000 (13:05 +0200)]
Fix T77942: Add Cube scales immediately upon creation after changing Size attribute on prior Add Cube command

Always use the default size here, since desired bounds have been set
interactively, it does not make sense to use a different size from a
previous command.

Maniphest Tasks: T77942

Differential Revision:

7 weeks agoFix error using 'char32_t' as 'wchar_t' on windows
Harley Acheson [Mon, 22 Jun 2020 07:10:50 +0000 (17:10 +1000)]
Fix error using 'char32_t' as 'wchar_t' on windows

FONT_OT_text_insert failed on Windows.

This change was missing from D6198.

7 weeks agoFix T77536: Extrude to cursor keybinding missing
Campbell Barton [Mon, 22 Jun 2020 07:03:13 +0000 (17:03 +1000)]
Fix T77536: Extrude to cursor keybinding missing

Regression in cec7db200452

7 weeks agoFix T77607: Edit-mode shading regression 2.90
Campbell Barton [Mon, 22 Jun 2020 06:44:33 +0000 (16:44 +1000)]
Fix T77607: Edit-mode shading regression 2.90

Regression in deaff945d0b9

7 weeks agoUI: report when reloading unsaved text
Campbell Barton [Mon, 22 Jun 2020 05:59:02 +0000 (15:59 +1000)]
UI: report when reloading unsaved text

Address confusion from T78114.

7 weeks agoPython: support building again version 3.9 (unreleased)
Campbell Barton [Mon, 22 Jun 2020 04:51:20 +0000 (14:51 +1000)]
Python: support building again version 3.9 (unreleased)

Resolves T78089, no functional changes.

7 weeks agoUI: Only show constaint head/tail property with subtarget
Hans Goudey [Sun, 21 Jun 2020 14:55:16 +0000 (10:55 -0400)]
UI: Only show constaint head/tail property with subtarget

7 weeks agoUI: Fix view reset when toggling subpanel expansion
Hans Goudey [Sun, 21 Jun 2020 14:47:37 +0000 (10:47 -0400)]
UI: Fix view reset when toggling subpanel expansion

The view should only reset for the ctrl-click mode that collapses
all other panels.

7 weeks agoGPencil: Fix unreported missing material onion filter
Antonio Vazquez [Sun, 21 Jun 2020 13:51:50 +0000 (15:51 +0200)]
GPencil: Fix unreported missing material onion filter

This feature was removed by error during the refactor done in draw engine.

Differential Revision:

7 weeks agoGPencil: Change effect tooltips for new Shader operators
Antonio Vazquez [Sun, 21 Jun 2020 08:24:08 +0000 (10:24 +0200)]
GPencil: Change effect tooltips for new Shader operators

Instead to use ShaderFx, use Effect and also fixed some wrong cases using Modifier word.

7 weeks ago UI: A few small fixes for constraint layouts
Hans Goudey [Sun, 21 Jun 2020 01:51:32 +0000 (21:51 -0400)]
UI: A few small fixes for constraint layouts

      - Head / Tail was stuck on two rows. It seems there is an issue with
        headings here, which means the first property has to place its own
        label. (So for example the small button can't be first in the row.)
      - Some misalignment and decorator fixes for aligned toggles

7 weeks agoCleanup: Outliner walk select naming
Nathan Craddock [Sat, 20 Jun 2020 22:03:55 +0000 (16:03 -0600)]
Cleanup: Outliner walk select naming

No functional changes. Don't use walk_element now that the walk element
flag is removed.

7 weeks agoFix T71812: Outliner walk navigation not activating
Nathan Craddock [Sat, 20 Jun 2020 22:02:54 +0000 (16:02 -0600)]
Fix T71812: Outliner walk navigation not activating

Walk navigation used a separate flag to select the element. This is
because activation and mode toggling were connected until rB702e00f91088
cleaned up the selection logic.

Now walk navigation can activate objects and other elements without
changing modes. This also addresses renaming in the outliner which
did renaming from the active element, not the walk element.

7 weeks agoFix T77328: Crash on undo Draw Face Sets stroke with dyntopo active
Pablo Dobarro [Tue, 9 Jun 2020 23:08:35 +0000 (01:08 +0200)]
Fix T77328: Crash on undo Draw Face Sets stroke with dyntopo active

Draw Face Sets does not work in Dyntopo and the sculpt API should be
responsible for that without needing to add checks all over the code,
but it was doing an undo push of type SCULPT_UNDO_FACE_SETS which is not
supported, causing the crash.

Reviewed By: sergey

Maniphest Tasks: T77328

Differential Revision:

7 weeks agoGPencil: Fix unreported multiuser datablock for onion message
Antonio Vazquez [Sat, 20 Jun 2020 17:54:44 +0000 (19:54 +0200)]
GPencil: Fix unreported multiuser datablock for onion message

This is not logic after the refactor.

7 weeks agoFix T77994: VSE crash adding a glow effect strip
Philipp Oeser [Sat, 20 Jun 2020 04:42:31 +0000 (06:42 +0200)]
Fix T77994: VSE crash adding a glow effect strip

Since rB47f98a38d0f8 not all 3 effect inputs were assigned anymore. Their
ImBuf's rect was accessed though in do_glow_effect (even though unused in
the following dedicated functions).

Just pass NULL here instead.

Reviewed By: ISS

Differential Revision:

7 weeks agoCleanup: use const args for property name/description access
Campbell Barton [Sat, 20 Jun 2020 03:50:12 +0000 (13:50 +1000)]
Cleanup: use const args for property name/description access

7 weeks agoFix T54112: ignores Curve.resolution_u/v
Campbell Barton [Sat, 20 Jun 2020 03:17:04 +0000 (13:17 +1000)]
Fix T54112: ignores Curve.resolution_u/v

7 weeks agoFix T75074: Select Hierarchy error, when object is not on view layer
Campbell Barton [Sat, 20 Jun 2020 02:43:51 +0000 (12:43 +1000)]
Fix T75074: Select Hierarchy error, when object is not on view layer

7 weeks agoCleanup: Fix build-warning with MSVC
Ray Molenkamp [Fri, 19 Jun 2020 23:28:42 +0000 (17:28 -0600)]
Cleanup: Fix build-warning with MSVC

Draco sets CMAKE_CXX_STANDARD to 14, given we
set the c++ standard in the root level CMakeLists.txt
to c++17 this generated build warnings.

Given the rootlevel one is the one we want we can
safely remove this line in dracos cmakelists

7 weeks agoBevel: add new 'Absolute' mode for interpreting 'amount' value.
Howard Trickey [Fri, 19 Jun 2020 21:56:01 +0000 (17:56 -0400)]
Bevel: add new 'Absolute' mode for interpreting 'amount' value.

This mode is like Percent, but measures absolute distance along
adjacent edges instead of a percentage.
So, for example, if you use this mode with 2 segments and profile=1,
you will see the length that the bevel moves along unbeveled edges
between beveled ones will match the value specified.
Many users seem to expect this behavior, even though it means the
bevel width is uneven, so this option is for them.

7 weeks agoCleanup: Spelling
Hans Goudey [Fri, 19 Jun 2020 20:11:15 +0000 (16:11 -0400)]
Cleanup: Spelling

7 weeks agoUI: Fix all constraint subpanels empty
Hans Goudey [Fri, 19 Jun 2020 20:07:20 +0000 (16:07 -0400)]
UI: Fix all constraint subpanels empty

Silly typo in earlier fix

7 weeks agoUI: ShaderFx Drag and Drop, Layout Updates
Hans Goudey [Fri, 19 Jun 2020 19:07:13 +0000 (15:07 -0400)]
UI: ShaderFx Drag and Drop, Layout Updates

This patch implements the list panel system D7490 for grease pencil
shader effects. It also moves their drawing to a callback in
ShaderFxTypeInfo in line with the extensible architecture refactoring
goal T75724.

The implementation is basically exactly the same as for the modifier
patch (9b099c86123fc82).

Thanks to Matias Mendiola (@mendio) for helping to develop the layout

Differential Revision:

7 weeks agoOutliner: Selection cleanup
Nathan Craddock [Fri, 19 Jun 2020 18:35:09 +0000 (12:35 -0600)]
Outliner: Selection cleanup

No functional changes. The outliner selection operators shared many
different functions for selection, activation, mode toggling, and other
actions, but the code paths were not always clear, making any changes

This cleans up the code and uses outliner_item_select() as the base
function for selection, activation, mode toggling between the different
selection operators. It also prepares for future features and fixes.

Reviewed By: Severin

Differential Revision:

7 weeks agoUI: Grease Pencil Modifier Drag and Drop, Layout Changes
Hans Goudey [Fri, 19 Jun 2020 18:42:08 +0000 (14:42 -0400)]
UI: Grease Pencil Modifier Drag and Drop, Layout Changes

This patch implements the list panel system D7490 for grease pencil
modifiers. It also moves their drawing to a callback in
GpencilModifierTypeInfo in line with the extensible architecture
refactoring goal T75724.

This also adds the "set_error" function for grease pencil modifiers,
which hadn't been copied from mesh modifiers yet.

The implementation is basically exactly the same as for the modifier
patch (9b099c86123fc82).

Thanks to Matias Mendiola (mendio) for providing mockups for many
of the layout changes.

Differential Revision:

7 weeks agoUI: Fix check for constraint panel default expansion
Hans Goudey [Fri, 19 Jun 2020 18:19:41 +0000 (14:19 -0400)]
UI: Fix check for constraint panel default expansion

7 weeks agoFix: Crash when closing window while Outliner shows screens
Julian Eisel [Fri, 19 Jun 2020 17:55:17 +0000 (19:55 +0200)]
Fix: Crash when closing window while Outliner shows screens

Steps to reproduce were:
* From factory settings, change Outliner Display Mode to "Blender File"
* Open "Screens" item, make sure all listed screens are visible
* Open Preference window, close it
* Mouse hover the outliner -> crash

Fix is to force an Outliner tree rebuild when closing screens.

7 weeks agoUI: Minor optimization to Outliner lookup for hovered element
Julian Eisel [Fri, 19 Jun 2020 17:21:39 +0000 (19:21 +0200)]
UI: Minor optimization to Outliner lookup for hovered element

The lookup to find the hovered Outliner tree element would possibly check
children that can be skipped with a simple check.

I experimented with various ways to avoid work in this lookup. This one is
simple and reliable, which others wouldn't have been afaics. Plus, there's not
much performance to be gained here anyway.

7 weeks agoUI: Avoid rebuilding Outliner tree when opening/collapsing items
Julian Eisel [Fri, 19 Jun 2020 17:09:32 +0000 (19:09 +0200)]
UI: Avoid rebuilding Outliner tree when opening/collapsing items

In big files, the Outliner would have a noticeable lag when opening or
collapsing items. That was because the entire tree was rebuilt, which isn't
actually needed in most cases. So we avoid it where possible now.

7 weeks agoUI: Don't rebuild Outliner tree to remove highlight when leaving area
Julian Eisel [Wed, 17 Jun 2020 18:40:22 +0000 (20:40 +0200)]
UI: Don't rebuild Outliner tree to remove highlight when leaving area

When leaving the Outliner's area, the highlight would be removed and cause a
full rebuild of the tree. This caused a noticable lag in bigger files.

7 weeks agoUI: Avoid rebuilding outliner tree when changing area size
Julian Eisel [Wed, 17 Jun 2020 18:21:15 +0000 (20:21 +0200)]
UI: Avoid rebuilding outliner tree when changing area size

In big files, ie typical production files, resizing the outliner area would be
very slow. The outliner tree would be rebuilt then, which can easily be avoided.

7 weeks agoFix T78042: GPencil: Strokes go missing after Interpolation from another layer
Antonio Vazquez [Fri, 19 Jun 2020 17:39:21 +0000 (19:39 +0200)]
Fix T78042: GPencil: Strokes go missing after Interpolation from another layer

This was due some strokes could be tagged and as the layer was locked, the strokes were not untagged and removed when all tagged strokes are removed.

The tagged strokes are used as temp ghost of the interpolation and removed at the end of the interpolation.