31class NodeOperationOutput;
115 resize_mode_ = resize_mode;
129#ifdef WITH_CXX_GUARDEDALLOC
130 MEM_CXX_CLASS_ALLOC_FUNCS(
"COM:NodeOperation")
158#ifdef WITH_CXX_GUARDEDALLOC
159 MEM_CXX_CLASS_ALLOC_FUNCS(
"COM:NodeOperation")
228 size_t parents_hash_;
241 return type_hash_ == other.type_hash_ && parents_hash_ == other.parents_hash_ &&
242 params_hash_ == other.params_hash_;
247 return !(*
this == other);
252 return type_hash_ < other.type_hash_ ||
253 (type_hash_ == other.type_hash_ && parents_hash_ < other.parents_hash_) ||
254 (type_hash_ == other.type_hash_ && parents_hash_ == other.parents_hash_ &&
255 params_hash_ < other.params_hash_);
275 bool is_hash_output_params_implemented_;
280 unsigned int canvas_input_index_;
282 std::function<void(
rcti &canvas)> modify_determined_canvas_fn_;
324 node_instance_key_ = node_instance_key;
328 return node_instance_key_;
350 return inputs_.
size();
354 return outputs_.
size();
435 modify_determined_canvas_fn_ = fn;
455 if (btree_->
runtime->update_draw) {
481 return std::unique_ptr<MetaData>();
529 is_hash_output_params_implemented_ =
false;
547 template<
typename T1,
typename T2,
typename T3>
void hash_params(
T1 param1,
T2 param2,
T3 param3)
568#ifdef WITH_CXX_GUARDEDALLOC
569 MEM_CXX_CLASS_ALLOC_FUNCS(
"COM:NodeOperation")
size_t BLI_ghashutil_combine_hash(size_t hash_a, size_t hash_b)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
the ExecutionSystem contains the whole compositor tree.
a MemoryBuffer contains access to the data
NodeOperation & get_operation() const
NodeOperationOutput(NodeOperation *op, DataType datatype)
void determine_canvas(const rcti &preferred_area, rcti &r_area)
DataType get_data_type() const
NodeOperation contains calculation logic.
const void set_node_instance_key(const bNodeInstanceKey &node_instance_key)
void set_bnodetree(const bNodeTree *tree)
static void combine_hashes(size_t &combined, size_t other)
void set_name(const std::string name)
virtual void init_execution()
unsigned int get_height() const
void set_id(const int id)
void set_canvas(const rcti &canvas_area)
void add_output_socket(DataType datatype)
virtual std::unique_ptr< MetaData > get_meta_data()
unsigned int get_number_of_output_sockets() const
virtual bool is_output_operation(bool) const
is_output_operation determines whether this operation is an output of the ExecutionSystem during rend...
const bNodeInstanceKey get_node_instance_key() const
const NodeOperationFlags get_flags() const
SocketReader * get_input_socket_reader(unsigned int index)
virtual void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area)
Get input operation area being read by this operation on rendering given output area.
virtual MemoryBuffer * get_input_memory_buffer(MemoryBuffer **)
std::optional< NodeOperationHash > generate_hash()
float get_constant_value_default(float default_value)
unsigned int get_number_of_input_sockets() const
unsigned int get_width() const
NodeOperationFlags flags_
virtual bool is_active_viewer_output() const
is this operation the active viewer output user can select an ViewerNode to be active (the result of ...
NodeOperationOutput * get_output_socket(unsigned int index=0)
const rcti & get_canvas() const
NodeOperation * get_input_operation(int index)
const float * get_constant_elem_default(const float *default_elem)
void hash_params(T1 param1, T2 param2, T3 param3)
ExecutionSystem * exec_system_
virtual void deinit_execution()
NodeOperationInput * get_input_socket(unsigned int index)
virtual eCompositorPriority get_render_priority() const
get the render priority of this node.
void set_determined_canvas_modifier(std::function< void(rcti &canvas)> fn)
virtual void hash_output_params()
void add_input_socket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
virtual void update_memory_buffer(MemoryBuffer *, const rcti &, Span< MemoryBuffer * >)
void set_execution_system(ExecutionSystem *system)
const std::string get_name() const
void set_canvas_input_index(unsigned int index)
set the index of the input socket that will determine the canvas of this operation
void hash_params(T1 param1, T2 param2)
virtual void determine_canvas(const rcti &preferred_area, rcti &r_area)
eCompositorPriority
Possible priority settings.
DataType
possible data types for sockets
ResizeMode
Resize modes of inputsockets How are the input and working resolutions matched.
@ FitAny
Fit the width or the height of the input image to the width or height of the working area of the node...
@ FitWidth
Fit the width of the input image to the width of the working area of the node.
@ Center
Center the input image to the center of the working area of the node, no resizing occurs.
@ FitHeight
Fit the height of the input image to the height of the working area of the node.
@ Stretch
Fit the width and the height of the input image to the width and height of the working area of the no...
const bNodeInstanceKey NODE_INSTANCE_KEY_NONE
static constexpr unsigned int RESOLUTION_INPUT_ANY
constexpr rcti COM_AREA_NONE
NodeOperation SocketReader
std::ostream & operator<<(std::ostream &os, const eCompositorPriority &priority)
uint64_t get_default_hash(const T &v)
bNodeTreeRuntimeHandle * runtime
bool use_datatype_conversion
bool is_preview_operation
bool is_constant_operation
bool operator!=(const NodeOperationHash &other) const
bool operator==(const NodeOperationHash &other) const
bool operator<(const NodeOperationHash &other) const
NodeOperation * get_operation() const