Small usability tweaks in Compositor:

- After making a Group, internal socket values are now copied to the
  group node, so an execute will give identical results
- After ungrouping, the cyclic dependency tagging didn't work well in
  all cases, showing a red noodle line and giving composite errors.
  For time being solved by calling the NodeSort twice.
- Viewer nodes now get previews updated always (used to be only the active)
  Note: this is not for previews inside of groups!
This commit is contained in:
2006-11-20 09:37:01 +00:00
parent 228b94dc89
commit a667b79b35
3 changed files with 18 additions and 13 deletions

View File

@@ -511,6 +511,17 @@ bNode *nodeMakeGroupFromSelected(bNodeTree *ntree)
}
}
/* initialize variables of unused input sockets */
for(node= ngroup->nodes.first; node; node= node->next) {
for(sock= node->inputs.first; sock; sock= sock->next) {
if(sock->intern==0) {
bNodeSocket *nsock= groupnode_find_tosock(gnode, sock->own_index);
if(nsock) {
QUATCOPY(nsock->ns.vec, sock->ns.vec);
}
}
}
}
return gnode;
}
@@ -715,6 +726,10 @@ int nodeGroupUnGroup(bNodeTree *ntree, bNode *gnode)
nodeFreeNode(ntree, gnode);
/* solve order goes fine, but the level tags not... doing it twice works for now. solve this once */
ntreeSolveOrder(ntree);
ntreeSolveOrder(ntree);
return 1;
}

View File

@@ -609,18 +609,9 @@ static void node_composit_exec_viewer(void *data, bNode *node, bNodeStack **in,
generate_preview(node, cbuf);
free_compbuf(cbuf);
} /* lets make only previews when not done yet, so activating doesnt update */
else if(in[0]->data && node->preview && node->preview->rect==NULL) {
CompBuf *cbuf, *inbuf= in[0]->data;
if(inbuf->type!=CB_RGBA) {
cbuf= alloc_compbuf(inbuf->x, inbuf->y, CB_RGBA, 1);
composit1_pixel_processor(node, cbuf, inbuf, in[0]->vec, do_copy_rgba, CB_RGBA);
generate_preview(node, cbuf);
free_compbuf(cbuf);
}
else
generate_preview(node, inbuf);
}
else if(in[0]->data) {
generate_preview(node, in[0]->data);
}
}

View File

@@ -531,7 +531,6 @@ void node_ungroup(SpaceNode *snode)
else {
if(nodeGroupUnGroup(snode->edittree, gnode)) {
ntreeSolveOrder(snode->edittree);
BIF_undo_push("Deselect all nodes");
allqueue(REDRAWNODE, 0);
}