Commit Graph

86811 Commits

Author SHA1 Message Date
Campbell Barton 4b3aafd44f BLI_kdtree: refactor boids specific logic into callback
Logic to for boids to avoid head-on collisions was in BLI_kdtree.

Move this into a callback which is now defined in boids.c
so the kdtree code can be kept generic.
2019-03-18 09:40:38 +11:00
Brecht Van Lommel df96455c55 UI: add light/world settings in shader node editor.
Material was already there. Implementation was changed so it's just a
single line of code to adapt a panel to the node editor.
2019-03-17 21:53:13 +01:00
Antonio Vazquez f79ad42808 GPencil: Cleanup extra lines 2019-03-17 20:04:09 +01:00
Antonio Vazquez 6577618d5b GPencil: Changes in Fill and new 3D Cursor View Plane
This commit groups several options that were tested in grease pencil branch:

- Changes to fill algorithms and improves, specially in small areas and stroke corners.
  New options has been added in order to define how the fill is working and internally there are optimizations in detect the small areas in the extremes.

  Kudos to @charlie for coding this fill improvements.

- New 3D cursor view plane option.

  Now it's possible to lock the drawing plane to the 3D cursor and use the 3D cursor orientation. This allows more flexibility when you are drawing and reduce the need to create geometry to draw over surfaces.

- Canvas Grid now can be locked to 3D cursor.
- New option to reproject stroke using 3D cursor.
- Small tweaks and fixes.

Changes reviewed by @pepeland and @mendio
2019-03-17 19:47:56 +01:00
Bastien Montagne 887d052e56 Fix T62570: Append Particles System not working properly.
T62570 and T61796 show that we need two slightly different behaviors in
post-linking collection process:
* For linking, we never want to instantiate indirectly-linked
collections or objects.
* For appending however, since all collections and objects will become
local and hence need instantiation, we want to 'link to scene' all
collections first, better than instantiating the objects in the master
collection opf current scene.
2019-03-17 18:07:13 +01:00
Bastien Montagne 94507a7fa7 Fix T62589: Particle system Instance Collection option fails to set a user for a linked collection.
Forgot to tag properly RNA property in rB439437fa3a44.
2019-03-17 16:02:00 +01:00
Luna Rood 0a25cea2cf Fix T62240: Bleed artifacts with degenerate triangles
This makes degenerate triangles be ignored, as they cause artifacts and
don't contribute to the result anyway. There is an extra cost for
all triangles, to check if they are degenerate. Though not ideal, this
seems to be the safest solution at the moment (see code comments).

This commit also changes the clamp value for the bleed len_fact from 5
to 10, to give good corner results with some sharper angles, considering
they will be rounded later.

A lot of the texture paint initialization code could be optimized
by caching the results throughout the session, instead of rerunning it
for each stroke. Stroke initialization is way too expensive at the
moment, and does many redundant computations.
2019-03-17 15:44:41 +01:00
Jacques Lucke cfd909f184 Fix T62678: Wrong text clipping
There are two issues at play here.
First, BLF_width computed a width that was not wide
enough to actually hold the text.
Second, blf_glyph_calc_rect_test computed an incorrect
rect->xmax when the glyph was moved to the left a bit.
We ignore the overlap on the left, but the right side
should still be adjusted accordingly.
2019-03-17 14:15:26 +01:00
Sergey Sharybin b28bd7c5a4 Cocoa: Fix missing key window after closing "About"
The cause of this issue goes deeper inside of the custom nature of
the event loop. In short, when not using [NSApp run] closing "About"
window does not make previous key window a key again.

The solution is quite similar to other projects, but we only force
key window from handler when closing one appears to be "About" window.
In all other cases we leave it up to Blender's window manager to make
decision and do not interfere with it.

Test plan:
- Open Blender application
- Go to Blender -> About Blender menu item
- Close About window
- Note that Blender's window does not become active again.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4534
2019-03-17 13:24:38 +01:00
Brecht Van Lommel e691929686 Merge branch 'blender2.7' 2019-03-17 12:54:19 +01:00
Howard Trickey 0af22625c9 Fix bl_pyapi_idprop unit test.
Scenes can now have a 'cycles' key when starting, so account for that.
2019-03-17 07:36:26 -04:00
Antonio Vazquez ef66aa2005 GPencil: Cancel all transformations in Draw mode
Actually, when you press G/R/S in Draw mode, the transformations can be done, but this is annoying in draw mode and must be captured an cancel.

This patch capture the transformation and cancel it.

