Commit Graph

98073 Commits

Author SHA1 Message Date
Patrick Mours
a9644c812f Cycles: Use pre-compiled PTX kernel for older generation when no matching one is found
This patch changes the discovery of pre-compiled kernels, to look for any PTX, even if
it does not match the current architecture version exactly. It works because the driver can
JIT-compile PTX generated for architectures less than or equal to the current one.
This e.g. makes it possible to render on a new GPU architecture even if no pre-compiled
binary kernel was distributed for it as part of the Blender installation.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8332
2020-07-20 19:25:27 +02:00
Bastien Montagne
a5ded0720c Fix (unreported) broken deletion of Shapekeys alongside their owner ID.
Trying to get shape key pointer after having unlinked its owner from
Main data-base is rather useless... So those shapekeys ended up never
being deleted.
2020-07-20 19:18:45 +02:00
Bastien Montagne
bb63ce9839 Fix (unreported) bad handling of shapekeys when applying override rules.
We need to do a full proper swap of those shape keys as well, previous
code ended up breaking relationships between data-blocks...
2020-07-20 19:18:45 +02:00
Sebastián Barschkis
62a819202e Fluid: Refactored smoke noise system
This refactor is in response to reports in which the adaptive domain with noise caused a crash (e.g. T79009). It should also fix issues where the smoke appeared to be cut off when using the adaptive domain together with noise. It is also possible that some of these changes improve the lines issue from T74559.
2020-07-20 18:35:52 +02:00
Adrian Newton
7d85495ab9 UI: Fix File Broswer filter checkbox not connected to label
Differential Revision: https://developer.blender.org/D8168

Reviewed by: Hans Goudey, Julian Eisel
2020-07-20 17:36:43 +02:00
Clément Foucault
4432209849 Fix T78321 Eevee: Motion blur crash rendering animation with high steps count
This was caused by `BPy_*_ALLOW_THREADS` being used when it shouldn't.

Implemented the simple fix suggested by @brecht :

> The simplest solution may be to ensure that Python stuff is only done
> when called through the RNA API, and not when Eevee calls it directly.
2020-07-20 17:23:28 +02:00
Bastien Montagne
7484e45297 Fix T78960: 2.83.2 not opening a 2.82a project correctly.
That project cannot be opened correctly ayway, it has recursive
collections intanciating themselves...

But at least now we have a check at startup to detect and 'fix' those
nasty cycles in collections.
2020-07-20 17:04:16 +02:00
Jacques Lucke
ccc2a7996b BLI: add typedefs for containers that use raw allocators
Those are useful when you have to create containers with static
storage duration. If those would use Blender's guarded allocator,
it would report memory leaks, that are not actually leaks.
2020-07-20 16:03:14 +02:00
Bastien Montagne
ed184050b6 Fix T78958: Library Override crash: undo make local. 2020-07-20 15:36:31 +02:00
Jacques Lucke
4f4af0cbe1 Particles: support removing particles during the simulation
This still cannot be controlled by the user. Currently, all particles are
killed after two seconds
2020-07-20 15:31:05 +02:00
Antonio Vazquez
9016a29f19 Fix T79107: Crash changing brush size in GPencil sculpt
Reviewed By: fclem

Maniphest Tasks: T79107

Differential Revision: https://developer.blender.org/D8353
2020-07-20 15:23:00 +02:00
Jacques Lucke
230f7d79ce Fix signed/unsigned comparison 2020-07-20 14:04:09 +02:00
Campbell Barton
cbf2278266 Fix T79075: Tool popup fails with experimental vertex colors enabled
Register key-maps from tools in functions.
2020-07-20 21:55:48 +10:00
Germano Cavalcante
ac5f011e9c Fix T70455: Knife Tool failing to cut edges
Analyzing the cuts, the points shown in the viewport (indicating the
previous and current cuts) do not correspond to the final cuts.

Sometimes a point, even snapped to a vert, is a point that cuts an edge and
sometimes a point, even snapped to an edge, is a point that cuts only the face.

This is because the detection of snapping vertices from mouse is different
from the "snap" that detects vertices that are cut.

