Commit Graph

70738 Commits

Author SHA1 Message Date
Campbell Barton
8ddaa6a4e2 Merge branch 'master' into blender2.8 2017-08-01 10:38:36 +10:00
Campbell Barton
a372638a76 Cleanup: use static vars where appropriate 2017-08-01 09:06:34 +10:00
Campbell Barton
2b7edb77c9 Fix fcurve color assignment 2017-08-01 08:27:35 +10:00
Campbell Barton
b425e94381 Correct accidental variable declaration 2017-08-01 07:55:01 +10:00
becb413f29 Fix T52224: auto IK not respecting length, after recent bugfix. 2017-07-31 19:22:03 +02:00
66110c6b98 Code cleanup: fix warning with clang. 2017-07-31 19:07:29 +02:00
Bastien Montagne
f815aa01eb Fix T52232: Crash in RNA_enum_from_value while inspecting compositor image node properties in outliner.
Bug was in RNA nodes code actually, itemf functions shall never, ever
return NULL!

Note that there were other itemf functions there that were potentially
buggy. Also harmonized a bit their code.
2017-07-31 16:51:43 +02:00
Bastien Montagne
b6cb7b2c92 Fix two issues with recent changes to number display while editing them.
* Numbers with units (especially, angles) where not handled correctly
regarding number of significant digits (spotted by @brecht in T52222
comment, thanks).
* Zero value has no valid log, need to take that into account!
2017-07-31 15:43:14 +02:00
Clément Foucault
b71366801e Eevee: SSR: Change clamp to a real clamp and add Max Roughness.
Clamp will now works as in Cycles.

Max roughness limit ssr to a certain roughness level: for noise / performance tweaking.
2017-07-31 15:18:38 +02:00
Clément Foucault
1be1600c32 Eevee: Draw background after depth prepass.
Reduce overdraw. 0.4ms goes to 0.01ms if background is completely occluded.
2017-07-31 15:18:38 +02:00
Clément Foucault
683e31fd80 Eevee: SSR: Rewrote the raytracing algorithm.
It now uses a quality slider instead of stride.
Lower quality takes larger strides between samples and use lower mips when tracing rough rays.

Now raytracing is done entierly in homogeneous coordinate space. This run much faster.
Should be fairly optimized. We are still Bandwidth bound.

Add a line-line intersection refine.
Add a ray jitter between the multiple ray per pixel to fill some undersampling in mirror reflections.

The tracing now stops if it goes behind an object. This needs some work to allow it to continue even if behind objects.
2017-07-31 15:18:38 +02:00
Campbell Barton
39e1518d41 Fix glitch updating manipulator after undo
Running undo would notify manipulators to refresh,
but this still allowed for events in the queue to be handled,
where manipulators could be drawn for selection before
their refresh callback runs.

This made Python manipulators raise exceptions
about referencing invalid data (or crash).

Now tag manipulator update on file load (including undo)
and ensure the refresh callback runs
before drawing manipulator selection.

Also split manipulator map refresh flag in two since selection doesn't
perform the same operations as regular drawing.
2017-07-31 14:35:10 +10:00
Campbell Barton
3b15ff3fb4 Cleanup: use enum typedef for manipulator drawstep 2017-07-31 13:15:02 +10:00
Campbell Barton
538b191a03 Correct last commit, for-loop included NULL check 2017-07-31 11:39:17 +10:00
Campbell Barton
ac2b1663ef Cleanup: remove next/prev from manipulator map 2017-07-31 11:26:03 +10:00
Campbell Barton
18773f3f15 Fix manipulator Python API crash w/ undo
Split up manipulator free & unlink, so freeing window data doesn't
run callbacks that might use freed data.
2017-07-31 06:45:05 +10:00
Campbell Barton
0467443930 Fix manipulator keymap initialization
Update flag was cleared before being checked
when registering after load.
2017-07-31 04:47:24 +10:00
Campbell Barton
c90a3af879 Manipulator: Check we don't add multiple times 2017-07-30 15:47:57 +10:00
Campbell Barton
49c0ad1188 Revert "Fix manipulator handles getting added each refresh"
This reverts commit 122706db9cd23c88775474750e99b57e74a3b9e5.

Would loose manipulators, will check for duplicates instead.
2017-07-30 15:38:32 +10:00
Campbell Barton
367ec386d1 BLI_memiter: minor cleanup 2017-07-30 14:23:08 +10:00
Campbell Barton
be97238308 DwM: use BLI_memiter for draw storage & iteration
This will only be noticeable for drawing many instances.

In contrived use-case with many instances, and `USE_PROFILE` disabled
this can close to double playback FPS.

The option to disable this is left in the code in case we want to
debug memory use.

See D2756 for details.
2017-07-30 02:26:36 +10:00
Campbell Barton
71388b094f DwM: add ability to disable the timer
This interferes with benchmarking draw times,
so this makes it easy to turn off.
2017-07-30 01:31:36 +10:00
Campbell Barton
913d8ec608 BLI_memiter: Small API for many small allocations
- Each allocation can be a different size
  (but should be smaller than the chunk size).