Reviewed by @brecht
2019-03-17 12:20:34 +01:00
Brecht Van Lommel 9d2397c710 Cleanup: remove unused buildbot code. 2019-03-17 12:01:19 +01:00
Brecht Van Lommel 0676badb80 Fix Windows 32bit buildbot trying to use CUDA, should be disabled. 2019-03-17 12:01:19 +01:00
Brecht Van Lommel 7778a1a0a1 Cycles: optimization for constant background colors.
Skip shader evaluation then, as we already do for lights. Less than
1% faster in my tests, but might as well be consistent for both.
2019-03-17 12:01:19 +01:00
Brecht Van Lommel 9c7517fb63 Fix Cycles OpenCL compile waiting unnecessarily for background shader.
Makes preview kernel appear quicker when background color is fixed.
2019-03-17 12:01:19 +01:00
Brecht Van Lommel 9873005ecd Cleanup: simplify kernel features definition.
No functional changes, logic here got too complex after many changes over
the years.
2019-03-17 12:01:19 +01:00
Brecht Van Lommel 2d8aa2e6ad Cleanup: remove unused code. 2019-03-17 11:39:17 +01:00
Brecht Van Lommel 5ad2302413 Fix Cycles not doing versioning for some files saved in 2.80. 2019-03-17 11:39:17 +01:00
Campbell Barton e04d5a8106 Fix string size passed into name prefix function 2019-03-17 21:14:43 +11:00
Campbell Barton 69bf4e5e36 Cleanup: unused variables 2019-03-17 21:14:43 +11:00
Campbell Barton ad9addbf46 Cleanup: unused imports 2019-03-17 21:00:56 +11:00
Campbell Barton a19e78aa2d Cleanup: redundant layer access 2019-03-17 21:00:56 +11:00
Campbell Barton 8214712b19 Cleanup: use braces for BLI_kdtree 2019-03-17 21:00:56 +11:00
Campbell Barton 6cbd2e5c4d Cleanup: remove redundant check 2019-03-17 21:00:56 +11:00
Bastien Montagne d23452897b Remove 3DS add-on from factory startup. 2019-03-17 09:43:32 +01:00
Antonio Vazquez 37358114e2 GPencil: Fix missing guide topbar menu
This bug was introduced in previous commit
2019-03-17 09:33:23 +01:00
Brecht Van Lommel e17f7af0ce Cleanup: remove Cycles advanced shading features toggle.
It's effectively always enabled, only not on some unsupported OpenCL devices.
For testing those it's not useful to disable these features. This is replaced
by the more fine grained feature toggles that we have now.
2019-03-17 01:58:39 +01:00
Campbell Barton cc5bdf0293 Cleanup: rename DEPRECATED to UNUSED
While the flags have been deprecated they're currently unused.
Rename for clarity.
2019-03-17 10:34:59 +11:00
Germano Cavalcante cf5097d71f Cleanup: improve comments. 2019-03-16 18:20:57 -03:00
Germano Cavalcante 8b62f203d9 ED View3d: Fix possible bug when subtracting unsigned ints.
Related to rB681661dbed12.
2019-03-16 18:10:44 -03:00
Miguel Porces 9e152f919f Python API: add Python-defined node groups for shaders and compositing.
This was already supported for Cycles shader nodes, but now also works for
Eevee and compositing nodes. Instead of a generic NodeCustomGroup, now
there is ShaderNodeCustomGroup and CompositorNodeCustomGroup that can be
subclassed and registered.

Differential Revision: https://developer.blender.org/D4370
2019-03-16 20:36:35 +01:00
Miguel Porces 5797a5fc65 Fix ID user counting issues with NodeCustomGroup.
User counting now happens before init() and after free() methods, so that
the ID users are in a valid state when Python might modify them. ID user
counting was moved into node.c and simplified.

Patch by Miguel with further refactoring by Brecht. Ref D4370.
2019-03-16 20:21:16 +01:00
Brecht Van Lommel b9af4efe41 Cleanup: fix compiler warnings. 2019-03-16 20:21:16 +01:00
Antonio Vazquez ad390f514b GPencil: Fix compiler warning
The fill flag was wrong and it was checking the color, not a flag.
2019-03-16 20:05:15 +01:00
Antonio Vazquez 2d3fbadfe3 GPencil: Fix layers topbar panel
After a previous commit to fix the pin panels, this line was not working as expected. As this variable is not used, the line can be removed.
2019-03-16 19:21:19 +01:00
Antonio Vazquez 9a4192277b GPencil: Disable Pressure for Block brush 2019-03-16 18:56:07 +01:00
Bastien Montagne e5e6c3b52c Fix T62576: The remaining two unported official add-ons: X3D and 3DS.
X3D has been (basically) ported in rBAe8da70ab73d2dd5ff46, and 3DS has
been downgraded to 'community' support, so we can get rid of that ugly
'slience warning' hack.
2019-03-16 13:02:34 +01:00
William Reynish 03ee447dd2 UI: Remove redundant 'settings' from GPencil Tool Properties panel titles 2019-03-16 12:54:08 +01:00
Campbell Barton cabb53effa Correct error in 6aebb5a4d5 2019-03-16 21:49:33 +11:00
Campbell Barton 37af7ce779 DRW: support clipping for armature bone axes
Also minor changes to make empty axis match armature axis.
2019-03-16 18:43:36 +11:00
Campbell Barton c55fb58e8a DRW: support clipping for envelope armature draw type 2019-03-16 18:26:16 +11:00
Campbell Barton 6aebb5a4d5 DRW: support clipping for relationship lines 2019-03-16 17:37:08 +11:00
Clément Foucault dbfbd6b904 Fix T62555 Viewport borders flicker when splitting said viewport 2019-03-16 03:58:00 +01:00
Campbell Barton 0c10374faf CMake: disable jemalloc when building as a Python module 2019-03-16 13:06:47 +11:00
Clément Foucault d438120fe3 Fix T61526 hair doesn't render in workbench but does with openGL 2019-03-16 02:48:19 +01:00
Campbell Barton bd1d80d0cf Cleanup: use return args last 2019-03-16 11:45:22 +11:00
Clément Foucault 3600bb79d0 Fix T60803 Artifacts with SSR + Reflection Plane + 0 roughness
Tweaked the tracing parameters again to avoid rays terminated before first
iteration.
2019-03-16 00:51:38 +01:00
Campbell Barton 44301175bb Fix __func__ being passed as an output string, also warnings 2019-03-16 10:12:47 +11:00
Clément Foucault 795bddf2bd Fix T55620 Artifacts with SSR and planar reflection
Was caused by 0 pixel extent rays which did not trace at all. Bumping the
threshold for degenerate rays fixes it.
2019-03-15 23:31:41 +01:00