Commit Graph

97904 Commits

Author SHA1 Message Date
Jacques Lucke eb5fb1741d Cleanup: don't end description with a '.' 2020-07-07 20:29:35 +02:00
Jacques Lucke 8713109212 Cleanup: fix typo 2020-07-07 20:27:34 +02:00
Jacques Lucke 902ee4d13c Functions: cleanup loop that traverses the MFNetwork 2020-07-07 19:46:10 +02:00
Jacques Lucke 22158162ef Functions: add generic functions that output constants 2020-07-07 19:34:35 +02:00
Jacques Lucke f4633cf46c BLI: simplify copy constructor of vector 2020-07-07 19:16:31 +02:00
Jacques Lucke 67042aa6a1 Functions: extend multi-function network api 2020-07-07 18:45:34 +02:00
Jacques Lucke adfae89f96 BLI: provide access to underlying node in dot exporter 2020-07-07 18:40:42 +02:00
Jacques Lucke a8627ea66d Functions: Add debug print and destruct callback to CPPType 2020-07-07 18:39:24 +02:00
Jacques Lucke 4990e4dd01 Nodes: Generate multi-function network from node tree
This adds new callbacks to `bNodeSocketType` and `bNodeType`.
Those are used to generate a multi-function network from a node
tree. Later, this network is evaluated on e.g. particle data.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8169
2020-07-07 18:23:33 +02:00
Clément Foucault ff97545c50 Fix T75943 EEVEE: Cubemaps shows black
Caused by faulty driver implementation. Force fallback method.
2020-07-07 18:38:21 +02:00
Hans Goudey 1e2ff4f81b Cleanup: Add braces for clang tidy 2020-07-07 11:10:42 -04:00
Sergey Sharybin 0edf2fc128 BLI: Correct spin lock definition
The MSVC atomic function is defined for an unsigned type.

Not sure why this became an issue after switch to TBB by default,
maybe some CFLAGS changed to be more strict after that.
2020-07-07 16:51:03 +02:00
Germano Cavalcante dad3de89dc Fix: remove accidental code
`v1` and `v2` are already set.
2020-07-07 11:27:23 -03:00
Sergey Sharybin d352902758 Make deps: Use own nasm for ffmpeg and x264
Fixes the warning: building for macOS, but linking in object file

Differential Revision: https://developer.blender.org/D8235
2020-07-07 16:26:47 +02:00
Sergey Sharybin 1e3c0b4b03 Make deps: Compile own version of nasm for Apple
The upstream version of nasm does not put version information to the
generated object files, which makes linker to show the following
warning:

  building for macOS, but linking in object file

Using own patched version of nasm which puts required information to
the object file, making linker happy.

The plan is to either streamline the patch and provide it to the
upstream, or, it that takes too long, get an independent fix from the
upstream.
2020-07-07 16:26:13 +02:00
Jeroen Bakker 202e7ccaae Fix T77455: Blender Freezes when using the 3d Scale Gizmo
Issue is reported on Linux ith Intel HD6xx iGPU. Inside
`gpu_select_sample_query.c` the call to `glGetQueryObjectuiv` froze. After
bisecting this lead to the polyline shader. When using a 3d color shader
in stead of the polyline shader during selection seems to fix the issue.

Other parts of blender might also be effective, but I wasn't able to
freeze blender in these areas. When it does, we might want to add
a similar work-around to button2d, cage2d, cage3d & move3d, navigate.

Backport this patch to 2.83.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8217
2020-07-07 16:22:05 +02:00
Sergey Sharybin d1dcd2b464 BLI: Fix mistake in SpinLock TBB migration
Copy-paste mistake.
2020-07-07 16:17:58 +02:00
Germano Cavalcante 20558848d3 Optimization: use `BLI_bvhtree_intersect_plane` to detect faces that will be affected by the knife tool
The knife code currently calls the `BLI_bvhtree_overlap` function that
tests the overlap between the mesh tree and an AABB that encompasses the
points projected in the clip_start, clip_end and or clip_planes of the
view.

This resulted in many false positives since the AABB is very large.
Often all the triangles "overlapped".

The solution was to create a new function that actually tests the
intersection of AABB with a plane.

Even not considering the clip_planes of the view, this solution is more
appropriate than using overlap.

Differential Revision: https://developer.blender.org/D8229
2020-07-07 10:55:57 -03:00
Clément Foucault 630c6226e2 Fix T78307 UI: Drawing artifacts in the Blender UI on macOS
This was due to a bad driver which was not respecting this bit of the
specification:

`If the current primitive does not originate from an instanced draw command, the value of gl_InstanceID is zero.`
2020-07-07 16:26:01 +02:00
Patrick Mours 737bd549b6 Cycles: Add support for native OptiX curve primitive
This patch adds support for the curve primitive from OptiX to Cycles. It's currently hidden
behind a debug option, since there can be some slight rendering differences still (because no
backface culling is performed and something seems off with endcaps). The curve primitive
was added with the OptiX 7.1 SDK and requires a r450 driver or newer, so this also updates
the codebase to be able to build with the new SDK.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8223
2020-07-07 15:39:02 +02:00
Brecht Van Lommel 95f0f31279 Fix T78692: improve UI regarding the effect of the denoiser on denoising passes
It wasn't obvious that the choice of Cycles denoiser also generates different
denoising data passes for compositing.
2020-07-07 15:12:41 +02:00
Brecht Van Lommel a394aac8b4 Fix T78666: Cycles non-uniformly scaled hair renders wrong for static objects
Don't apply the matrix transform optimization in this case, curve points and
radius can't represent non-uniform scale the way is possible with triangle
meshes and vertices.

