On Saturday, August 7, 2021, Andrew Randrianasulu <[email protected]> wrote:
> > > On Saturday, August 7, 2021, Andrew Randrianasulu <[email protected]> > wrote: > >> >> >> On Saturday, August 7, 2021, Andrea paz <[email protected]> >> wrote: >> >>> I think the best course of action, in line with BT#577, is to use >>> patches 1 and 2, which work fine, and not use 3 and 0004. I remember >>> it being a long discussion to get that result and I wouldn't want to >>> start all over again. >> >> >>> In theory I can try to implement some kind of checkbox/toggle between >> those two modes (named like 'respect armed state in gang modes'), but for >> now may be patch listing in manul ('if you want to change default behavior >> just change those lines, like shown here') will be enough..? >> > > i found mail list discussion, thing is it was initially about _play_ > feature, not disarm feature (i see arm/disarm as way to protect tracks from > unwanted change..) > > src: > https://lists.cinelerra-gg.org/pipermail/cin/2020-October/002514.html > > again, I wonder why it was noted by Phyllis "but making it a Preference is > not > a good idea.". Just because our Preferences a bit crowded already? > anyway, just as with rewind speed I created local variable controlling this behavior, and stored it into Cinelerra_rc (so you can edit it like you want w/o recompilation) see patch 0005 > > > >> >>> >>> >>> Phyllis, what do you think? >>> >>
From 0831a0414fbe4d14bbeeae74ccb4c7ddb3968abf Mon Sep 17 00:00:00 2001 From: Andrew Randrianasulu <[email protected]> Date: Sat, 7 Aug 2021 20:34:14 +0300 Subject: [PATCH 5/5] Add hidden preference armed_in_gang_mode --- cinelerra-5.1/cinelerra/localsession.C | 7 +++++++ cinelerra-5.1/cinelerra/localsession.h | 2 ++ cinelerra-5.1/cinelerra/track.C | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cinelerra-5.1/cinelerra/localsession.C b/cinelerra-5.1/cinelerra/localsession.C index 8293824c..4195a30b 100644 --- a/cinelerra-5.1/cinelerra/localsession.C +++ b/cinelerra-5.1/cinelerra/localsession.C @@ -103,6 +103,7 @@ LocalSession::LocalSession(EDL *edl) use_max = 0; solo_track_id = -1; gang_tracks = GANG_NONE; + armed_in_gang_mode = 0; } LocalSession::~LocalSession() @@ -145,6 +146,7 @@ void LocalSession::copy_from(LocalSession *that) use_max = that->use_max; solo_track_id = that->solo_track_id; gang_tracks = that->gang_tracks; + armed_in_gang_mode = that->armed_in_gang_mode; for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) { automation_mins[i] = that->automation_mins[i]; @@ -200,6 +202,7 @@ void LocalSession::save_xml(FileXML *file, double start) file->tag.set_property("BLUE_MAX", blue_max); file->tag.set_property("USE_MAX", use_max); file->tag.set_property("GANG_TRACKS", gang_tracks); + file->tag.set_property("ARMED_IN_GANG_MODE", armed_in_gang_mode); for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) { @@ -240,6 +243,7 @@ void LocalSession::synchronize_params(LocalSession *that) if( solo_track_id < 0 || that->solo_track_id < 0 ) solo_track_id = that->solo_track_id; gang_tracks = that->gang_tracks; + armed_in_gang_mode = that->armed_in_gang_mode; } @@ -300,6 +304,7 @@ void LocalSession::load_xml(FileXML *file, unsigned long load_flags) blue_max = file->tag.get_property("BLUE_MAX", blue_max); use_max = file->tag.get_property("USE_MAX", use_max); gang_tracks = file->tag.get_property("GANG_TRACKS", gang_tracks); + armed_in_gang_mode = file->tag.get_property("ARMED_IN_GANG_MODE", armed_in_gang_mode); for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) { if (!Automation::autogrouptypes_fixedrange[i]) { automation_mins[i] = file->tag.get_property(xml_autogrouptypes_titlesmin[i],automation_mins[i]); @@ -367,6 +372,7 @@ int LocalSession::load_defaults(BC_Hash *defaults) blue_max = defaults->get("BLUE_MAX", 0.0); use_max = defaults->get("USE_MAX", 0); gang_tracks = defaults->get("GANG_TRACKS", GANG_NONE); + armed_in_gang_mode = defaults->get("ARMED_IN_GANG_MODE", 0); for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) { if (!Automation::autogrouptypes_fixedrange[i]) { @@ -405,6 +411,7 @@ int LocalSession::save_defaults(BC_Hash *defaults) defaults->update("BLUE_MAX", blue_max); defaults->update("USE_MAX", use_max); defaults->update("GANG_TRACKS", gang_tracks); + defaults->update("ARMED_IN_GANG_MODE", armed_in_gang_mode); for (int i = 0; i < AUTOGROUPTYPE_COUNT; i++) { if (!Automation::autogrouptypes_fixedrange[i]) { diff --git a/cinelerra-5.1/cinelerra/localsession.h b/cinelerra-5.1/cinelerra/localsession.h index 3497d07e..cae0e809 100644 --- a/cinelerra-5.1/cinelerra/localsession.h +++ b/cinelerra-5.1/cinelerra/localsession.h @@ -118,6 +118,8 @@ public: int solo_track_id; // gang mode: none, channels, media int gang_tracks; +// armed works in gang mode ch/media + int armed_in_gang_mode; private: // The reason why selection ranges and inpoints have to be separate: // The selection position has to change to set new in points. diff --git a/cinelerra-5.1/cinelerra/track.C b/cinelerra-5.1/cinelerra/track.C index 86fbe834..5ccf3a64 100644 --- a/cinelerra-5.1/cinelerra/track.C +++ b/cinelerra-5.1/cinelerra/track.C @@ -1836,8 +1836,9 @@ int Track::in_gang(Track *track) int Track::is_armed() { + if (edl->local_session->armed_in_gang_mode) return armed && gang_master()->armed; -// return gang_master()->armed; + return gang_master()->armed; } int Track::is_ganged() -- 2.32.0
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin

