Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/intern/COM_NodeOperation.h')
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h
index 9f113b60345..f507665bee3 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.h
+++ b/source/blender/compositor/intern/COM_NodeOperation.h
@@ -62,9 +62,13 @@ enum class ResizeMode {
/** \brief Center the input image to the center of the working area of the node, no resizing
* occurs */
Center = NS_CR_CENTER,
- /** \brief The bottom left of the input image is the bottom left of the working area of the node,
- * no resizing occurs */
+ /** No resizing or translation. */
None = NS_CR_NONE,
+ /**
+ * Input image is translated so that its bottom left matches the bottom left of the working area
+ * of the node, no resizing occurs.
+ */
+ Align = 100,
/** \brief Fit the width of the input image to the width of the working area of the node */
FitWidth = NS_CR_FIT_WIDTH,
/** \brief Fit the height of the input image to the height of the working area of the node */
@@ -381,6 +385,9 @@ class NodeOperation {
return m_id;
}
+ float get_constant_value_default(float default_value);
+ const float *get_constant_elem_default(const float *default_elem);
+
const NodeOperationFlags get_flags() const
{
return flags;
@@ -507,18 +514,9 @@ class NodeOperation {
}
virtual void deinitExecution();
- void set_canvas(const rcti &canvas_area)
- {
- if (!this->flags.is_canvas_set) {
- canvas_ = canvas_area;
- flags.is_canvas_set = true;
- }
- }
-
- const rcti &get_canvas() const
- {
- return canvas_;
- }
+ void set_canvas(const rcti &canvas_area);
+ const rcti &get_canvas() const;
+ void unset_canvas();
/**
* \brief is this operation the active viewer output
@@ -575,12 +573,12 @@ class NodeOperation {
unsigned int getWidth() const
{
- return BLI_rcti_size_x(&canvas_);
+ return BLI_rcti_size_x(&get_canvas());
}
unsigned int getHeight() const
{
- return BLI_rcti_size_y(&canvas_);
+ return BLI_rcti_size_y(&get_canvas());
}
inline void readSampled(float result[4], float x, float y, PixelSampler sampler)
@@ -677,6 +675,7 @@ class NodeOperation {
void addInputSocket(DataType datatype, ResizeMode resize_mode = ResizeMode::Center);
void addOutputSocket(DataType datatype);
+ /* TODO(manzanilla): to be removed with tiled implementation. */
void setWidth(unsigned int width)
{
canvas_.xmax = canvas_.xmin + width;
@@ -687,6 +686,7 @@ class NodeOperation {
canvas_.ymax = canvas_.ymin + height;
this->flags.is_canvas_set = true;
}
+
SocketReader *getInputSocketReader(unsigned int inputSocketindex);
NodeOperation *getInputOperation(unsigned int inputSocketindex);