- Result can be looped over in order of allocation.
- Allocations are aligned to pointer size to avoid unaligned reads.
2017-07-30 00:08:17 +10:00
Aleksandr Zinovev
09eac0159d Property path generation fixes 2017-07-29 15:23:01 +03:00
Campbell Barton
277dc47eea Remove volatile, causing issues w/ GCC/ubsan
Should remove from master since its workaround for Cygwin
but too close to release.
2017-07-29 08:58:11 +10:00
Campbell Barton
1ee11b5085 Merge branch 'master' into blender2.8 2017-07-29 08:49:34 +10:00
Campbell Barton
fb1cd7648f Cleanup: quiet picky ubsan warnings 2017-07-29 08:42:32 +10:00
Campbell Barton
361acb6991 Cleanup: multistatement-macros warning 2017-07-29 08:21:01 +10:00
Campbell Barton
393ba0cf16 Cleanup: multistatement-macros warning 2017-07-29 08:18:20 +10:00
Campbell Barton
0e26707bce Merge branch 'master' into blender2.8 2017-07-29 06:44:04 +10:00
Campbell Barton
214bbd4c02 Replace magic numbers with deprecated names
The names aren't meaningful but means it wont
accidentally use valid names.

Also remove textured-font setting
2017-07-29 06:27:40 +10:00
Campbell Barton
f3782c0a9e Fix T52195: Sculpt from Python fails
When calling sculpt from Python,
setting 3D 'location' but not 2D 'mouse' stopped working in 2.78.

Now check if the operator is running non-interactively and
skip the mouse-over check.
2017-07-29 06:05:43 +10:00
Campbell Barton
e2a7e1e494 WM: OP_IS_INVOKE was being incorrectly set
Calling an operator with EXEC_* context would still set the invoke flag.
2017-07-29 05:44:58 +10:00
Campbell Barton
87d5e34453 Fix T52213: Enum drivers no longer work
Regression in D1812: PyDriver variables as Objects

Taking the Python representation is nice in general
but for enums it would convert them into strings,
breaking some existing drivers.
2017-07-29 02:39:16 +10:00
Campbell Barton
c558763ef5 Merge branch 'master' into blender2.8 2017-07-29 01:46:27 +10:00
Campbell Barton
e038830650 Resolve T45301 by adding option for old behavior
Some users really liked previous behavior,
so making it an option.

Cursor Lock Adjustment can be disabled to give something close to
2.4x behavior of cursor locking.

When lock-adjustment is disabled placing the cursor the view.
This avoids the issue reported in T40353
where the cursor could get *lost*.
2017-07-29 01:37:51 +10:00
Campbell Barton
2eb2655181 Cleanup: clear deprecated UI flags
Also adds cursor-lock flag, to be used in next commit.
2017-07-29 01:28:58 +10:00
Luca Rood
9b22dbcc0d Fix T52156: Hair dynamics broken with density texture
Even strands that were excluded by the density texture were being added
to the DM passed to cloth, but these ended up having some invalid data,
because they were not fully constructed.

This simply excludes `UNEXISTED` particles from the DM generation, as
would be expected.
2017-07-28 15:30:26 +02:00
Sergey Sharybin
e39dc48bd5 Fix crash when duplicating object
This fixes null pointer check fiasco.
2017-07-28 13:02:20 +02:00
Bastien Montagne
05f377805b Fix T52148: Point Density Texture ID User decrement error related to the Object field.
Note that fix is not perfect, systematically make refcounting of all IDs
assigned to node's id pointer, which breaks the 'do not refcount
scene/object/text datablocks' principle...

But besides that principle being far from ideal in general, it becomes
pretty much impossible to apply when using //generic// ID pointer,
unless we add some kind of type data to that pointer somehow.

So for now, better to live with that, than having broken usercount.
2017-07-28 12:43:06 +02:00
Sergey Sharybin
50cc0aa0d1 Depsgraph: Re-use evaluated mesh across frames and remove time dependency from all CoW components
This commit is a work forward having less updates during playback, which speeds
things up a lot here. The idea is simple: stop update all copy-on-write
datablocks (which implies full re-evaluation actually) on frame change and
re-use existing evaluated meshes as much as possible.

This brings playback speed to 24 fps on the dino test scene here. Performance
drops down a lot when armature is animated tho, but that's because of need of
tangent space calculation which we can't do much about from just a dependency
graph.

Hopefully this doesn't make copy-on-write too unstable, quick tests here are
surviving fine.
2017-07-28 12:27:34 +02:00
Sergey Sharybin
d41acacc61 Fix T52212: Vgroups doesn't work after Carve Boolean 2017-07-28 11:55:58 +02:00
Bastien Montagne
38eabcb858 Fix potential 'divide-by-zero' in our UI fitting code.
Reported by coverity, better fix even if highly unlikely to happen...
2017-07-28 10:56:41 +02:00
Bastien Montagne
304e5541cb Fix T52208: Using UI_BUT_REDALERT flag for UI_BTYPE_KEY_EVENT buttons crashes Blender.
but pointer was not assigned in that case...
2017-07-28 10:38:47 +02:00
Aaron Carlisle
c694f6e3fa Cleanup: Remove gitignore for api images 2017-07-27 16:04:42 -04:00
Sergey Sharybin
9323182e73 Prevent crash when duplicating object which doesn't have evaluated base properties yet
This mainly happens when copy on write is enabled.
2017-07-27 16:29:45 +02:00
Sergey Sharybin
03d258d613 Copy on write: Prevent crash when duplicating object with particle system
Transform system was using global main, which might have been pointing to a
freed scene layer.
2017-07-27 16:28:16 +02:00
Bastien Montagne
1bd9531fda Fix UI messages... 2017-07-27 15:20:44 +02:00
Sergey Sharybin
549f43e928 Depsgraph: Attempt to keep evaluated mesh when possible
Currently wouldn't make any difference, but required for upcoming work of
getting rid of time dependency for copy-on-write component.
2017-07-27 15:19:37 +02:00
Sergey Sharybin
6ef34525a1 Depsgraph: Cleanup, variable name 2017-07-27 15:19:37 +02:00