So small projection inaccuracies can result in detection failures.

The solution for this is simply to confirm the cuts whose vertices
indicate the `prev` ou and `cur` point.

The tolerance distance does not need to be calculated in these cases.
2020-07-20 08:52:11 -03:00
Sybren A. Stüvel
33ad95b677 Animation: Fix MSVC warning about C incompatibility of AnimationEvalContext
Thanks @JacquesLucke for pointing this out.

No functional changes.
2020-07-20 13:14:00 +02:00
Jacques Lucke
579b180053 BLI: add Vector/Array.fill methods 2020-07-20 13:02:10 +02:00
Jacques Lucke
8cbbdedaf4 Refactor: Update integer type usage
This updates the usage of integer types in code I wrote according to our new style guides.

Major changes:
* Use signed instead of unsigned integers in many places.
* C++ containers in blenlib use `int64_t` for size and indices now (instead of `uint`).
* Hash values for C++ containers are 64 bit wide now (instead of 32 bit).

I do hope that I broke no builds, but it is quite likely that some compiler reports
slightly different errors. Please let me know when there are any errors. If the fix
is small, feel free to commit it yourself.
I compiled successfully on linux with gcc and on windows.
2020-07-20 12:16:20 +02:00
Sybren A. Stüvel
686ab4c940 T77086 Animation: Passing Dependency Graph to Drivers
Custom driver functions need access to the dependency graph that is
triggering the evaluation of the driver. This patch passes the
dependency graph pointer through all the animation-related calls.

Instead of passing the evaluation time to functions, the code now passes
an `AnimationEvalContext` pointer:

```
typedef struct AnimationEvalContext {
  struct Depsgraph *const depsgraph;
  const float eval_time;
} AnimationEvalContext;
```

These structs are read-only, meaning that the code cannot change the
evaluation time. Note that the `depsgraph` pointer itself is const, but
it points to a non-const depsgraph.

FCurves and Drivers can be evaluated at a different time than the
current scene time, for example when evaluating NLA strips. This means
that, even though the current time is stored in the dependency graph, we
need an explicit evaluation time.

There are two functions that allow creation of `AnimationEvalContext`
objects:

- `BKE_animsys_eval_context_construct(Depsgraph *depsgraph, float
  eval_time)`, which creates a new context object from scratch, and
- `BKE_animsys_eval_context_construct_at(AnimationEvalContext
  *anim_eval_context, float eval_time)`, which can be used to create a
  `AnimationEvalContext` with the same depsgraph, but at a different
  time. This makes it possible to later add fields without changing any
  of the code that just want to change the eval time.

