Improved context handling. Previously FRS_initialize() was used for both

initializing Freestyle and specifying contexts, making the API a bit messy.
Now FRS_initialize() is only for initialization, and contexts are specified
by new FRS_set_context() function just before starting rendering.
This commit is contained in:
2009-11-10 00:03:31 +00:00
parent b65008dd6f
commit 51efe7de27
8 changed files with 37 additions and 16 deletions

View File

@@ -548,6 +548,10 @@ int main(int argc, char **argv)
printf("Example: setenv BF_TIFF_LIB /usr/lib/libtiff.so\n");
}
/* initialize Freestyle */
FRS_initialize();
FRS_set_context(C);
/* OK we are ready for it */
for(a=1; a<argc; a++) {
@@ -842,7 +846,6 @@ int main(int argc, char **argv)
if (G.background) {
int retval = BKE_read_file(C, argv[a], NULL, NULL);
FRS_initialize(C);
/*we successfully loaded a blend file, get sure that
pointcache works */