Blender
V5.3
source
blender
compositor
COM_repeat_zone_operation.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2026 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
COM_zone_operation.hh
"
8
9
namespace
blender
{
10
class
ComputeContext
;
11
namespace
bke
{
12
class
bNodeTreeZone
;
13
}
14
}
// namespace blender
15
16
namespace
blender::compositor
{
17
18
class
Context
;
19
class
ZoneTreeOperation
;
20
21
/* ------------------------------------------------------------------------------------------------
22
* Repeat Zone Operation
23
*
24
* The repeat zone operation is a zone operation that evaluates a zone a certain number of times,
25
* with the output of one evaluation being the inputs of the next. */
26
class
RepeatZoneOperation
:
public
ZoneOperation
{
27
public
:
28
using
ZoneOperation::ZoneOperation
;
29
30
void
execute
()
override
;
31
32
private
:
33
/* Sets the reference counts of the zone tree operation according to the needed status of the
34
* outputs of the zone output node. This is only called for the last iteration, since the other
35
* iterations supply their outputs back to the inputs of the next iteration. */
36
void
set_reference_counts(
ZoneTreeOperation
&zone_tree_operation);
37
38
/* Maps the input results of the zone tree operation to the inputs of the repeat zone operation
39
* through temporary results that share their data. The given last_zone_tree_operation is the
40
* zone tree operation of the last iteration, which will be nullptr for the first iteration. For
41
* any iteration other than the first one, the inputs will be taken from the outputs of the last
42
* zone tree operation instead. */
43
Vector<std::unique_ptr<Result>
> map_inputs(
ZoneTreeOperation
&zone_tree_operation,
44
ZoneTreeOperation
*last_zone_tree_operation);
45
46
/* Maps the inputs that cross the border of the zone. */
47
Vector<std::unique_ptr<Result>
> map_external_inputs(
ZoneTreeOperation
&zone_tree_operation);
48
49
/* Writes the output results of the zone tree operation of the last iteration to this repeat zone
50
* operation by sharing its data and freeing the results. */
51
void
write_outputs(
ZoneTreeOperation
&zone_tree_operation);
52
53
/* Cancel evaluation by allocating default values for the outputs and freeing the results of the
54
* last zone tree operation. */
55
void
cancel_evaluation(
ZoneTreeOperation
&last_zone_tree_operation);
56
};
57
58
}
// namespace blender::compositor
COM_zone_operation.hh
blender::ComputeContext
Definition
BLI_compute_context.hh:80
blender::bke::bNodeTreeZone
Definition
BKE_node_tree_zones.hh:23
blender::compositor::Context
Definition
COM_context.hh:53
blender::compositor::RepeatZoneOperation
Definition
COM_repeat_zone_operation.hh:26
blender::compositor::RepeatZoneOperation::execute
void execute() override
Definition
repeat_zone_operation.cc:22
blender::compositor::RepeatZoneOperation::ZoneOperation
ZoneOperation(Context &context, const bke::bNodeTreeZone &zone, const ComputeContext &compute_context)
Definition
zone_operation.cc:24
blender::compositor::ZoneOperation::ZoneOperation
ZoneOperation(Context &context, const bke::bNodeTreeZone &zone, const ComputeContext &compute_context)
Definition
zone_operation.cc:24
blender::compositor::ZoneTreeOperation
Definition
COM_zone_tree_operation.hh:32
blender::bke
Definition
AS_asset_library.hh:32
blender::compositor
Definition
BKE_node.hh:77
blender
BMesh Iterators.
Definition
ANIM_action.hh:30
lexit::Vector
Definition
vector.hh:68
Generated on
for Blender by
doxygen
1.18.0