本文整理汇总了C++中NodeOperation::isOutputOperation方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeOperation::isOutputOperation方法的具体用法?C++ NodeOperation::isOutputOperation怎么用?C++ NodeOperation::isOutputOperation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeOperation
的用法示例。
在下文中一共展示了NodeOperation::isOutputOperation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setRenderBorder
void ExecutionGroup::setRenderBorder(float xmin, float xmax, float ymin, float ymax)
{
NodeOperation *operation = this->getOutputOperation();
if (operation->isOutputOperation(true)) {
/* Basically, setting border need to happen for only operations
* which operates in render resolution buffers (like compositor
* output nodes).
*
* In this cases adding border will lead to mapping coordinates
* from output buffer space to input buffer spaces when executing
* operation.
*
* But nodes like viewer and file output just shall display or
* safe the same exact buffer which goes to their input, no need
* in any kind of coordinates mapping.
*/
bool operationNeedsBorder = !(operation->isViewerOperation() ||
operation->isPreviewOperation() ||
operation->isFileOutputOperation());
if (operationNeedsBorder) {
BLI_rcti_init(&this->m_viewerBorder, xmin * this->m_width, xmax * this->m_width,
ymin * this->m_height, ymax * this->m_height);
}
}
}
示例2: determineResolutions
void NodeOperationBuilder::determineResolutions()
{
/* determine all resolutions of the operations (Width/Height) */
for (Operations::const_iterator it = m_operations.begin(); it != m_operations.end(); ++it) {
NodeOperation *op = *it;
if (op->isOutputOperation(m_context->isRendering()) && !op->isPreviewOperation()) {
unsigned int resolution[2] = {0, 0};
unsigned int preferredResolution[2] = {0, 0};
op->determineResolution(resolution, preferredResolution);
op->setResolution(resolution);
}
}
for (Operations::const_iterator it = m_operations.begin(); it != m_operations.end(); ++it) {
NodeOperation *op = *it;
if (op->isOutputOperation(m_context->isRendering()) && op->isPreviewOperation()) {
unsigned int resolution[2] = {0, 0};
unsigned int preferredResolution[2] = {0, 0};
op->determineResolution(resolution, preferredResolution);
op->setResolution(resolution);
}
}
/* add convert resolution operations when needed */
{
Links convert_links;
for (Links::const_iterator it = m_links.begin(); it != m_links.end(); ++it) {
const Link &link = *it;
if (link.to()->getResizeMode() != COM_SC_NO_RESIZE) {
NodeOperation &from_op = link.from()->getOperation();
NodeOperation &to_op = link.to()->getOperation();
if (from_op.getWidth() != to_op.getWidth() || from_op.getHeight() != to_op.getHeight())
convert_links.push_back(link);
}
}
for (Links::const_iterator it = convert_links.begin(); it != convert_links.end(); ++it) {
const Link &link = *it;
Converter::convertResolution(*this, link.from(), link.to());
}
}
}
示例3: findOutputNodeOperations
void ExecutionSystemHelper::findOutputNodeOperations(vector<NodeOperation *> *result, vector<NodeOperation *>& operations, bool rendering)
{
unsigned int index;
for (index = 0; index < operations.size(); index++) {
NodeOperation *operation = operations[index];
if (operation->isOutputOperation(rendering)) {
result->push_back(operation);
}
}
}
示例4: group_operations
void NodeOperationBuilder::group_operations()
{
for (Operations::const_iterator it = m_operations.begin(); it != m_operations.end(); ++it) {
NodeOperation *op = *it;
if (op->isOutputOperation(m_context->isRendering())) {
ExecutionGroup *group = make_group(op);
group->setOutputExecutionGroup(true);
}
/* add new groups for associated memory proxies where needed */
if (op->isReadBufferOperation()) {
ReadBufferOperation *read_op = (ReadBufferOperation *)op;
MemoryProxy *memproxy = read_op->getMemoryProxy();
if (memproxy->getExecutor() == NULL) {
ExecutionGroup *group = make_group(memproxy->getWriteBufferOperation());
memproxy->setExecutor(group);
}
}
}
}
示例5: prune_operations
void NodeOperationBuilder::prune_operations()
{
Tags reachable;
for (Operations::const_iterator it = m_operations.begin(); it != m_operations.end(); ++it) {
NodeOperation *op = *it;
/* output operations are primary executed operations */
if (op->isOutputOperation(m_context->isRendering()))
find_reachable_operations_recursive(reachable, op);
}
/* delete unreachable operations */
Operations reachable_ops;
for (Operations::const_iterator it = m_operations.begin(); it != m_operations.end(); ++it) {
NodeOperation *op = *it;
if (reachable.find(op) != reachable.end())
reachable_ops.push_back(op);
else
delete op;
}
/* finally replace the operations list with the pruned list */
m_operations = reachable_ops;
}