Commit Graph

99603 Commits

Author SHA1 Message Date
Sebastian Parborg e8be55a485 Fix: Active rigidbodies would not recive updates after the stopped being animated
Because depsgraph isn't rebuild for animated properies, we have to
assume that active bodies will always want to have updates from the
rigidbody simulation.
2020-09-01 11:41:44 +02:00
Sergey Sharybin c2df6658ee CMake: Fix linking errors with gmp library
gmpxx library (C++ version of gmp) uses symbols from libgmp, which means
the libgmp is to be passed to the linker after libgmpxx.
2020-09-01 11:31:47 +02:00
Jacques Lucke 114150e80c Fix compilation error with -Werror=array-bounds
This error happened only with O2 or O3 in my tests.
Casting to uintptr_t and back seems to quiet the compiler.
2020-09-01 11:11:21 +02:00
Jeroen Bakker 1449ae042e Cleanup: EEVEE bloom shaders
- moved to eevee_shaders
- added to test suite

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8763
2020-09-01 10:57:20 +02:00
Campbell Barton c78c425266 PyAPI: expose 'bl_options' for operators in bpy.ops
Useful for checking which operators are only for internal use.
2020-09-01 17:02:51 +10:00
Campbell Barton 06ba233374 RNA: rename Area.ui_type 'VIEW' enum identifier to 'IMAGE_EDITOR'
The term makes sense in the image editor, but not among other editors
where we had both VIEW and VIEW_3D.
2020-09-01 16:35:47 +10:00
Campbell Barton 87aa13d025 PyAPI: prevent leading comma when printing some enums
BPy_enum_as_string (used for creating error messages)
showed a leading comma for enums that used category headings.

While harmless, it looks odd.
2020-09-01 16:32:11 +10:00
Campbell Barton 76f513f6dc Fix T78601: User count errors when reading home-file
Calling: bpy.ops.wm.read_homefile(use_empty=True)
exposes invalid user-counts in versioning code.

Simplified logic for assigning materials in versioning code.

Caused by 29f3af9527.
2020-09-01 15:00:48 +10:00
Campbell Barton a241948ad9 Fix errors ensuring grease pencil palette
- Direct assignment caused ID user counts to be invalid.
- The first palette would always be used,
  even when the named palette searched for was found.

Also pass 'const' string to `hex_to_rgb`, avoid casting to 'non-const'.
2020-09-01 15:00:48 +10:00
Campbell Barton d9d0a386cb Cleanup: don't register mix-in menu class
The class is only used as a base for other menus.

This caused complications for tests that inspect menu contents.
2020-09-01 15:00:48 +10:00
Campbell Barton 8c86c55035 Cleanup: correct doxy sections 2020-09-01 15:00:48 +10:00
Aaron Carlisle bb4478f2fd Fix T80031: UI: "Stencil Opacity" is vague
This affects the mask opacity not the stencil itself.
2020-08-31 23:30:18 -04:00
Aaron Carlisle 12c0ecc934 Fix T80100: To sphere tooltip uses "vertices" even in object mode 2020-08-31 23:30:18 -04:00
Clément Foucault 4e06afb0a1 GL: Fix two GLerror
The gizmo one was only reproducible in debug builds.
The GLImmediate one was only affecting amdpro drivers when --debug-gpu was
enabled.
2020-09-01 00:30:36 +02:00
Clément Foucault 7f95d780e8 GLImmediate: Use CL_CHECK_ERROR
This provides a bit more debugging info on MacOS.
2020-09-01 00:30:36 +02:00
Clément Foucault 9d932b426f GL: Move MacOS debug callback to gl_debug.cc
And format to use the same callback as standard debugging layer.
2020-09-01 00:30:36 +02:00
Clément Foucault 82a197cc7f GPUDebug: Reformat GL debug callbacks and move them to GL backend
Now the callbacks are setup for each debug context.

The formating has been reworked to be less verbose and make errors
and warnings stand out from the notifications.
Errors are most of the time sufficiently explicit in their message.

This also remove the support for AMD_debug_output which is 10 years old.

