void BatchRenderJob::load(FileXML *file)
{
int result = 0;
+ char job_title[BCSTRLEN];
+ strcpy(job_title, file->tag.title);
enabled = file->tag.get_property("ENABLED", enabled);
farmed = file->tag.get_property("FARMED", farmed);
// coding maintenance. The defaults must now be stuffed into the XML for
// unique storage.
BC_Hash defaults;
- defaults.load_string(file->read_text());
+ defaults.load_string(file->read_text(job_title));
asset->load_defaults(&defaults,
"", 0, 1, 0, 0, 0);
}
int result2 = filewindow.run_window();
if( !result2 ) {
+ thread->gui->lock_window("BatchRenderLoadList::run");
strcpy(thread->batch_path, filewindow.get_submitted_path());
thread->gui->batch_path->update(thread->batch_path);
thread->mwindow->defaults->update("DEFAULT_BATCHLOADPATH", thread->batch_path);
thread->gui->create_list(1);
thread->current_job = 0;
thread->gui->change_job();
+ thread->gui->unlock_window();
}
startup_lock->lock("BatchRenderLoadList::run");
return buffer->otell();
}
-char* FileXML::read_text()
+char* FileXML::read_text(const char *tag_title)
{
+ if( !tag_title ) tag_title = tag.title;
int ch = buffer->next();
// filter out first char is new line
if( ch == '\n' ) ch = buffer->next();
if( ch < 0 ) break;
pos = buffer->itell()-1;
if( (ch = buffer->next()) != '/' ) continue;
- char *cp = tag.title;
+ const char *cp = tag_title;
while( (ch=buffer->next()) >= 0 && ch == *cp ) ++cp;
if( ch < 0 ) break;
if( *cp ) continue;
int append_data(const char *text);
int append_data(const char *text, long len);
- char *read_text();
+ char *read_text(const char *tag_title=0);
int read_data_until(const char *tag_end, XMLBuffer *xbfr, int skip=0);
int read_text_until(const char *tag_end, XMLBuffer *xbfr, int skip=0);
int read_tag();