This would cause abrupt change if objects had e.g. motion blur in one frame
and not in the next.
2020-07-07 15:08:21 +02:00
Sybren A. Stüvel 98bee41c8a IO: Reversed persistent ID order in exports to Alembic and USD
Each duplicated (a.k.a. instanced) object has a Persistent ID, which
identifies a dupli within the context of its duplicator. This ID
consists of several numbers when there are nested duplis (for example a
mesh instancing empties on its vertices, where each empty instances a
collection). When exporting to Alembic/USD, these are used to uniquely
name the duplicated objects in the export.

This commit reverses the order of the persistent ID numbers, so that the
first number identifies the first level of recursion. This produces
trees like this:

    ABC
     `--Triangle
         |--Triangle
         |--Empty-1
         |    `--Pole-1-0
         |        |--Pole
         |        `--Block-1-1
         |            `--Block
         |--Empty
         |    `--Pole-0
         |        |--Pole
         |        `--Block-1
         |            `--Block
         |--Empty-2
         |    `--Pole-2-0
         |        |--Pole
         |        `--Block-2-1
         |            `--Block
         `--Empty-0
             `--Pole-0-0
                 |--Pole
                 `--Block-0-1
                     `--Block

It is now clearer that `Pole-2-0` and `Block-2-1` are instanced by
`Empty-2`. Before this commit, they would have been named `Pole-0-2` and
`Block-1-2`.
2020-07-07 14:30:55 +02:00
Sybren A. Stüvel 70b1c09d7a IO: Fix bug exporting dupli parent/child relations
Exporting a scene to USD or Alembic would fail when there are multiple
duplicates of parent & child objects, duplicated by the same object. For
example, this happens when such a hierarchy of objects is contained in a
collection, and that collection is instanced multiple times by mesh
vertices. The problem here is that the 'parent' pointer of each
duplicated object points to the real parent; Blender would not figure
out properly which duplicated parent should be used.

This is now resolved by keeping track of the persistent ID of each
duplicated instance, which makes it possible to reconstruct the
parent-child relations of duplicated objects. This does use up some
memory for each dupli, so it could be heavy to export a Spring scene
(with all the pebbles and leaves), but it's only a small addition on top
of the USD/Alembic writer objects that have to be created anyway. At
least with this patch, they're created correctly.

Code-wise, the following changes are made:

- The export graph (that maps export parent to its export children) used
  to have as its key (Object, Duplicator). This is insufficient to
  correctly distinguish between multiple duplis of the same object by
  the same duplicator, so this is now extended to (Object, Duplicator,
  Persistent ID). To make this possible, new classes `ObjectIdentifier`
  and `PersistentID` are introduced.
- Finding the parent of a duplicated object is done via its persistent
  ID. In Python notation, the code first tries to find the parent
  instance where `child_persistent_id[1:] == parent_persistent_id[1:]`.
  If that fails, the dupli with persistent ID `child_persistent_id[1:]`
  is used as parent.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8233
2020-07-07 13:01:07 +02:00
Sergey Sharybin f2175e06a7 Mae deps: Ensure Brotli is disabled for FreeType
We don't need it and it was optionally enabled, causing Blender to fail
to link on certain configuration (when Brotli is installed via Homebrew
for example).
2020-07-07 12:44:12 +02:00
Jacques Lucke 02cd159539 Cleanup: add comment explaining operator delete 2020-07-07 12:31:25 +02:00
Sybren A. Stüvel cc311e4a52 IO: print export name instead of object name in debug export graph output
This is just a change in `AbstractHierarchyIterator::debug_print_export_graph()`
to aid in debugging. It'll make it possible to distinguish between
different duplicates of the same object.

No functional changes to Blender itself.
2020-07-07 12:02:49 +02:00
Jacques Lucke 5761cb9ee2 Guarded Allocator: add missing operator delete
This resolves warning C4291 on windows.
2020-07-07 11:52:45 +02:00
Johan Walles 80fe5e1b15 UI: Add units to motion tracking solve errors
The unit being "pixels".

Before this change the solve errors were unitless in the UI.

With this change in place, the UI is now clear on that the unit of the
reprojection errors is pixels (px).

Differential Revision: https://developer.blender.org/D8000
2020-07-07 11:22:12 +02:00
Sergey Sharybin 6d9a6f12b3 Make deps: Fix compilation error of Python on macOS
The configuration was confused about gettext installed via Homebrew
and isysroot passed to Python's compilation but not to test programs.

After this change `import gettext` still works, but it is unclear how
to test it further,

Differential Revision: https://developer.blender.org/D8231
2020-07-07 11:17:47 +02:00
Jacques Lucke 955abbeff2 Fix sign conversion error 2020-07-07 09:01:01 +02:00
Philipp Oeser e233ee1c1f Fix T78186: Dyntopo panel error with tools that dont have a brush
Maniphest Tasks: T78186

Differential Revision: https://developer.blender.org/D8120
2020-07-07 10:38:56 +02:00
Jacques Lucke 19d4e265b6 Cleanup: remove redundant comments
Searching in these files for "_as" will reveal a comment at the
top, that explains what these methods are for. There is no need
to duplicate that knowledge all over the place.
2020-07-07 10:35:55 +02:00
Campbell Barton 6e609f0eb0 Cleanup: use doxy comments 2020-07-07 17:52:05 +10:00
Campbell Barton 62774baded UI: add merge/split menus
This makes the menus and keymap match the edit-mesh
(M for merge, Alt-M for split).
2020-07-07 17:52:05 +10:00
Sergey Sharybin d212b3dc43 Make deps: Fixes for macOS platform
Set of fixes which had to be made in order to have dependencies built
on own laptop:

- Require bison as a dependent software. It is required by ISPC.

  On macOS it is required to be installed via Homebrew. This is because
  Bison from Xcode toolchain is too old.

- Made sure Boost is compiled using clang.

  Without this gcc was used, and some unsupported command line argument
  was passed to it.

- Modify OGG in a way which does in fact pull fixed sized types.
  They are defined in stdint.h.

  Without this fix FFmpeg will not detect presence of OGG because the
  test program fails to compile.

- Force disable zstd compression and make wepb optional for the TIFF
  library. Without this TIFF might pick up development libraries from
  Homebrew.

Differential Revision: https://developer.blender.org/D8221
2020-07-07 09:31:46 +02:00
Campbell Barton b28683b8b5 Cleanup: remove unused arguments 2020-07-07 16:04:10 +10:00
Campbell Barton 0c58970da7 Cleanup: spelling 2020-07-07 12:49:13 +10:00
Campbell Barton ad0edc626d Cleanup: unused World struct members linfac, logfac 2020-07-07 12:44:20 +10:00
Hans Goudey e20171e59f Fix build error with tests for removed functions
These GHash functions were removed in 12817083ec,
so the tests should be removed too.
2020-07-06 16:39:28 -04:00
Hans Goudey d557f05502 Cleanup: Use bool instead of int 2020-07-06 16:07:54 -04:00
Hans Goudey 053e0c0af3 UI: Add shortcuts for shader effect panels
Only the delete shortcut applies here, although the move up and down
operators can optionally be assigned in the keymap.

See rB1fa40c9f8a81 for more details and rB5d2005cbb54b for the
grease pencil modifier panel implementation, which is the same.
2020-07-06 15:35:21 -04:00
Germano Cavalcante 12817083ec Cleanup: Use the BLI_edgehash API in the sewing simulation of cloths
Also remove the code in the ghash that is no longer used.

This change simplifies the existing code.

Differential Revision: https://developer.blender.org/D8219
2020-07-06 14:44:30 -03:00
Hans Goudey a856de700b Fix T77730: ShaderFx Missing Update Notifier
This adds a notification type for shaderfx so the properties editor can
be properly notified to redraw.

Another possible solution would be to also redraw the shaderfx tab
 with a ND_MODIFIER update, but this solution allows us to avoid
 some unecessary redraws too. There were no existing cases of
ND_OBJECT | NC_MODIFIER updates, so those cases were
removed from buttons_area_listener.

Differential Revision: https://developer.blender.org/D8159
2020-07-06 13:17:07 -04:00
Jacques Lucke f6f4043924 BLI: add methods to lookup a stored key in a set 2020-07-06 17:59:27 +02:00
Patrick Mours 1562c9f031 Fix OptiX viewport denoising not working when rendering scene (without OptiX) that uses unsupported features
Denoising devices do not need to load the full feature set of kernels, so only activate the denoising
feature for them (so that it is possible to use features that are supported by the render devices, but
not the denoising devices).
2020-07-06 17:33:04 +02:00
Bastien Montagne aabfd2fb9b Cleanup: readfile: remove old deprecated OldNewMap for runtime caches. 2020-07-06 16:55:38 +02:00
Bastien Montagne ee3eba902a Runtime cache preservation during undo: add support for nodes and embedded IDs. 2020-07-06 16:55:38 +02:00
Sybren A. Stüvel bfc644dcfb Reduce `DupliObject::persistent_id` from 16 to 8 items
For historical reasons, `DupliObject::persistent_id` was of size
`2*MAX_DUPLI_RECUR`. These reasons are now gone, and the persistent ID
always gets exactly one array element for every dupli-recursion.

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

Reviewed by: brecht
2020-07-06 16:52:28 +02:00
Bastien Montagne 0b07f9b717 Fix T78608: Memory leak in Material properties: "Data from SCE".
Caused by recent own refactor of cache presevation handling in readfile,
EEVEE's lightcache are weird birds that can also be saved in .blend
files, need a special handling for those 'persistent' caches...
2020-07-06 15:09:39 +02:00