Commit Graph

1231 Commits

Author SHA1 Message Date
Campbell Barton
544b3ab1de Cleanup: clang-format, trailing space
Minor manual tweak to prevent wrapping an array into columns.
2021-03-22 14:25:42 +11:00
Campbell Barton
6db1fb197c Cleanup: spelling, doxygen comment formatting 2021-03-21 13:18:20 +11:00
Jeroen Bakker
a9e64d8613 Cleanup: Use uint8_t for num of channels. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
b9d2e2ec97 Cleanup: Use enum class for MemoryBufferExtend. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
9f86933f2e Cleanup: Remove unused states and vars from MemoryBuffer. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
31d5c5078c Cleanup: MemoryBuffer do not store width and height. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
8cb1089795 Cleanup: Rename copyContentFrom to fill_from. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
dc9aea9903 Cleanup: Add copy constructor to MemoryBuffer. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
260e50ed82 Cleanup: Use ref to read from encapsuled data.
MemoryBuffer->getRect was returning a ptr.
2021-03-19 17:11:47 +01:00
Jeroen Bakker
c905dd24b6 Cleanup: Replace ptr with ref (COM_MemoryBuffer). 2021-03-19 17:11:47 +01:00
Jeroen Bakker
b9447ab053 Cleanup: Replace ptr with ref. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
e5ffefe606 Cleanup: Use enum class for DataType. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
b5f70d92c2 Cleanup: enum class ChunkOrdering. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
9c2d4ffbc1 Cleanup: Use enum class for CompositorQuality. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
de504e6dec Cleanup: Use enum class for CompositorPriority. 2021-03-19 17:11:47 +01:00
Jeroen Bakker
50c5435438 Cleanup: compositor - chunk order
No functional changes.
2021-03-19 17:11:47 +01:00
Jeroen Bakker
18b87e2e0b Cleanup: Remove unneeded complexity
`determineDependingMemoryProxies` was mapping a value in a temp vector.
2021-03-19 17:11:47 +01:00
Jeroen Bakker
de296e8429 Cleanup: add const. 2021-03-19 08:18:00 +01:00
Jeroen Bakker
ef944b5020 Cleanup: Replace std::vector with blender::Vector. 2021-03-19 08:11:11 +01:00
Jeroen Bakker
64a413b0c7 Fix T86710: Crash When Adding Node Group.
When adding a node group there can be no inputs in the input map that
was triggering an assert.
2021-03-19 08:04:30 +01:00
Campbell Barton
bb6765f28f Cleanup: spelling 2021-03-18 09:36:44 +11:00
Charlie Jolly
266cd7bb82 Nodes: Add support to mute node wires
This patch adds the ability to mute individual wires in the node editor.
This is invoked like the cut links operator but with a new shortcut.

Mute = Ctrl + Alt
Cut = Ctrl

Dragging over wires will toggle the mute state for that wire.
The muted wires are drawn in red with a bar across the center.
Red is used in the nodes context to indicate invalid links, muted links and internal links.

When a wire is muted it exposes the original node buttons which are normally hidden when a wire is connected.

Downstream and upstream links connected using reroute nodes are also muted.

Outside scope of patch:
- Add support for pynodes e.g. Animation Nodes
- Requires minor change to check for muted links using the `is_muted` link property or the `is_linked` socket property.

Maniphest Tasks: T52659

Differential Revision: https://developer.blender.org/D2807
2021-03-17 11:54:16 +00:00
Jeroen Bakker
e91dd645a9 Fix concern: lookup could fail.
Concern raised on {93e2491ee724}.
2021-03-17 09:18:39 +01:00
Jeroen Bakker
187f358f33 Cleanup: Use blender::MultiValueMap.
Fixed concern raise on {93e2491ee724}.
2021-03-17 09:14:38 +01:00
Jeroen Bakker
4ce5dfe54c Cleanup: NULL -> nullptr. 2021-03-16 15:08:23 +01:00
Jeroen Bakker
93e2491ee7 Cleanup: replace std::map with blender::Map. 2021-03-16 15:03:30 +01:00
Jeroen Bakker
4ca8e09b24 Cleanup: Replace std::vector with blender::Vector. 2021-03-16 15:03:30 +01:00
Jeroen Bakker
5266e17ed5 Cleanup: Modernize iterators. 2021-03-16 15:03:30 +01:00
Jeroen Bakker
0efca18df7 Cleanup: Modernize iter. 2021-03-16 15:03:30 +01:00
Jeroen Bakker
b43d4c63cf Cleanup: Removed commented out code. 2021-03-16 15:03:30 +01:00
Jeroen Bakker
8ea3ab5b42 Cleanup: Remove unimplemented declarations. 2021-03-16 15:03:30 +01:00
Jeroen Bakker
d49e7b82da Compositor: Redesign Cryptomatte node for better usability
In the current implementation, cryptomatte passes are connected to the node
and elements are picked by using the eyedropper tool on a special pick channel.

