Border for compositor viewer node feature
This adds border option to compositor, which affects on a backdrop and viewer nodes, which is useful for faster previews and tweaks. Final compositing still happens for the whole frame, but if it'll be needed it's not so difficult to support it as well. To use border there's Ctrl-B shortcut in the compositor editor, which i used to define region you want to restrict compositing to. There's also "Viewer Border" option in the N-panel in case you'll want to disable border compositing. Some areas could be cleaned a bit, like ideally it shall not be viewer image clearing in viewer_border_update RNA callback, but currently it's not so much clear how to make it the same fast as simple memset and glue it somehow to compositor. Will think of nicer solution a bit later.
This commit is contained in:
@@ -78,11 +78,22 @@ ExecutionSystem::ExecutionSystem(RenderData *rd, bNodeTree *editingtree, bool re
|
||||
this->groupOperations(); /* group operations in ExecutionGroups */
|
||||
unsigned int index;
|
||||
unsigned int resolution[2];
|
||||
|
||||
rctf *viewer_border = &editingtree->viewer_border;
|
||||
bool use_viewer_border = (editingtree->flag & NTREE_VIEWER_BORDER) &&
|
||||
viewer_border->xmin < viewer_border->xmax &&
|
||||
viewer_border->ymin < viewer_border->ymax;
|
||||
|
||||
for (index = 0; index < this->m_groups.size(); index++) {
|
||||
resolution[0] = 0;
|
||||
resolution[1] = 0;
|
||||
ExecutionGroup *executionGroup = this->m_groups[index];
|
||||
executionGroup->determineResolution(resolution);
|
||||
|
||||
if (use_viewer_border) {
|
||||
executionGroup->setViewerBorder(viewer_border->xmin, viewer_border->xmax,
|
||||
viewer_border->ymin, viewer_border->ymax);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef COM_DEBUG
|
||||
|
||||
Reference in New Issue
Block a user