This also provides a fix for T75553, although it does require a change
to the custom driver function. The driver should call
`custom_function(depsgraph)`, and the function should use that depsgraph
instead of information from `bpy.context`.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D8047
2020-07-20 11:51:09 +02:00
Antonio Vazquez
6fbfa522e6 GPencil: Fix unreported wrong SNAP menu in Point Context menu
It was using the mesh menu instead of GPencil one.
2020-07-20 11:10:47 +02:00
Antonio Vazquez
e4daac84b6 Fix T79094: GPencil Snap menu with Shift+S not pie menu
In order to keep UI consistency, now it's a pie menu.
2020-07-20 11:07:28 +02:00
Campbell Barton
eb5cd628bd Fix T79089: Crash changing themes
Regression from 2840782d84.
2020-07-20 17:52:58 +10:00
Campbell Barton
b219ae4498 Fix T79077: Off-screen rendering ignores shading argument
Thumbnails used the 3D view shading mode when a camera wasn't used.
2020-07-20 11:32:26 +10:00
Campbell Barton
615af4e239 DRW: draw hook relationship lines
This wasn't added back from 2.7x, making "Recenter Hook" applier to
do nothing.
2020-07-20 09:25:26 +10:00
Campbell Barton
9db4e44961 DRW: overlay engine support for drawing isolated points
This matches similar functionality for drawing lines.
2020-07-20 09:19:50 +10:00
Yevgeny Makarov
78e40ad21f UI: use "Recalculate" instead of "Recalc" 2020-07-20 07:23:16 +10:00
Clément Foucault
6247ec7827 Fix T78977 GPU: blf fonts are not gamma corrected 2020-07-19 23:00:22 +02:00
Jacques Lucke
3884d78e49 Particles: Make it easier to add attributes internally 2020-07-19 22:06:35 +02:00
Jacques Lucke
5063820c9b Particles: Emit particles over time
This adds a basic internal emitter for every particle simulation.
The emitter cannot be controlled by the user yet. That will
come next.
2020-07-19 13:58:58 +02:00
Campbell Barton
8c90910dcc Fix T66937: Blank view on navigation with auto-deph & large clip-end 2020-07-19 21:27:13 +10:00
Campbell Barton
ccd2af43b3 Fix T78624: Crash running operators from Python in background mode 2020-07-19 18:59:14 +10:00
Campbell Barton
52a7c724b5 Cleanup: unused argument warning 2020-07-19 17:43:59 +10:00
Campbell Barton
71d0f6f896 Cleanup: spelling 2020-07-19 17:37:02 +10:00
Hans Goudey
b8601b64c7 Correct Blender version after last commit
c08d847488 incremented the patch version instead of the file subversion
for versioning code when adding new options. This commit resets the patch
version and instead bumps the file subversion.
2020-07-18 12:26:32 -04:00
Harley Acheson
c08d847488 UI: Status Bar Statistics and Other Options
Status Bar can show scene statistics, memory usage, version, etc set by context menu. Part two of T75672.

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

Reviewed by Julian Eisel
2020-07-18 07:49:25 -07:00
Jacques Lucke
fe49e4139c Simulation: cleanup deduplicating attribute input nodes 2020-07-18 10:51:38 +02:00
Jacques Lucke
9eaa48f520 Simulation: cleanup how data inputs are handled 2020-07-18 10:19:26 +02:00
Jacques Lucke
fd67b521b9 Simulation: deduplicate code that finds particle simulation names 2020-07-18 10:08:53 +02:00
Jacques Lucke
63db971a00 Simulation: fix memory leak 2020-07-18 10:06:36 +02:00
Campbell Barton
1dd381828f UV: edge-ring selection support
Matches edit-mesh edge-ring selection.
2020-07-18 16:09:17 +10:00
Campbell Barton
c48ccb38cb BMesh: utility for checking shared edge with limit argument 2020-07-18 15:54:04 +10:00
Campbell Barton
4e73ba2cab Cleanup: split UV loop select out of mouse picking function 2020-07-18 15:43:37 +10:00
Campbell Barton
f24ccedc18 UV: utility functions for sticky select setting
Support setting vert/edge/face selection, using the sticky option
without performing a second loop over all faces to flush selection.

Existing selection code didn't take advantage of BMesh connectivity
since the logic is from before BMesh was included.
2020-07-18 15:37:33 +10:00
Campbell Barton
016253a648 Cleanup: spelling 2020-07-18 14:27:53 +10:00
Campbell Barton
fd08d6f391 Cleanup: unused warning 2020-07-18 14:27:30 +10:00
Campbell Barton
d99b343b31 Cleanup: UV selection
Remove commented code, move penalty calculation into own function.
2020-07-18 14:15:02 +10:00
Clément Foucault
d9228c557b Cleanup: KnifeTool: Replace glPolygonOffset by GPU_polygon_offset 2020-07-18 03:46:12 +02:00
Clément Foucault
4c28b1c74e Cleanup: GPU: Encapsulate clipDistances
This also remove some non functionnal state changes that were left
from legacy code.
2020-07-18 03:43:52 +02:00
Clément Foucault
59975b0adf Cleanup: WM: Encapsulate stereo draw buffers binding 2020-07-18 03:43:52 +02:00
Clément Foucault
8dfc31f61f Cleanup: GPU: Encapsulate glProvokingVertex 2020-07-18 03:43:52 +02:00
Clément Foucault
264b1e1e15 Cleanup: GPU: Encapsulate glFrontFace 2020-07-18 03:43:52 +02:00