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:
m---------release/datafiles/locale0
m---------release/scripts/addons0
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.h9
-rw-r--r--source/blender/compositor/nodes/COM_BoxMaskNode.cpp5
-rw-r--r--source/blender/compositor/nodes/COM_EllipseMaskNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_MaskNode.cpp9
-rw-r--r--source/blender/compositor/nodes/COM_ScaleNode.cpp7
-rw-r--r--source/blender/compositor/nodes/COM_TranslateNode.cpp5
m---------source/tools0
9 files changed, 28 insertions, 13 deletions
diff --git a/release/datafiles/locale b/release/datafiles/locale
-Subproject 848613f1edf09495bb764144461730662ac0b06
+Subproject ae7e6c215c9fc715cdedbc1c1e33e946fc90b49
diff --git a/release/scripts/addons b/release/scripts/addons
-Subproject 35c23b4db494e58538a677c4fb0ec9ec1e8ffaa
+Subproject 866dcad5aa6e45737f0634b835adcbc0871201e
diff --git a/source/blender/compositor/intern/COM_CompositorContext.h b/source/blender/compositor/intern/COM_CompositorContext.h
index e29a8f67187..46cf65bbb79 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.h
+++ b/source/blender/compositor/intern/COM_CompositorContext.h
@@ -267,4 +267,13 @@ class CompositorContext {
{
return (this->getbNodeTree()->flag & NTREE_COM_GROUPNODE_BUFFER) != 0;
}
+
+ /**
+ * \brief Get the render percentage as a factor.
+ * The compositor uses a factor i.o. a percentage.
+ */
+ float getRenderPercentageAsFactor() const
+ {
+ return m_rd->size * 0.01f;
+ }
};
diff --git a/source/blender/compositor/nodes/COM_BoxMaskNode.cpp b/source/blender/compositor/nodes/COM_BoxMaskNode.cpp
index ef62536595c..fe59bd32939 100644
--- a/source/blender/compositor/nodes/COM_BoxMaskNode.cpp
+++ b/source/blender/compositor/nodes/COM_BoxMaskNode.cpp
@@ -52,13 +52,14 @@ void BoxMaskNode::convertToOperations(NodeConverter &converter,
/* Scale that image up to render resolution */
const RenderData *rd = context.getRenderData();
+ const float render_size_factor = context.getRenderPercentageAsFactor();
ScaleFixedSizeOperation *scaleOperation = new ScaleFixedSizeOperation();
scaleOperation->setIsAspect(false);
scaleOperation->setIsCrop(false);
scaleOperation->setOffset(0.0f, 0.0f);
- scaleOperation->setNewWidth(rd->xsch * rd->size / 100.0f);
- scaleOperation->setNewHeight(rd->ysch * rd->size / 100.0f);
+ scaleOperation->setNewWidth(rd->xsch * render_size_factor);
+ scaleOperation->setNewHeight(rd->ysch * render_size_factor);
scaleOperation->getInputSocket(0)->setResizeMode(COM_SC_NO_RESIZE);
converter.addOperation(scaleOperation);
diff --git a/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp b/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp
index 30d00252b76..1ae855c0f1d 100644
--- a/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp
+++ b/source/blender/compositor/nodes/COM_EllipseMaskNode.cpp
@@ -52,12 +52,14 @@ void EllipseMaskNode::convertToOperations(NodeConverter &converter,
/* Scale that image up to render resolution */
const RenderData *rd = context.getRenderData();
+ const float render_size_factor = context.getRenderPercentageAsFactor();
ScaleFixedSizeOperation *scaleOperation = new ScaleFixedSizeOperation();
+
scaleOperation->setIsAspect(false);
scaleOperation->setIsCrop(false);
scaleOperation->setOffset(0.0f, 0.0f);
- scaleOperation->setNewWidth(rd->xsch * rd->size / 100.0f);
- scaleOperation->setNewHeight(rd->ysch * rd->size / 100.0f);
+ scaleOperation->setNewWidth(rd->xsch * render_size_factor);
+ scaleOperation->setNewHeight(rd->ysch * render_size_factor);
scaleOperation->getInputSocket(0)->setResizeMode(COM_SC_NO_RESIZE);
converter.addOperation(scaleOperation);
diff --git a/source/blender/compositor/nodes/COM_MaskNode.cpp b/source/blender/compositor/nodes/COM_MaskNode.cpp
index b28b849521c..a6415a3992e 100644
--- a/source/blender/compositor/nodes/COM_MaskNode.cpp
+++ b/source/blender/compositor/nodes/COM_MaskNode.cpp
@@ -31,6 +31,7 @@ void MaskNode::convertToOperations(NodeConverter &converter,
const CompositorContext &context) const
{
const RenderData *rd = context.getRenderData();
+ const float render_size_factor = context.getRenderPercentageAsFactor();
NodeOutput *outputMask = this->getOutputSocket(0);
@@ -46,12 +47,12 @@ void MaskNode::convertToOperations(NodeConverter &converter,
operation->setMaskHeight(data->size_y);
}
else if (editorNode->custom1 & CMP_NODEFLAG_MASK_FIXED_SCENE) {
- operation->setMaskWidth(data->size_x * (rd->size / 100.0f));
- operation->setMaskHeight(data->size_y * (rd->size / 100.0f));
+ operation->setMaskWidth(data->size_x * render_size_factor);
+ operation->setMaskHeight(data->size_y * render_size_factor);
}
else {
- operation->setMaskWidth(rd->xsch * rd->size / 100.0f);
- operation->setMaskHeight(rd->ysch * rd->size / 100.0f);
+ operation->setMaskWidth(rd->xsch * render_size_factor);
+ operation->setMaskHeight(rd->ysch * render_size_factor);
}
operation->setMask(mask);
diff --git a/source/blender/compositor/nodes/COM_ScaleNode.cpp b/source/blender/compositor/nodes/COM_ScaleNode.cpp
index e57c30cff29..9ffcd5306b0 100644
--- a/source/blender/compositor/nodes/COM_ScaleNode.cpp
+++ b/source/blender/compositor/nodes/COM_ScaleNode.cpp
@@ -54,7 +54,7 @@ void ScaleNode::convertToOperations(NodeConverter &converter,
}
case CMP_SCALE_SCENEPERCENT: {
SetValueOperation *scaleFactorOperation = new SetValueOperation();
- scaleFactorOperation->setValue(context.getRenderData()->size / 100.0f);
+ scaleFactorOperation->setValue(context.getRenderPercentageAsFactor());
converter.addOperation(scaleFactorOperation);
ScaleOperation *operation = new ScaleOperation();
@@ -71,13 +71,14 @@ void ScaleNode::convertToOperations(NodeConverter &converter,
}
case CMP_SCALE_RENDERPERCENT: {
const RenderData *rd = context.getRenderData();
+ const float render_size_factor = context.getRenderPercentageAsFactor();
ScaleFixedSizeOperation *operation = new ScaleFixedSizeOperation();
/* framing options */
operation->setIsAspect((bnode->custom2 & CMP_SCALE_RENDERSIZE_FRAME_ASPECT) != 0);
operation->setIsCrop((bnode->custom2 & CMP_SCALE_RENDERSIZE_FRAME_CROP) != 0);
operation->setOffset(bnode->custom3, bnode->custom4);
- operation->setNewWidth(rd->xsch * rd->size / 100.0f);
- operation->setNewHeight(rd->ysch * rd->size / 100.0f);
+ operation->setNewWidth(rd->xsch * render_size_factor);
+ operation->setNewHeight(rd->ysch * render_size_factor);
operation->getInputSocket(0)->setResizeMode(COM_SC_NO_RESIZE);
converter.addOperation(operation);
diff --git a/source/blender/compositor/nodes/COM_TranslateNode.cpp b/source/blender/compositor/nodes/COM_TranslateNode.cpp
index 33f48747853..0e9bf825787 100644
--- a/source/blender/compositor/nodes/COM_TranslateNode.cpp
+++ b/source/blender/compositor/nodes/COM_TranslateNode.cpp
@@ -42,8 +42,9 @@ void TranslateNode::convertToOperations(NodeConverter &converter,
TranslateOperation *operation = new TranslateOperation();
if (data->relative) {
const RenderData *rd = context.getRenderData();
- float fx = rd->xsch * rd->size / 100.0f;
- float fy = rd->ysch * rd->size / 100.0f;
+ const float render_size_factor = context.getRenderPercentageAsFactor();
+ float fx = rd->xsch * render_size_factor;
+ float fy = rd->ysch * render_size_factor;
operation->setFactorXY(fx, fy);
}
diff --git a/source/tools b/source/tools
-Subproject 660be0ca10abc8261178159afcd1032be662e38
+Subproject d7d7e9d41f7499aa4639f96c843156ff834385b