This is related to the Vulkan port T68990.
2020-09-01 00:30:36 +02:00
Clément Foucault 058d29ed9a GHOST: Enable debug context on offscreen context too
This was a long standing TODO. This was also preventing debug callbacks
form other context than the main window.
2020-09-01 00:30:36 +02:00
Clément Foucault 13b0a697a0 Cleanup: GPU: Remove GPU_draw_primitive and default_vao_
These are not used anymore and can be replicated using the GPUBatch API.
2020-09-01 00:30:36 +02:00
Clément Foucault 052538edc1 Cleanup: Use GPUBatch for icon and area drawing
This is in order to remove GPU_draw_primitive to streamline the drawing
abstraction.
2020-09-01 00:30:36 +02:00
Hans Goudey 3e7feaff44 Cleanup: Comment formatting in unit.c 2020-08-31 14:18:06 -05:00
Hans Goudey fc8533a3c9 New Boolean: Always expose solver propery, add warning
After discussion with @howardt, it seems the solver property should
always be exposed, even in lite builds. This commit removes the
ifdefs for that property and adds a warning if the "Exact" solver is
used when Blender is compiled without GMP.

These changes apply to the boolean modifier as well.
2020-08-31 11:49:22 -05:00
Ray Molenkamp 7056f180d3 cleanup: Fix GMP spacing in cmake configurations
It now follows the spacing around it.
2020-08-31 09:42:58 -06:00
Sybren A. Stüvel 3014b5efc8 Fix unused parameter warning in `snap_increment_apply_ex()`
No functional changes.
2020-08-31 17:37:48 +02:00
Sybren A. Stüvel f5866f484f Remove patch for HDF5 library
Delete `hdf5.diff`, because it's no longer used. Since Blender 2.90 the
optional support for HDF5 has been dropped, but this file accidentally
wasn't deleted.

See 0102b9d47e and 0c38436227.

No functional changes.
2020-08-31 17:32:28 +02:00
Germano Cavalcante 546b900194 Cleanup/Refactor: Split the snap to increments code
Now we have a better distinction of what is snap to grid and what is
snap to increments.

The code also allows the implementation of mixed snap for these modes.
2020-08-31 11:24:37 -03:00
Clément Foucault a1df2fc443 Cleanup: GPU: Remove unused attr_binding and primitive code 2020-08-31 15:15:04 +02:00
Clément Foucault 1804eb57fd GPUImmediate: GL backend isolation
This is part of the Vulkan backend task T68990.

This is mostly a cleanup, however, there is a small change:
We don't use a special Vertex Array binding function for Immediate
anymore and just reuse the one for batches.
This might create a bit more state changes but this could be fixed
easily if it causes perf regression.

# Conflicts:
#	source/blender/gpu/intern/gpu_context.cc
2020-08-31 15:14:47 +02:00
Clément Foucault 1b3a0ae231 GLContext: Fix framebuffer deletion to GPUContext
This has more meaning as it's the base class who holds the pointer.

# Conflicts:
#	source/blender/gpu/opengl/gl_context.cc
2020-08-31 15:13:26 +02:00
Clément Foucault a54fb081ba Cleanup: GPU_immediate: Change assert to BLI_assert 2020-08-31 15:10:38 +02:00
Germano Cavalcante a440060142 Fix T79973: Re-ordering face maps messes up the names of other face maps
Use a remap function instead a swap.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D8739
2020-08-31 09:00:48 -03:00
Jacques Lucke c83ef9d7b2 Cleanup: reduce variable scope 2020-08-31 13:59:33 +02:00
Jacques Lucke e9da71ae2d Cleanup: reduce variable scope and use LISTBASE_FOREACH 2020-08-31 12:55:51 +02:00
Philipp Oeser c5b9bf32e9 Fix T80126: Alembic Import dialogue has overwrite protection UI
Use `FILE_OPENFILE` when importing, rather than `FILE_SAVE`.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D8715
2020-08-31 12:39:01 +02:00
Dalai Felinto 1c2ade053a Linux: 2.90 release information in appdata 2020-08-31 11:21:01 +02:00
Hans Goudey 6879798202 Cleanup: Resolve unused variable warning in lite build 2020-08-30 22:47:05 -05:00
Hans Goudey 596b30a080 Clang Tidy: Fix readability-delete-null-pointer warnings 2020-08-30 18:58:40 -05:00
Kévin Dietrich 429afe0c62 Cycles: introduce an ownership system to protect nodes from unwanted deletions.
Problem: the Blender synchronization process creates and tags nodes for usage. It does
this by directly adding and removing nodes from the scene data. If some node is not tagged
as used at the end of a synchronization, it then deletes the node from the scene. This poses
a problem when it comes to supporting procedural nodes who can create other nodes not known
by the Blender synchonization system, which will remove them.

