Commit Graph

97300 Commits

Author SHA1 Message Date
Campbell Barton
bdb49890cb Cleanup: use static sets instead of tuples 2020-06-23 13:30:21 +10:00
Hans Goudey
fd65055b69 Cleanup: A few small comment & naming changes in bevel 2020-06-22 22:41:02 -04:00
Hans Goudey
6703c7f7f1 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.
2020-06-22 22:25:55 -04:00
Campbell Barton
716a8241d3 Cleanup: rename 'name' to 'filepath' for DNA types
Using 'name' for the full path of a file reads badly,
especially when id.name is used in related code.
2020-06-23 11:29:36 +10:00
Campbell Barton
a573d7e8a1 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.
2020-06-23 11:22:30 +10:00
Campbell Barton
58f3fabb97 Cleanup: unused argument 2020-06-23 09:53:11 +10:00
Germano Cavalcante
51bf04383a Fix T78045: CTL-ALT-S does nothing in pose mode and crashes when called from the menu 2020-06-22 19:06:24 -03:00
Jeroen Bakker
2fdca5bd19 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: https://developer.blender.org/D8076
2020-06-22 21:46:04 +02:00
Germano Cavalcante
9335daac2a 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.
2020-06-22 15:28:38 -03:00
Antonio Vazquez
73d3f51c16 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.
2020-06-22 20:06:43 +02:00
Clément Foucault
15dda0115c 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: https://developer.blender.org/D7833
2020-06-22 19:57:53 +02:00
Antonio Vazquez
3cea42ce29 GPencil: Cleanup comments 2020-06-22 19:27:58 +02:00
Antonio Vazquez
9fbbd25e2a Fix T78134: GPencil interpolation crash
Need to verify active frame not NULL.
2020-06-22 19:09:11 +02:00
25d2222c30 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.
2020-06-22 18:10:42 +02:00
Nathan Craddock
fdfe85c616 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.
2020-06-22 09:41:54 -06:00
Clément Foucault
bfaa41c00d UV Editor: Fix Vertex Overlay color not being color managed
Could be backported to 2.83 LTS
2020-06-22 17:31:51 +02:00
Clément Foucault
336a8f283f 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.
2020-06-22 17:31:51 +02:00
Sergey Sharybin
b175bb2503 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.
2020-06-22 17:22:53 +02:00
Bastien Montagne
41158a91f2 Fix (unreported) broken UI of modifiers for liboverrides.
Broken in recent refactor of modifiers UI code...
2020-06-22 16:54:30 +02:00
Brecht Van Lommel
461ba2c74c Fix random crash in Cycles smoke volume loading
Don't access evaluated mesh data after freeing Blender depsgraph.

Potentially related to T77954.
2020-06-22 16:53:09 +02:00
Sergey Sharybin
4a68bf2078 Subdiv: Cleanup, remove unused code 2020-06-22 16:39:04 +02:00
Jacques Lucke
c94a1f5349 Functions: add utilities that allow creating some multi-functions with less typing 2020-06-22 15:50:31 +02:00
Jacques Lucke
6223385043 Functions: Various improvements to the spans and generic data structures
Most of this code is covered by unit tests.
2020-06-22 15:50:31 +02:00
Julian Eisel
7117ed9691 Fix Preferences not saved when changing translation settings 2020-06-22 15:47:05 +02:00
Julian Eisel
5726dec0e0 UI: Fix untranslated layout headings 2020-06-22 15:09:54 +02:00
Julian Eisel
6c76a782e9 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.
2020-06-22 15:09:54 +02:00
Germano Cavalcante
b0de36a5a3 Fix constraint alignment check on snap axis to plane 2020-06-22 09:53:33 -03:00
Germano Cavalcante
508e33842b Tools: rename 'Extrude, Dissolve and Intersect' to 'Extrude Manifold' 2020-06-22 09:20:43 -03:00
Germano Cavalcante
e2fc9a88bc 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: https://developer.blender.org/D3440
2020-06-22 09:08:02 -03:00
Bastien Montagne
85c6f0b472 LibOverride: Add CacheFile properties as overridable. 2020-06-22 14:03:39 +02:00
Damien Picard
961fa2251e External Player: update DJV to version 2 2020-06-22 21:34:56 +10:00
Campbell Barton
c877c3b8f6 Cleanup: remove workaround for boost 1.46
Part of D8055 by @pioverfour
2020-06-22 21:34:56 +10:00
Campbell Barton
3d570f7e1f Cleanup: remove blender 2.4 reference in animation playback 2020-06-22 21:34:56 +10:00
Brecht Van Lommel
99436acde8 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: https://developer.blender.org/D8015
2020-06-22 13:28:01 +02:00
Brecht Van Lommel
2c41c8e94f 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: https://developer.blender.org/D8014
2020-06-22 13:28:01 +02:00
207338bb58 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: https://developer.blender.org/D8013
2020-06-22 13:28:01 +02:00
Brecht Van Lommel
d1ef5146d7 Cycles: remove SIMD BVH optimizations, to be replaced by Embree
Ref T73778

Depends on D8011

Maniphest Tasks: T73778

Differential Revision: https://developer.blender.org/D8012
2020-06-22 13:28:01 +02:00
Brecht Van Lommel
1de0e13af6 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: https://developer.blender.org/D8011
2020-06-22 13:28:01 +02:00
Brecht Van Lommel
fed101a7be 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: https://developer.blender.org/D8010
2020-06-22 13:28:01 +02:00
Brecht Van Lommel
c7d940278b 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

Subscribers:
2020-06-22 13:28:01 +02:00
Brecht Van Lommel
e50f1ddc65 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
2020-06-22 13:27:37 +02:00
Brecht Van Lommel
54e3487c9e Cleanup: remove task pool stop() and finished() 2020-06-22 13:06:47 +02:00
Brecht Van Lommel
b10b7cdb43 Cleanup: use lambdas instead of functors for task pools, remove threadid 2020-06-22 13:06:47 +02:00
Brecht Van Lommel
d8c2092b15 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.
2020-06-22 13:06:47 +02:00
Brecht Van Lommel
ace3268482 Cleanup: minor refactoring around DeviceTask 2020-06-22 13:06:47 +02:00
Brecht Van Lommel
b7c34c889b Cleanup: use move semantics for task pool functions 2020-06-22 13:06:47 +02:00
Brecht Van Lommel
f9d138be51 Cleanup: compiler warning 2020-06-22 13:06:47 +02:00
Bastien Montagne
8ffb006077 Add undo step to Alembic and Collada importers...
Re T77754.
2020-06-22 13:06:16 +02:00
Germano Cavalcante
c309177edd Fix initialization of Edge Slide with Single Side
It was not being initialized.
Error introduced in cf42721fe28f
2020-06-22 07:54:36 -03:00
Germano Cavalcante
ba97da21ac Transform: Simplify and rearrange mirror code
No real functional changes.
2020-06-22 07:54:36 -03:00