diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-08-10 16:24:28 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-08-10 17:16:22 +0300 |
commit | 1a9b9dd64df72401df0263ca1e30306e5c675c6d (patch) | |
tree | afee896e361947157cf2e3537ccce5895f5d1c7d /source/blender/compositor/intern/COM_Debug.cc | |
parent | 5deb3229a0757e2637163c60d7915888cc50c9d8 (diff) |
Compositor: Full frame input nodes
Adds full frame implementation to "Bokeh Image" node, "Track Position"
node, `SetVectorOperation` and `MovieClipAttribute`.
The other nodes in "Input" submenu are implemented separately.
`MovieClipAttribute` needs resolution to calculate its constant value, it can't be constant folded,
which requires it to be a `ConstantOperation`. Now `ConstantOperation` contemplate this case
and any operation that is always constant without depending on inputs should implement it.
If in the future an operation needs to get an input constant element during
`determineResolution` it must first determine its input resolution.
The nodes have no functional changes.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D12090
Diffstat (limited to 'source/blender/compositor/intern/COM_Debug.cc')
-rw-r--r-- | source/blender/compositor/intern/COM_Debug.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/compositor/intern/COM_Debug.cc b/source/blender/compositor/intern/COM_Debug.cc index 5443974cbb0..a0333cf96cf 100644 --- a/source/blender/compositor/intern/COM_Debug.cc +++ b/source/blender/compositor/intern/COM_Debug.cc @@ -178,21 +178,27 @@ int DebugInfo::graphviz_operation(const ExecutionSystem *system, } len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "<OUT_%p>", socket); switch (socket->getDataType()) { - case DataType::Value: - if (typeid(*operation) == typeid(SetValueOperation)) { - const float value = ((SetValueOperation *)operation)->getValue(); + case DataType::Value: { + ConstantOperation *constant = operation->get_flags().is_constant_operation ? + static_cast<ConstantOperation *>(operation) : + nullptr; + if (constant && constant->can_get_constant_elem()) { + const float value = *constant->get_constant_elem(); len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "Value\\n%12.4g", value); } else { len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "Value"); } break; - case DataType::Vector: + } + case DataType::Vector: { len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "Vector"); break; - case DataType::Color: + } + case DataType::Color: { len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "Color"); break; + } } } len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "}"); |