Nodes now have a NodeOwner, which is set after creation. Those owners for now are the Scene
for scene level nodes and ShaderGraph for shader nodes. Instead of creating and deleting
nodes using `new` and `delete` explicitely, we now use `create_node` and `delete_node` methods
found on the owners. `delete_node` will assert that the owner is the right one.

Whenever a scene level node is created or deleted, the appropriate node manager is tagged for
an update, freeing this responsability from BlenderSync or other software exporters.

Concerning BlenderSync, the `id_maps` do not explicitely manipulate scene data anymore, they
only keep track of which nodes are used, employing the scene to create and delete them. To
achieve this, the ParticleSystem is now a Node, although it does not have any sockets.

This is part of T79131.

Reviewed By: #cycles, brecht

Maniphest Tasks: T79131

Differential Revision: https://developer.blender.org/D8540
2020-08-30 23:49:38 +02:00
Howard Trickey 19363880a6 New boolean: silence an "unused" warning.
Previous commit stopped using some functions. Since I may need
them again for future performance tuning, these are just ifdef'd out
for now.
2020-08-30 14:11:36 -04:00
Clément Foucault 3fa1280132 Fix T79940 VSE Editor crash when opening a different scene as a strip
This was caused by a double lock of the DRW context mutex.

This changes the logic a bit by releasing the DRW context before rendering
with BKE_sequencer_give_ibuf and restoring it after.

Critical fix for 2.91

Reviewed By: dfelinto
Differential Revision: https://developer.blender.org/D8657
2020-08-30 19:58:54 +02:00
Howard Trickey 19c9b27ffe New boolean: another performance improvement.
Instead of calculating exact normals for all faces, just do it
for those that potentially intersect. A big improvement for dense
meshes that only intersect in relatively few places.
2020-08-30 13:47:18 -04:00
Clément Foucault ade8d84fe3 GPUFrameBuffer: Fix build error on MSVC
This also gets rid of the macro.
2020-08-30 19:07:49 +02:00
Clément Foucault 0299817e0e Fix T80138 Node Editor: Add Frame turns background gray
The removed `UI_ThemeClearColor` made no sense in this context. It must
have been a leftover from previous refactor.
2020-08-30 18:24:19 +02:00
Howard Trickey 3699d6fe34 Re-enable modifer and bmesh_boolean tests.
These were disabled in the newboolean merge commit.
This commit renables them, using the original 'FAST' solver
so that the result objects need not change.
A TODO to add more tests using the 'EXACT' solver,
though most functionality there is now covered by unit gtests.
2020-08-30 08:31:40 -04:00
Clément Foucault dee665b462 GPUShader: Improve shader compilation log
- Print shader type (fragment, vertex, geom)
- Support for Apple + intel error format.
- Handle formatting a bit more gracefully.
2020-08-30 13:35:25 +02:00
Clément Foucault ad5d5d3f3b EEVEE: Fix broken rendering caused by SSR + Alpha blended material
This was affecting Mesa drivers as well as AMD pro driver. But it
might have been noticeable on other config too.

This was introduced by rBa9f2ebb21508.
2020-08-30 13:11:03 +02:00
Clément Foucault d98c722a5a GPUFramebuffer: Tag dirty after recursing downsample
Also do not bind automatically. This is fine since the framebuffer will
update next time it's bound.
2020-08-30 13:11:03 +02:00
Clément Foucault 8527d84d35 GPUState: Move Scissor and Viewport state to framebuffer
This way it is way clearer what each viewport state is. There is
no more save and reset. The scissor test is also saved per
framebuffer.

The only rule to remember is that the viewport state (size and
origin) is reset for both the viewport and scissor when a texture
is attached or detached from an attachment slot.
2020-08-30 13:11:03 +02:00
Clément Foucault 4f395c84fe BLI_math_vector: Add equals_v4v4_int 2020-08-30 13:11:03 +02:00
Clément Foucault 0f372f3966 GPUContext: Update internal framebuffer size when activating context
This is to ensure the FrameBuffer extents are always up to date.
2020-08-30 13:11:03 +02:00