This design has two disadvantages - both connecting all passes individually
and always having to switch to the picker channel are tedious.

With the new design, the user selects the RenderLayer or Image from which the
Cryptomatte layers are directly loaded (the type of pass is determined by an
enum). This allows the node to automatically detect all relevant passes.

Then, when using the eyedropper tool, the operator looks up the selected
coordinates from the picked Image, Node backdrop or Clip and reads the picked
object directly from the Renderlayer/Image, therefore allowing to pick in any
context (e.g. by clicking on the Combined pass in the Image Viewer). The
sampled color is looked up in the metadata and the actual name is stored
in the cryptomatte node. This also allows to remove a hash by just removing
the name from the matte id.

Technically there is some loss of flexibility because the Cryptomatte pass
inputs can no longer be connected to other nodes, but since any compositing
done on them is likely to break the Cryptomatte system anyways, this isn't
really a concern in practise.

In the future, this would also allow to automatically translate values to names
by looking up the value in the associated metadata of the input, or to get a
better visualization of overlapping areas in the Pick output since we could
blend colors now that the output doesn't have to contain the exact value.

Idea + Original patch: Lucas Stockner
Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D3959
2021-03-16 07:43:17 +01:00
Jeroen Bakker
fd905c1059 Cleanup: fix clang-tidy errors when COM_debug is active. 2021-03-12 14:32:24 +01:00
Jeroen Bakker
7388f9df71 Cleanup: Compiler warnings with COM_TM_NOTHREAD active. 2021-03-12 13:36:49 +01:00
Campbell Barton
70e73974b5 Cleanup: spelling 2021-03-10 15:47:50 +11:00
Ankit Meel
cdb0b3cedc Compositor: Silence -Wself-assign
Use member initializer list for constructor.
Use `this->` for member function.
Introduced in rBef53859d24a9720882e3ca6c5415faefec6fb82c

Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D10653
2021-03-09 19:19:21 +05:30
Ankit Meel
be6b3923f5 Compositor: silence clang/clang-tidy override warnings
`-Winconsistent-missing-override` and `modernize-use-override`.

Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D10654
2021-03-09 19:19:08 +05:30
Jeroen Bakker
1775ea74c1 Cleanup: Change extension .cpp to .cc 2021-03-08 13:41:52 +01:00
Jeroen Bakker
d5c727c6ea Fix windows compilation. 2021-03-05 16:08:11 +01:00
Jeroen Bakker
ffd5b0d91e Cleanup: Use blender::Vector. 2021-03-05 16:56:14 +01:00
Jeroen Bakker
0729376a13 Fix: compilation OpenCL kernels Compositor.
introduced during cleanup.
2021-03-05 16:56:14 +01:00
Jeroen Bakker
d4c673d4c6 Cleanup: use blender::Vector. 2021-03-05 16:56:14 +01:00
Jeroen Bakker
7c8ec99b9a Cleanup: use blender::Vector. 2021-03-05 16:56:14 +01:00
Jeroen Bakker
7bccbce512 Cleanup: use snake case. 2021-03-05 16:56:14 +01:00
Jeroen Bakker
921138cf5f Cleanup: rename private attribtue m_max_read_buffer_offset. 2021-03-05 16:56:14 +01:00
Jeroen Bakker
87842d6388 Cleanup: Use blender::Vector in ExecutionGroup. 2021-03-05 16:56:14 +01:00
Jeroen Bakker
fde150fee4 Cleanup: Use std::Vector for chunk execution status. 2021-03-05 16:56:14 +01:00
Jeroen Bakker
e1d9b095e4 Cleanup: Use enum class for eChunkExecutionState. 2021-03-05 16:56:14 +01:00
Jeroen Bakker
3d4a844a50 Cleanup: ExecutionSystem::find_output_execution_groups. 2021-03-05 16:56:14 +01:00
Jeroen Bakker
8b2fb7aeed Cleanup: Remove unused method. 2021-03-05 16:56:14 +01:00