Dependency graph patch, provided by Jean-Luc Peuriere.

Works like a charm... well it now replaces the old base-sorting hack. :)
Next stage will be to define how to further integrate it. Plus some
minor code cleanups... static/internal functions versus external, etc.
This commit is contained in:
2005-04-30 21:27:05 +00:00
parent 42ae9128fa
commit 79e333343b
13 changed files with 1973 additions and 7 deletions

View File

@@ -68,6 +68,12 @@
#include "BSE_drawipo.h"
#include "BSE_drawoops.h"
#include "BKE_depsgraph.h"
extern void build_deps(short mask);
//extern void draw_deps(DagNode *node);
float oopscalex;
void boundbox_oops()
@@ -399,7 +405,17 @@ void drawoopsspace(ScrArea *sa, void *spacedata)
if(soops==0) return;
if(soops->type==SO_OUTLINER) draw_outliner(sa, soops);
else {
else if (soops->type==SO_DEPSGRAPH) {
build_deps(soops->deps_flags);
boundbox_deps();
calc_scrollrcts(sa,G.v2d, curarea->winx, curarea->winy);
myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax);
oopscalex= .14*((float)curarea->winx)/(G.v2d->cur.xmax-G.v2d->cur.xmin);
calc_ipogrid(); /* for scrollvariables */
draw_all_deps();
} else {
boundbox_oops();
calc_scrollrcts(sa, G.v2d, curarea->winx, curarea->winy);