feat(view): D4 Design View action family + reapply-on-open wiring
Register toggle/activate/tag/untag/show-both actions driving the D2 shell and D3 model; reapply saved active mode on project load via a persist load-signal seam. Shared guidString helper; pure nextModeId unit-tested.
This commit is contained in:
+2
-14
@@ -14,13 +14,12 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "track_guid.h"
|
||||
#include "view_tree.h"
|
||||
|
||||
#define REAPERAPI_MINIMAL
|
||||
#define REAPERAPI_WANT_CountTracks
|
||||
#define REAPERAPI_WANT_GetTrack
|
||||
#define REAPERAPI_WANT_GetTrackGUID
|
||||
#define REAPERAPI_WANT_guidToString
|
||||
#define REAPERAPI_WANT_GetMediaTrackInfo_Value
|
||||
#define REAPERAPI_WANT_SetMediaTrackInfo_Value
|
||||
#define REAPERAPI_WANT_TrackFX_GetCount
|
||||
@@ -34,17 +33,6 @@ namespace reasampler {
|
||||
|
||||
namespace {
|
||||
|
||||
// REAPER's GUID -> string form. guidToString needs a 64-byte destination (SDK
|
||||
// contract); the canonical "{XXXXXXXX-...}" string is the membership-index key the
|
||||
// actions layer tags with, so the tree keys and the model keys align exactly.
|
||||
std::string trackGuidString(MediaTrack* tr) {
|
||||
GUID* g = GetTrackGUID(tr);
|
||||
if (!g) return {};
|
||||
char buf[64] = {0};
|
||||
guidToString(g, buf);
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
// The parmname for each planner Flag. All four are documented bool*/int* track
|
||||
// info params driven through the double-valued Get/SetMediaTrackInfo_Value API.
|
||||
const char* flagParm(Flag f) {
|
||||
@@ -72,7 +60,7 @@ std::vector<TrackFolderEntry> readFolderEntries(
|
||||
for (int i = 0; i < count; ++i) {
|
||||
MediaTrack* tr = GetTrack(proj, i);
|
||||
if (!tr) continue;
|
||||
std::string guid = trackGuidString(tr);
|
||||
std::string guid = guidString(tr);
|
||||
if (guid.empty()) continue;
|
||||
int depth = static_cast<int>(GetMediaTrackInfo_Value(tr, "I_FOLDERDEPTH"));
|
||||
entries.push_back(TrackFolderEntry{guid, depth});
|
||||
|
||||
Reference in New Issue
Block a user