[Cin] Debate on batch render
Andrew Randrianasulu
randrianasulu at gmail.com
Tue Jan 12 18:03:06 CET 2021
В сообщении от Tuesday 12 January 2021 18:33:19 Phyllis Smith via Cin написал(а):
> > I would like to know how many people use this and that function, so a
> > developer can make the right thing, if he is not a filmaker/editor.
> >
> > *Andrew*, in response to IgorB I am in favor of *commenting out the code
> for the 2 buttons* - Save to EDL Path and Warn if jobs/session mismatched.
I actually tried to remove both, but this can lead to situation where you set this checkbox to warn,
and now you have no GUI way to change it back! (editing config file probably will work)
So, I only touched 'Save to EDL Path' button.
---
diff --git a/cinelerra-5.1/cinelerra/batchrender.C b/cinelerra-5.1/cinelerra/batchrender.C
index 6dcdbc62..ab830d05 100644
--- a/cinelerra-5.1/cinelerra/batchrender.C
+++ b/cinelerra-5.1/cinelerra/batchrender.C
@@ -60,6 +60,8 @@
#include "dvdcreate.h"
#include "bdcreate.h"
+#define UNSAFE_BUTTON 0
+
int BatchRenderThread::column_widths[] = { 42, 42, 42, 222, 222, 150 };
const char *BatchRenderThread::column_titles[] = {
N_("Enabled"), N_("Labeled"), N_("Farmed"), N_("Output"), N_("EDL"), N_("Elapsed")
@@ -382,6 +384,7 @@ void BatchRenderThread::use_current_edl()
gui->edl_path_text->update(get_current_edl());
}
+
void BatchRenderThread::update_selected_edl()
{
FileXML xml_file;
@@ -792,8 +795,12 @@ void BatchRenderGUI::create_objects()
y2 = y + edl_path_browse->get_h() + mwindow->theme->widget_border;
x = x2; y = y2;
+
+ if (UNSAFE_BUTTON) {
add_subwindow(update_selected_edl = new BatchRenderUpdateEDL(thread, x, y));
y += update_selected_edl->get_h() + mwindow->theme->widget_border;
+ }
+
add_subwindow(use_current_edl = new BatchRenderCurrentEDL(thread, x, y));
y += use_current_edl->get_h() + mwindow->theme->widget_border;
if( !mwindow->edl || !mwindow->edl->path[0] ) use_current_edl->disable();
@@ -805,8 +812,10 @@ void BatchRenderGUI::create_objects()
x += savelist_batch->get_w() + mwindow->theme->widget_border;
add_subwindow(loadlist_batch = new BatchRenderLoadList(thread, x, y));
y += loadlist_batch->get_h() + mwindow->theme->widget_border;
+
add_subwindow(warning = new BatchRenderWarning(thread, x2, y));
y2 = y + warning->get_h() + mwindow->theme->widget_border;
+
if( y2 > y1 ) y1 = y2;
x = mwindow->theme->batchrender_x1, y = y1;
@@ -835,6 +844,7 @@ void BatchRenderGUI::button_disable()
new_batch->disable();
delete_batch->disable();
use_current_edl->disable();
+ if (UNSAFE_BUTTON)
update_selected_edl->disable();
}
@@ -844,6 +854,7 @@ void BatchRenderGUI::button_enable()
delete_batch->enable();
if( mwindow->edl && mwindow->edl->path[0] )
use_current_edl->enable();
+ if (UNSAFE_BUTTON)
update_selected_edl->enable();
}
@@ -876,8 +887,12 @@ int BatchRenderGUI::resize_event(int w, int h)
y2 = y + edl_path_browse->get_h() + mwindow->theme->widget_border;
x = x2; y = y2;
+
+ if (UNSAFE_BUTTON) {
update_selected_edl->reposition_window(x, y);
y += update_selected_edl->get_h() + mwindow->theme->widget_border;
+ }
+
use_current_edl->reposition_window(x, y);
y += use_current_edl->get_h() + mwindow->theme->widget_border;
new_batch->reposition_window(x, y);
@@ -1236,6 +1251,7 @@ int BatchRenderCurrentEDL::handle_event()
return 1;
}
+
BatchRenderUpdateEDL::BatchRenderUpdateEDL(BatchRenderThread *thread,
int x,
int y)
@@ -1244,8 +1260,10 @@ BatchRenderUpdateEDL::BatchRenderUpdateEDL(BatchRenderThread *thread,
this->thread = thread;
}
+
int BatchRenderUpdateEDL::handle_event()
{
+ if (UNSAFE_BUTTON)
thread->update_selected_edl();
return 1;
}
---
Can you (and/or others) try this version?
I probably can clear this warn-variable somewhere, so
there will be possibility to actually hide checkbox, too.
But this will take some more time ....
> It would be less confusing than creating an UNSAFE button. I made an
> attempt to do this yesterday but ended up with SEGV as I am really
> clueless. I do not want to delete the code because this way the
> experienced users can recompile themselves and get the feature capability
> back for their own use.
>
> In the past, deleting code has just led to having to put it back -- case in
> point is "Piping Video to a Command Line". It was deleted and we got raked
> over the coals because one person responded that it was the only feature of
> CinelerraGG that he used.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disable_two_buttons_in_batchrender_gui-4.diff
Type: text/x-diff
Size: 3000 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210112/589e2d79/attachment-0001.bin>
More information about the Cin
mailing list