conformtools 0.6.18 → 0.6.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/{account-O3J732QJ.js → account-VD3EE5UT.js} +1 -1
- package/dist/{agent-hook-setup-HBT2LTVR.js → agent-hook-setup-D2QNHA3V.js} +1 -1
- package/dist/{analysis-engine-BZUEBW55.js → analysis-engine-VNGF3DE4.js} +1 -1
- package/dist/{bridge-25FGN67G.js → bridge-MLBUD6XW.js} +1 -1
- package/dist/browser/timeline_core_bg.wasm +0 -0
- package/dist/{chunk-ND2YUUUH.js → chunk-2S2ZPQQD.js} +1 -1
- package/dist/{chunk-S5AOIOTT.js → chunk-2WNNDPVR.js} +1 -1
- package/dist/chunk-2XQ42O7E.js +7 -0
- package/dist/{chunk-34JO3JNC.js → chunk-3WJSWOCS.js} +1 -1
- package/dist/{chunk-AYUKWSCR.js → chunk-4UT55WZA.js} +1 -1
- package/dist/{chunk-TD3ZHREE.js → chunk-4V3KLFCJ.js} +1 -1
- package/dist/chunk-6IL7M3VP.js +162 -0
- package/dist/chunk-A7AYMSY7.js +9 -0
- package/dist/chunk-COALWMI7.js +4 -0
- package/dist/chunk-GBNPOZ32.js +10 -0
- package/dist/{chunk-PIM3PV5N.js → chunk-GHP6HDLM.js} +1 -1
- package/dist/{chunk-3DYCTUSQ.js → chunk-HCT34NDA.js} +1 -1
- package/dist/{chunk-DIW5X4GI.js → chunk-HROU7LLU.js} +1 -1
- package/dist/{chunk-ANQZKVDD.js → chunk-IPQLKAF2.js} +1 -1
- package/dist/chunk-JVJUJKUP.js +5 -0
- package/dist/chunk-M545OKDZ.js +6 -0
- package/dist/chunk-MU5AGXSH.js +3 -0
- package/dist/chunk-OSPDH2RK.js +6 -0
- package/dist/{chunk-MHBNMYZP.js → chunk-V2FVIZT7.js} +1 -1
- package/dist/chunk-WYI4LL4P.js +535 -0
- package/dist/chunk-Y7PFSVRX.js +3 -0
- package/dist/chunk-ZAL7Y5VZ.js +7 -0
- package/dist/{claude-setup-W27DLJIO.js → claude-setup-AI4WXN2V.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/demo-engine-MOHHYVGV.js +3 -0
- package/dist/engine-WMOJ3HRU.js +5 -0
- package/dist/framing-U46POZQG.js +3 -0
- package/dist/gfx-worker.js +1 -1
- package/dist/{h264-YX5KP63E.js → h264-4ETGWMKR.js} +1 -1
- package/dist/{h264-mxf-VAHIJCA7.js → h264-mxf-EFHHQL7X.js} +1 -1
- package/dist/hook.js +3 -2
- package/dist/host-relink-MVHI3YQI.js +10 -0
- package/dist/hosted-6BLHLZXM.js +3 -0
- package/dist/hosts-7UO4QETB.js +3 -0
- package/dist/http.js +4 -3
- package/dist/{inspect-7XEE32P5.js → inspect-5TMUYGAL.js} +17 -17
- package/dist/{isobmff-RHP3N5K2.js → isobmff-55TPOVCK.js} +1 -1
- package/dist/{mc-video-CHBOYPI5.js → mc-video-GKWEWCEQ.js} +1 -1
- package/dist/mcp.js +8 -8
- package/dist/media-HCKSVARE.js +3 -0
- package/dist/{mxf-R2ONKSYU.js → mxf-AJTCMKTX.js} +1 -1
- package/dist/{ops-MKDFWWPG.js → ops-UGZODMYE.js} +1 -1
- package/dist/{probe-YDOFGCGD.js → probe-YOYK7HR5.js} +1 -1
- package/dist/{r3d-F4OWLQE2.js → r3d-XHSJUARW.js} +1 -1
- package/dist/resolve-bridge.py +173 -27
- package/dist/{sequence-patch-2S7IPE52.js → sequence-patch-5MFTY52Q.js} +1 -1
- package/dist/{store-A5AKWOSX.js → store-6XN5Q6UG.js} +1 -1
- package/dist/{timeline-ZHDJXDZJ.js → timeline-TFF3L7JP.js} +1 -1
- package/dist/timeline_core-6BRZG4LP.js +3 -0
- package/package.json +5 -5
- package/dist/chunk-2V5PY4P5.js +0 -5
- package/dist/chunk-6B3IELRW.js +0 -6
- package/dist/chunk-AAJRTGEP.js +0 -10
- package/dist/chunk-GTPTZRO6.js +0 -3
- package/dist/chunk-IDEKLW7C.js +0 -3
- package/dist/chunk-LP2MR4ZH.js +0 -516
- package/dist/chunk-NN444GPH.js +0 -6
- package/dist/chunk-QBQJDV2F.js +0 -161
- package/dist/chunk-ROGMKTND.js +0 -4
- package/dist/chunk-RXRBRR3E.js +0 -10
- package/dist/chunk-T7S2UBNN.js +0 -7
- package/dist/chunk-UIX3TT72.js +0 -7
- package/dist/demo-engine-JAQPM4EV.js +0 -3
- package/dist/engine-ZGBF3SQN.js +0 -5
- package/dist/framing-PGFJZIBU.js +0 -3
- package/dist/host-relink-M2VWUZW5.js +0 -10
- package/dist/hosted-4CNQYNX5.js +0 -3
- package/dist/hosts-R4BHIZJS.js +0 -3
- package/dist/media-4VUWQJLQ.js +0 -3
- package/dist/timeline_core-ZKQQHUA2.js +0 -3
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
import{g as a,h as b,i as c,j as d,k as e,l as f,m as g,n as h,o as i,p as j,q as k,r as l,s as m,t as n,u as o,v as p,w as q}from"./chunk-GBNPOZ32.js";import"./chunk-3PVQ5QP4.js";import"./chunk-VFXMP7IF.js";import"./chunk-BBCQMZQN.js";import"./chunk-2DEUYEQD.js";import"./chunk-4V3KLFCJ.js";import"./chunk-2S2ZPQQD.js";import"./chunk-NU3X7P4N.js";import"./chunk-L2RTMZCN.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{a as MEDIA_EXTS,g as bwfAt,q as coverage,e as decodeFrameRgba,o as factsLine,h as factsText,n as findMedia,p as findText,c as folderClip,i as islandsFor,m as nameMatch,l as normName,d as openSource,f as probeMedia,b as siblingParts,k as trimMedia,j as trimSource};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as N}from"./chunk-AACY2V3L.js";import{b as $}from"./chunk-
|
|
3
|
+
import{a as N}from"./chunk-AACY2V3L.js";import{b as $}from"./chunk-4V3KLFCJ.js";import{b as J}from"./chunk-2S2ZPQQD.js";import{Ha as l,M,R as P,b as U,ca as D,da as T,e as B,ea as C,fa as E,g as S,ga as L,ia as O,ra as V,ua as W,w as k,wa as G}from"./chunk-L2RTMZCN.js";import"./chunk-PSANHDZM.js";var z=new Uint8Array([6,14,43,52,2,5,1,1,13,1,2,1,1,17,1,0]);function oe(t){e:for(let r=t.length-z.length;r>=0;r--){for(let e=0;e<z.length;e++)if(t[r+e]!==z[e])continue e;return r}return-1}function j(t,r){if(r>=t.byteLength)return[null,0];let e=t.getUint8(r);if(e<128)return[e,1];let n=e&127;if(n===0||n>8||r+1+n>t.byteLength)return[null,1];let a=0;for(let i=0;i<n;i++)a=a*256+t.getUint8(r+1+i);return[a,1+n]}function b(t,r){let e=t.getUint32(r,!1),n=t.getUint32(r+4,!1);return e*4294967296+n}async function Z(t){let r=t.fileSize,e=[];if(r<1024)return e;let a=Math.max(0,r-65536),i=r-a,o=await t.read(a,i);e.push({offset:a,length:i});let s=oe(o);if(s<0)return e;let c=new DataView(o.buffer,o.byteOffset,o.byteLength),[f,re]=j(c,s+16);if(f===null||f<16||f>65536)return e;let F=s+16+re;if(F+f>o.length)return e;let A=[],te=new DataView(o.buffer,o.byteOffset+F,f),g=Math.floor((f-4)/12);if(g<1||g>4096)return e;for(let u=0;u<g;u++){let d=b(te,u*12+4);d>=0&&d<r&&A.push(d)}for(let u of A){let d=Math.min(256,r-u),p=await t.read(u,d);if(p.length<80)continue;let _=new DataView(p.buffer,p.byteOffset,p.byteLength),[R,v]=j(_,16);if(R===null)continue;let m=16+v,y,x;if(p.length<m+64){let ie=Math.min(m+64,r-u),h=await t.read(u,ie);if(h.length<m+64)continue;let I=new DataView(h.buffer,h.byteOffset,h.byteLength);y=b(I,m+32),x=b(I,m+40)}else y=b(_,m+32),x=b(_,m+40);let ne=u+16+v+R+y+x,ae=Math.min(ne+65536,r)-u;e.push({offset:u,length:ae})}return e}function H(t,r){let e=[];for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let a=n.source_range.start.value,i=n.source_range.duration.value,o=Math.max(0,Math.floor(a)-r),s=Math.floor(a+i-1)+r;s>=o&&e.push({first_frame:o,last_frame:s})}return e}function se(t,r){let e=[...t].sort((i,o)=>i.offset-o.offset),n=[],a=0;for(let i of e)i.offset>a&&n.push({offset:a,length:i.offset-a}),a=Math.max(a,i.offset+i.length);return a<r&&n.push({offset:a,length:r-a}),n}async function q(t,r,e){let n=H(r,0);if(n.length===0)throw new Error("planMxfTrimsFromItems: no usable trim ranges in items");await l();let a=(o,s)=>t.read(o,s),i=await $(n,e,(o,s)=>V(a,t.fileSize,o,s));return i.map((o,s)=>{let c=JSON.parse(o);return i.length>1&&(c.output_clip_number=s+1,c.output_clip_count=i.length,c.output_part_number=1),c})}async function K(t,r,e){await l();let n=H(r,e),i=await W((s,c)=>t.read(s,c),t.fileSize,JSON.stringify(n));if(i!=="null")return JSON.parse(i);console.warn(`[mxf] no parseable index \u2014 shipping the WHOLE file (${t.fileSize} bytes). The cut's ${n.length} range(s) cannot be addressed; nothing is trimmed.`);let o=(await Z(t)).map(s=>({offset:s.offset,length:s.length}));return{fileSize:t.fileSize,structuralRanges:o,essenceRanges:se(o,t.fileSize),trimInputs:n,wholeFileFallback:!0}}async function Q(t){await l();let e=await G((n,a)=>t.read(n,a),t.fileSize);return JSON.parse(e)}function w(t){return(r,e)=>t.read(r,e)}var Me={async inspect(t){let r=t.parts[0],e=await Q(r);if(!e)return null;let n=e.timecode??null,a=n&&n.fps_denominator>0?n.fps_numerator/n.fps_denominator:null,i=e.width??null,o=e.height??null,s=e.inner_codec==="mpeg2"||e.inner_codec==="dv"?e.inner_codec:null;return{id:r.filename,kind:"external",target_url:r.filename,available_range:a&&e.frame_count?{start:{value:0,rate:a},duration:{value:e.frame_count,rate:a}}:null,reel_name:null,source_timecode:n?.display??null,source_fps:a,source_resolution_w:i,source_resolution_h:o,container:"mxf",codec:s,size_bytes:r.fileSize,streams:[...i||o||a?[{kind:"video",codec:s,width:i??void 0,height:o??void 0,rate:a??void 0,codec_specific:null}]:[],...e.audio?[{kind:"audio",codec:e.audio.codec_fourcc,channels:e.audio.channels??void 0,rate:e.audio.sample_rate??void 0,bit_depth:e.audio.bit_depth??void 0,codec_specific:{fourcc:e.audio.codec_fourcc}}]:[]],decode_provenance:e.decode_provenance??null,vendor_metadata:{frame_count:e.frame_count,...n?{drop_frame:n.drop_frame}:{},...e.inner_codec?{inner_codec:e.inner_codec}:{},...e.truncated?{truncated:!0}:{}},binding_state:"unbound",raw_extraction:{mxf_probe:e},metadata:{}}},async extract(t){await l();let r=t.parts[0],e=JSON.parse(await O(w(r),r.fileSize));return e.length===0?null:{v:1,container:"mxf",codec:"mxf",frame_count:N(e),granularity:"frame",segments:e}},async sparsify(t,r){let e=t.parts[0],n=await K(e,r.items,r.handles);return[{filename:e.filename,fileSize:n.fileSize,structuralRanges:n.structuralRanges,essenceRanges:n.essenceRanges,trimInputs:n.trimInputs,wholeFileFallback:n.wholeFileFallback}]},async trim(t,r){let e=t.parts[0];return q(e,r.items,r.handles)},async decode(t,r,e){await l();let n=t.parts[0],a=w(n),i=await ee(t),o=e.detail==="coarse",s;if(i==="arriraw")s=await S(a,n.fileSize,r,o?"preview:4":"full");else if(i==="arriraw-alev3")s=await B(a,n.fileSize,r,o?"preview:4":"full");else if(i==="dnxhr")s=await M(a,n.fileSize,r,o?"preview":"full");else if(i==="xocn")s=await P(a,n.fileSize,r,o?"preview":"full");else if(i==="prores")s=await k(a,n.fileSize,r,o?"preview":"full");else throw new Error(`mxf decode: no decoder for inner codec '${i}'`);let c=new DataView(s.buffer,s.byteOffset,8);return{width:c.getUint32(0,!0),height:c.getUint32(4,!0),rgba:s.slice(8)}},async decode16(t,r){await l();let e=t.parts[0],n=w(e),a=await ee(t),i;try{if(a==="arriraw"){let o=await ue(t,r);if(o)return o;i=await S(n,e.fileSize,r,"rgb16")}else if(a==="dnxhr")i=await M(n,e.fileSize,r,"rgb16");else if(a==="xocn")i=await P(n,e.fileSize,r,"rgb16");else throw new Error(`mxf decode16: no decoder for inner codec '${a}'`)}catch(o){throw fe(o,a)}return J(i)}};function fe(t,r){let e=typeof t=="string"?t:t instanceof Error?t.message:"";return/has no 16-bit decoder|no rgb16 tier/.test(e)?new Error(`mxf ${r}: has no 16-bit decoder \u2014 ${e}`):t}var X=new WeakMap;async function ue(t,r){if(!!0)return null;try{let e=await import("./arriraw-PS6V532Y.js");if(!await e.arrirawGpuAvailable())return null;let{parseArrirawGpuPayload:n,arrirawFrameToRgb16:a}=await import("./clip-state-B6JOX3JE.js"),i=t.parts[0],o=X.get(t)??null,s=await U(w(i),i.fileSize,r,o?.key),c=n(s,o);if(!c)return null;X.set(t,{key:c.key,state:c.state});let f=await e.decodeArrirawFrameGpu(c.essence,c.state);return f?{width:f.width,height:f.height,rgb16:a(f)}:null}catch{return null}}var Y=new WeakMap;async function ee(t){let r=Y.get(t);if(r)return r;await l();let e=t.parts[0],n=w(e),a="mxf";return await T(n,e.fileSize)?a="arriraw":await D(n,e.fileSize)?a="arriraw-alev3":await E(n,e.fileSize)?a="dnxhr":await L(n,e.fileSize)?a="xocn":await C(n,e.fileSize)&&(a="prores"),Y.set(t,a),a}export{Me as mxfFormat};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a,b,c,d,e,f,g,h,i}from"./chunk-
|
|
3
|
+
import{a,b,c,d,e,f,g,h,i}from"./chunk-2S2ZPQQD.js";import"./chunk-PSANHDZM.js";export{c as CoverageMissError,e as DeliveryCoverageMissError,a as INTENTS,f as asDeliveryCoverageMiss,h as extract,i as mediaOp,d as parseDeliveryCoverageMiss,g as resolveFormat,b as unpackFrame16};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{
|
|
3
|
+
import{I as b,R as $,b as m,da as o,h as c,k as p,p as f,v as d}from"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";import{dirname as g}from"node:path";import{fileURLToPath as P}from"node:url";import x from"node:process";var a="ColorMatchProbe.ofx.bundle",R="http://127.0.0.1:9876",u="/Library/OFX/Plugins";async function v(){let r=x.execPath;for(let t of[m("CONFORM_RESOLVE_PROBE"),o(g(r),"..","Resources","resolve-probe",a),o(g(P(import.meta.url)),"..","..","..","resolve_hook","build",a)])if(t&&await d(o(t,"Contents","MacOS","ColorMatchProbe.ofx")))return t;return null}async function k(){let r=c()==="darwin"&&p()==="arm64",t=await d(o(u,a)),n=await fetch(R+"/",{signal:AbortSignal.timeout(500)}).then(i=>i.ok).catch(()=>!1),s=!!await v();return{installed:t,loaded:n,shipped:s,supported:r,next:r?n?"running: the Color page selection and the selected node are read live":t?"installed; restart Resolve to load it":s?"host_setup host=resolve action=install_probe (asks for an administrator), then restart Resolve":"not in this build":"the probe runs on Apple silicon Macs only"}}async function C(){if(c()!=="darwin"||p()!=="arm64")throw new Error("the probe runs on Apple silicon Macs only");let r=await v();if(!r)throw new Error("this build does not carry the probe (resolve_hook/build.sh makes it)");return await O(r,u,a),await b(o(f(),"Library","Application Support","Blackmagic Design","DaVinci Resolve","OFXPluginCacheV2.xml")).catch(()=>{}),{path:o(u,a),restart_required:!0}}var e=r=>`'${r.replace(/'/g,"'\\''")}'`;async function O(r,t,n){let s=o(t,n),l=o(t,`.${n}.staging`),i=o(t,`.${n}.previous`),w=[`mkdir -p ${e(t)}`,`rm -rf ${e(l)} ${e(i)}`,`cp -R ${e(r)} ${e(l)}`,`if [ -e ${e(s)} ]; then mv ${e(s)} ${e(i)}; fi`,`mv ${e(l)} ${e(s)} || { [ -e ${e(i)} ] && mv ${e(i)} ${e(s)}; exit 1; }`,`rm -rf ${e(i)}`].join(" && "),h=await $("osascript",["-e",`do shell script ${JSON.stringify(w)} with administrator privileges`]);if(!h.success)throw new Error(`installing into ${t} needs an administrator, and that was refused or failed: ${h.stderr.trim()}`)}export{a as PROBE_BUNDLE,R as PROBE_URL,C as installProbe,k as probeStatus};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{c as l}from"./chunk-
|
|
3
|
+
import{c as l}from"./chunk-2S2ZPQQD.js";import{Aa as v,Ba as F,H as _,Ha as f,I as S,J as P,ja as b,ka as R,xa as w}from"./chunk-L2RTMZCN.js";import"./chunk-PSANHDZM.js";var g=class{constructor(e=[]){this.ranges=[];for(let[r,n]of e)this.add(r,n)}add(e,r){if(r<=e)return;let n=[],[s,o]=[e,r];for(let[i,a]of this.ranges)a<s||i>o?n.push([i,a]):(s=Math.min(s,i),o=Math.max(o,a));n.push([s,o]),n.sort((i,a)=>i[0]-a[0]),this.ranges=n}has(e,r){return r<=e?!0:this.ranges.some(([n,s])=>n<=e&&s>=r)}missing(e,r){if(r<=e)return[];let n=[],s=e;for(let[o,i]of this.ranges)if(!(i<=s)&&(o>=r||(o>s&&n.push([s,Math.min(o,r)]),s=Math.max(s,i),s>=r)))break;return s<r&&n.push([s,r]),n}count(){return this.ranges.reduce((e,[r,n])=>e+(n-r),0)}toJSON(){return this.ranges.map(([e,r])=>[e,r])}};function N(t,e){let r=new g;for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let s=n.source_range.start.value,o=n.source_range.duration.value,i=Math.max(0,Math.max(0,Math.floor(s))-e),a=Math.floor(s+o)+e;a>i&&r.add(i,a)}return r.toJSON()}function O(t,e,r){let n=N(e,r),s=a=>n.some(([c,u])=>a>=c&&a<u),o=new Map,i=a=>{let c=o.get(a);return c||(c={part:a,structuralRanges:[],essenceRanges:[]},o.set(a,c)),c};for(let a of t.segments){let c=a.part??0;a.kind==="structural"?i(c).structuralRanges.push({offset:a.offset,length:a.length}):(a.kind==="frame"||a.kind==="gop")&&a.frame_in!=null&&s(a.frame_in)&&i(c).essenceRanges.push({offset:a.offset,length:a.length})}return[...o.values()].sort((a,c)=>a.part-c.part)}async function A(t,e){if(!!0)return null;try{let n=await(await import("./r3d-EKISZSKU.js")).decodeR3dRgbaGpu(t,e);return n?{width:n.width,height:n.height,rgba:n.rgba}:null}catch{return null}}function p(t){return(e,r,n)=>t.parts[e].read(r,n)}function d(t){return JSON.stringify(t.parts.map(e=>({name:e.filename,size:e.fileSize})))}function L(t,e){let r=[];for(let n of t){if(n.kind!=="clip"||!n.source_range)continue;let s=n.source_range.start.value,o=n.source_range.duration.value;r.push({frame_in:Math.max(0,Math.floor(s)),frame_out:Math.floor(s+o),handles:e})}return JSON.stringify(r)}var k=16,h=new WeakMap,J=new WeakMap;function x(t){let e=J.get(t);return e||(e=t.parts[0].read(0,Math.min(16*1024,t.parts[0].fileSize)),J.set(t,e)),e}async function D(t){let e=h.get(t);return e||(await f(),e=JSON.parse(await b(p(t),d(t))),h.set(t,e)),e}async function G(t){await f();let e=await b(p(t),d(t));return h.set(t,JSON.parse(e)),e}function B(t,e){h.set(t,JSON.parse(e))}async function C(t,e){let r=JSON.parse(await R(p(t),d(t)));return{v:1,container:"r3d",codec:"redcode",frame_count:e.frame_count,granularity:"frame",...t.parts.length>1?{part_names:t.parts.map(n=>n.filename.split(/[/\\]/).pop()??n.filename)}:{},segments:r}}var V={async inspect(t){await f();let e=await w(p(t),d(t)),r=JSON.parse(e);if(!r||r.frame_count===0)return null;let n=t.parts[0],s=r.timecode??null,o=s&&s.fps_denominator>0?s.fps_numerator/s.fps_denominator:null,i=r.width??null,a=r.height??null;return{id:n.filename,kind:"external",target_url:n.filename,available_range:o&&r.frame_count?{start:{value:0,rate:o},duration:{value:r.frame_count,rate:o}}:null,reel_name:r.reel??null,source_timecode:s?.display??null,source_fps:o,source_resolution_w:i,source_resolution_h:a,container:"r3d",codec:"redcode",size_bytes:r.file_size,streams:[{kind:"video",codec:"redcode",width:i??void 0,height:a??void 0,rate:o??void 0,bit_depth:k,codec_specific:{fourcc:r.codec_fourcc??"REDCODE"}}],decode_provenance:r.decode_provenance??null,vendor_metadata:{frame_count:r.frame_count,...s?{drop_frame:s.drop_frame}:{}},binding_state:"unbound",raw_extraction:{r3d_probe:r},metadata:{}}},async extract(t){await f();let e=JSON.parse(await w(p(t),d(t)));return!e||e.frame_count===0?null:C(t,e)},async sparsify(t,e){await f();let r=JSON.parse(await R(p(t),d(t))),n={v:1,container:"r3d",codec:"redcode",frame_count:r.filter(o=>o.kind==="frame").length,granularity:"frame",segments:r},s=new Map;for(let o of r)o.kind==="frame"&&s.set(o.part??0,(s.get(o.part??0)??0)+1);return O(n,e.items,e.handles).map(o=>({filename:t.parts[o.part].filename,fileSize:t.parts[o.part].fileSize,structuralRanges:o.structuralRanges,essenceRanges:o.essenceRanges,frameCount:s.get(o.part)??0,keptFrames:o.essenceRanges.length}))},async trim(t,e){await f();let r=t.parts.some(a=>a.dataRanges!==void 0),n=r?JSON.stringify(t.parts.map(a=>a.dataRanges??[])):"[]",s=r?"[]":L(e.items,e.handles),o=await F(p(t),d(t),s,n);return JSON.parse(o).parts.map(a=>a.trim_plan)},async decode(t,e,r){await f();let n=await D(t);if(e<0||e>=n.length)throw new l(e,n.length);let s=n[e],o=s.part??0,i=t.parts[o];if(!i)throw new l(e,n.length);let a=await i.read(s.essenceOffset,s.essenceLength),c=2,u=await x(t),m;if(r.detail==="coarse")m=_(a,u,0);else if(v(a))m=_(a,u,c);else{let y=await A(a,u);if(y)return y;m=P(a,u)}let M=new DataView(m.buffer,m.byteOffset,8);return{width:M.getUint32(0,!0),height:M.getUint32(4,!0),rgba:m.slice(8)}},async decode16(t,e){await f();let r=await D(t);if(e<0||e>=r.length)throw new l(e,r.length);let n=r[e],s=t.parts[n.part??0];if(!s)throw new l(e,r.length);let o=await s.read(n.essenceOffset,n.essenceLength),i=S(o),a=new DataView(i.buffer,i.byteOffset,8),c=a.getUint32(0,!0),u=a.getUint32(4,!0),m=i.slice(8);return{width:c,height:u,rgb16:new Uint16Array(m.buffer,m.byteOffset,c*u*3)}}};export{G as listR3dFramesJson,V as r3dFormat,B as seedR3dFramesJson};
|
package/dist/resolve-bridge.py
CHANGED
|
@@ -139,6 +139,12 @@ def tracks_of(p, t):
|
|
|
139
139
|
return out
|
|
140
140
|
|
|
141
141
|
|
|
142
|
+
def has(obj, name):
|
|
143
|
+
"""obj has the method `name`. Not hasattr: Resolve's proxies answer every name (20.3: TimelineItem.GetSpeed is
|
|
144
|
+
None, not missing), so an API a version lacks is only seen by it not being callable."""
|
|
145
|
+
return callable(getattr(obj, name, None))
|
|
146
|
+
|
|
147
|
+
|
|
142
148
|
def pool_folder(media_pool, path, create=False):
|
|
143
149
|
"""The media pool folder at "A/B/C" under the root ("" = the root). Missing folders are created
|
|
144
150
|
only when `create`; otherwise (None, the first missing name)."""
|
|
@@ -168,14 +174,14 @@ def _project(resolve, p, args):
|
|
|
168
174
|
found = dict((q, []) for q in finds)
|
|
169
175
|
# the bin selected in the Media Pool (0.9.5 All Clips read every timeline in it): its path, "" = Master
|
|
170
176
|
cur = mp.GetCurrentFolder()
|
|
171
|
-
cur_id = cur.GetUniqueId() if cur and
|
|
177
|
+
cur_id = cur.GetUniqueId() if cur and has(cur, "GetUniqueId") else None
|
|
172
178
|
selected = [None]
|
|
173
179
|
|
|
174
180
|
# ponytail: GetClipProperty per clip walks the whole pool; fine for thousands, page it if it ever is not
|
|
175
181
|
def walk(folder, path):
|
|
176
182
|
clips = folder.GetClipList() or []
|
|
177
183
|
node = {"path": path, "clips": len(clips), "folders": []}
|
|
178
|
-
if cur_id and
|
|
184
|
+
if cur_id and has(folder, "GetUniqueId") and folder.GetUniqueId() == cur_id:
|
|
179
185
|
selected[0] = path
|
|
180
186
|
if want_clips or finds:
|
|
181
187
|
rows = []
|
|
@@ -257,7 +263,7 @@ def _grab_grades(resolve, p, items, out_dir):
|
|
|
257
263
|
# ponytail: non-drop timecode (as a_still)
|
|
258
264
|
t.SetCurrentTimecode("%02d:%02d:%02d:%02d" % (f // (3600 * n), f // (60 * n) % 60, f // n % 60, f % n))
|
|
259
265
|
time.sleep(0.3)
|
|
260
|
-
cur = t.GetCurrentVideoItem()
|
|
266
|
+
cur = t.GetCurrentVideoItem() if has(t, "GetCurrentVideoItem") else None
|
|
261
267
|
before = set(os.listdir(out_dir))
|
|
262
268
|
if not cur or int(cur.GetStart()) != f:
|
|
263
269
|
got[x["key"]] = {"error": "the Color page did not land on the clip at %s" % x["start"]}
|
|
@@ -833,7 +839,7 @@ def _queue_and_start(resolve, p, tl, args, target, page, prev_tl, off):
|
|
|
833
839
|
# our job is ONE file of the range: in "Individual clips" mode (the artist's Deliver page can be left there) Resolve
|
|
834
840
|
# renders each clip under the range whole, at its source TC, named <name>_00000000 (live, 21.1: a 1-frame marker
|
|
835
841
|
# came out as its 72-frame clip). Single clip for our job; the artist's mode is put back once it is queued.
|
|
836
|
-
mode = p.GetCurrentRenderMode() if
|
|
842
|
+
mode = p.GetCurrentRenderMode() if has(p, "GetCurrentRenderMode") else None
|
|
837
843
|
if mode not in (None, 1):
|
|
838
844
|
p.SetCurrentRenderMode(1)
|
|
839
845
|
routed, rejected = None, []
|
|
@@ -1028,9 +1034,18 @@ def a_clips(resolve, args):
|
|
|
1028
1034
|
"fps": t.GetSetting("timelineFrameRate"), "clips": out}
|
|
1029
1035
|
|
|
1030
1036
|
|
|
1037
|
+
def _left_offset(it):
|
|
1038
|
+
"""How far into its media a timeline clip starts: a clip marker's frame is counted from the media's first frame,
|
|
1039
|
+
so the clip's own first frame is this one (0 for a clip that starts where its media does)."""
|
|
1040
|
+
try:
|
|
1041
|
+
return int(it.GetLeftOffset()) if has(it, "GetLeftOffset") else 0
|
|
1042
|
+
except Exception:
|
|
1043
|
+
return 0
|
|
1044
|
+
|
|
1045
|
+
|
|
1031
1046
|
def a_markers(resolve, args):
|
|
1032
1047
|
"""Place or clear OUR markers on a timeline, or on its video clips (a place with `clip: {track, start}`: frames from
|
|
1033
|
-
the timeline head; the marker
|
|
1048
|
+
the timeline head; the marker lands on that record frame of the clip, 0.9.5 Master QC "markers on clips"). Ours carry
|
|
1034
1049
|
customData starting with the tag; a marker someone else placed is never edited or deleted: ours takes the next free
|
|
1035
1050
|
frame. `reconcile`: ours from an earlier run, on the timeline or on any video clip, whose finding is gone turn green
|
|
1036
1051
|
RESOLVED."""
|
|
@@ -1059,8 +1074,12 @@ def a_markers(resolve, args):
|
|
|
1059
1074
|
if key and h is None:
|
|
1060
1075
|
key, h = None, t # no clip there now: the timeline holds it
|
|
1061
1076
|
if key:
|
|
1062
|
-
|
|
1063
|
-
|
|
1077
|
+
# a clip marker sits on a frame of the clip's MEDIA (left offset + frames into the clip), not on a frame
|
|
1078
|
+
# counted from the clip's first frame: measured 2026-11-09 (Resolve 20.3, a clip 20 frames into its media:
|
|
1079
|
+
# AddMarker(22) draws at the clip's 2nd frame, AddMarker(5) before the clip, unseen)
|
|
1080
|
+
lo = _left_offset(h)
|
|
1081
|
+
f += lo - key[1]
|
|
1082
|
+
dur = max(1, min(dur, int(h.GetEnd()) - int(h.GetStart()) - (f - lo)))
|
|
1064
1083
|
hosts[key] = h
|
|
1065
1084
|
everyone, mine = h.GetMarkers() or {}, ours(h)
|
|
1066
1085
|
if f in mine and (key, f) not in wanted:
|
|
@@ -1124,6 +1143,15 @@ def _item_index(t):
|
|
|
1124
1143
|
return by_pos, by_id
|
|
1125
1144
|
|
|
1126
1145
|
|
|
1146
|
+
def _marker_list(h):
|
|
1147
|
+
"""Every marker of a timeline or clip as Resolve holds it (GetMarkers: the frame is Resolve's own, from the
|
|
1148
|
+
timeline's start / the clip's media start). The live read takes positions from here, not the .drt, whose marker
|
|
1149
|
+
positions decode wrong (2026-11-09: API 5/20/30/55, decoded 3/10/15/28)."""
|
|
1150
|
+
return [{"frame": int(f), "color": m.get("color") or "", "name": m.get("name") or "", "note": m.get("note") or "",
|
|
1151
|
+
"duration": int(m.get("duration") or 1), "data": m.get("customData") or ""}
|
|
1152
|
+
for f, m in sorted((h.GetMarkers() or {}).items(), key=lambda x: int(x[0]))]
|
|
1153
|
+
|
|
1154
|
+
|
|
1127
1155
|
def _marker_data(h):
|
|
1128
1156
|
"""{frame: customData} of the markers that carry one (0.9.5's marker "keyword"; a timeline file has none)."""
|
|
1129
1157
|
return dict((str(int(f)), m.get("customData")) for f, m in (h.GetMarkers() or {}).items() if m.get("customData"))
|
|
@@ -1138,6 +1166,7 @@ def _item_row(it, kind, track, t0):
|
|
|
1138
1166
|
"flags": list(it.GetFlagList() or []), "enabled": bool(it.GetClipEnabled()),
|
|
1139
1167
|
"version": v.get("versionName", ""), "version_type": v.get("versionType"),
|
|
1140
1168
|
"group": g.GetName() if g else "", "markers": len(it.GetMarkers() or {}), "marker_data": _marker_data(it),
|
|
1169
|
+
"marker_list": _marker_list(it),
|
|
1141
1170
|
"versions": list(it.GetVersionNameList(0) or []) if kind == "video" else [],
|
|
1142
1171
|
"nodes": int(it.GetNodeGraph().GetNumNodes() or 0) if kind == "video" and it.GetNodeGraph() else 0,
|
|
1143
1172
|
"stacks": _stacks(it) if kind == "video" else [],
|
|
@@ -1146,12 +1175,22 @@ def _item_row(it, kind, track, t0):
|
|
|
1146
1175
|
"online": (mpi.GetClipProperty("Online Status") or "") != "Offline" if mpi else None,
|
|
1147
1176
|
"src_in": _int_or_none(it.GetSourceStartFrame) if kind == "video" else None,
|
|
1148
1177
|
# 21.1: the clip's retime and fades (Reconform carries them; Edit Index+ lists them)
|
|
1149
|
-
"speed": (it.GetSpeed() or {}).get("Percentage") if
|
|
1178
|
+
"speed": (it.GetSpeed() or {}).get("Percentage") if has(it, "GetSpeed") else None,
|
|
1150
1179
|
"zoom_x": it.GetProperty("ZoomX") if kind == "video" else None,
|
|
1151
|
-
"fades": (it.GetFades() or {}) if
|
|
1180
|
+
"fades": (it.GetFades() or {}) if has(it, "GetFades") else None,
|
|
1152
1181
|
"keywords": (mpi.GetMetadata("Keywords") or "") if mpi else ""}
|
|
1153
1182
|
|
|
1154
1183
|
|
|
1184
|
+
def _media_facts(mpi, into):
|
|
1185
|
+
"""Resolve's own word on a clip's media, once per file: its length and start (the .drt has neither, so live
|
|
1186
|
+
reads probed every file for them). Keyed by file path, the join the decoded media rows share."""
|
|
1187
|
+
path = (mpi.GetClipProperty("File Path") or "") if mpi else ""
|
|
1188
|
+
if not path or path in into:
|
|
1189
|
+
return
|
|
1190
|
+
pr = mpi.GetClipProperty() or {}
|
|
1191
|
+
into[path] = {"start_tc": pr.get("Start TC") or "", "fps": pr.get("FPS") or "", "frames": pr.get("Frames") or ""}
|
|
1192
|
+
|
|
1193
|
+
|
|
1155
1194
|
def _stacks(it):
|
|
1156
1195
|
"""The clip's node tree per node stack (layer 1, 2, …): each node's label ("" unlabelled), in Resolve's numbering."""
|
|
1157
1196
|
out = []
|
|
@@ -1276,33 +1315,50 @@ def _items(p, args):
|
|
|
1276
1315
|
# like every item row: kind + track + start. With ColorMatchProbe in Resolve, the Color page filmstrip's
|
|
1277
1316
|
# Cmd-selected clips are added (the API does not report them) and `node` says which node is selected.
|
|
1278
1317
|
out, seen = [], set()
|
|
1318
|
+
where = {} # uid -> (kind, track): only when the item can't say (TimelineItem.GetTrackTypeAndIndex is newer
|
|
1319
|
+
# than some installs: on 20.3 every selection read failed "'NoneType' object is not callable")
|
|
1320
|
+
def track_of(it):
|
|
1321
|
+
if has(it, "GetTrackTypeAndIndex"):
|
|
1322
|
+
kind, track = it.GetTrackTypeAndIndex()
|
|
1323
|
+
return kind, int(track)
|
|
1324
|
+
if not where:
|
|
1325
|
+
for k in ("video", "audio", "subtitle"):
|
|
1326
|
+
for n in range(1, int(t.GetTrackCount(k) or 0) + 1):
|
|
1327
|
+
for x in t.GetItemListInTrack(k, n) or []:
|
|
1328
|
+
where[x.GetUniqueId()] = (k, n)
|
|
1329
|
+
return where.get(it.GetUniqueId(), (None, 0))
|
|
1279
1330
|
def add(it):
|
|
1280
1331
|
if it is None or it.GetUniqueId() in seen:
|
|
1281
1332
|
return
|
|
1282
1333
|
seen.add(it.GetUniqueId())
|
|
1283
|
-
kind, track = it
|
|
1334
|
+
kind, track = track_of(it)
|
|
1284
1335
|
out.append({"kind": kind, "track": int(track), "start": int(it.GetStart()) - t0, "id": it.GetUniqueId(), "name": it.GetName()})
|
|
1285
|
-
for it in t.GetSelectedClips() or []:
|
|
1336
|
+
for it in (t.GetSelectedClips() if has(t, "GetSelectedClips") else None) or []:
|
|
1286
1337
|
add(it)
|
|
1287
1338
|
probe = _probe_selection(t)
|
|
1288
1339
|
for it in probe.get("items", []):
|
|
1289
1340
|
add(it)
|
|
1290
|
-
return {"ok": True, "project": p.GetName(), "timeline": t.GetName(), "start_frame": t0, "selected": out,
|
|
1341
|
+
return {"ok": True, "project": p.GetName(), "timeline": t.GetName(), "start_frame": t0, "selected": out,
|
|
1342
|
+
"playhead_tc": (t.GetCurrentTimecode() if has(t, "GetCurrentTimecode") else "") or "",
|
|
1291
1343
|
**({"probe": True, "node": probe["node"]} if probe.get("on") else {})}
|
|
1292
1344
|
kinds = [args["kind"]] if args.get("kind") else ["video", "audio"]
|
|
1293
|
-
out = []
|
|
1345
|
+
out, media = [], {}
|
|
1294
1346
|
for kind in kinds:
|
|
1295
1347
|
tracks = [int(args["track"])] if args.get("track") else range(1, int(t.GetTrackCount(kind) or 0) + 1)
|
|
1296
1348
|
for track in tracks:
|
|
1297
1349
|
for it in t.GetItemListInTrack(kind, track) or []:
|
|
1298
1350
|
out.append(_item_row(it, kind, track, t0))
|
|
1351
|
+
_media_facts(it.GetMediaPoolItem(), media)
|
|
1299
1352
|
groups = [g.GetName() for g in (p.GetColorGroupsList() or [])]
|
|
1300
1353
|
return {"ok": True, "timeline": t.GetName(), "start_frame": t0, "items": out, "color_groups": groups,
|
|
1301
|
-
"layers": int(p.GetSetting("nodeStackLayers") or 1), "marker_data": _marker_data(t),
|
|
1354
|
+
"layers": int(p.GetSetting("nodeStackLayers") or 1), "marker_data": _marker_data(t), "marker_list": _marker_list(t),
|
|
1302
1355
|
"playhead_tc": t.GetCurrentTimecode() or "",
|
|
1356
|
+
"media_facts": media,
|
|
1357
|
+
# the timeline's own rate and length, as Resolve has them (the .drt read derived them)
|
|
1358
|
+
"fps": t.GetSetting("timelineFrameRate") or "", "frames": int(t.GetEndFrame()) - t0,
|
|
1303
1359
|
"raster": list(_raster(t)),
|
|
1304
1360
|
# only when asked: Resolve 21.1 flips to the Color page to answer it (QC's Blanking asks, no other read)
|
|
1305
|
-
**({"output_blanking": _blanking_px(t, *_raster(t))} if args.get("blanking") and
|
|
1361
|
+
**({"output_blanking": _blanking_px(t, *_raster(t))} if args.get("blanking") and has(t, "GetOutputBlanking") else {})}
|
|
1306
1362
|
|
|
1307
1363
|
|
|
1308
1364
|
def _graph(it, t, where):
|
|
@@ -1410,7 +1466,7 @@ def _op(p, t, op, find):
|
|
|
1410
1466
|
if kind == "timeline_output_blanking":
|
|
1411
1467
|
# the timeline's output blanking (21.1+), as pixels per edge; Resolve speaks edge coordinates (0.9.5
|
|
1412
1468
|
# utils/output_blanking.py, measured 21.1.0.14): {Top: 132, Bottom: 948, Left: 0, Right: 1920} is 132 px bars top and bottom
|
|
1413
|
-
if not
|
|
1469
|
+
if not has(t, "SetOutputBlanking"):
|
|
1414
1470
|
return {"ok": False, "undo": [], "detail": "output blanking needs Resolve 21.1 or later"}
|
|
1415
1471
|
w, h = _raster(t)
|
|
1416
1472
|
old = _blanking_px(t, w, h)
|
|
@@ -1621,7 +1677,7 @@ def _op(p, t, op, find):
|
|
|
1621
1677
|
if plate is not None and op.get("disable_plates") and plate.GetClipEnabled():
|
|
1622
1678
|
plate.SetClipEnabled(False)
|
|
1623
1679
|
undo.append({"op": "enabled", "item": {"track": int(pc["plate"]["track"]), "start": int(pc["plate"]["start"])}, "on": True})
|
|
1624
|
-
item.AddMarker(
|
|
1680
|
+
item.AddMarker(_left_offset(item), "Cyan", "VFX drop-in", pc.get("note") or "", 1, "ConformTools:vfx-dropin") # its first frame
|
|
1625
1681
|
finally:
|
|
1626
1682
|
if was and was.GetUniqueId() != t.GetUniqueId():
|
|
1627
1683
|
p.SetCurrentTimeline(was)
|
|
@@ -1715,7 +1771,7 @@ def _op(p, t, op, find):
|
|
|
1715
1771
|
old = c.GetName()
|
|
1716
1772
|
# SetClipProperty("Clip Name") answers False for renames that land (0.9.5 clip_renamer.py
|
|
1717
1773
|
# _set_clip_name): the name read back is the truth; SetName where this Resolve has it
|
|
1718
|
-
if not (
|
|
1774
|
+
if not (has(c, "SetName") and c.SetName(op["name"])):
|
|
1719
1775
|
c.SetClipProperty("Clip Name", op["name"])
|
|
1720
1776
|
return {"ok": c.GetName() == op["name"],
|
|
1721
1777
|
"undo": [{"op": "pool_rename", "clip": op["clip"], "name": old}]}
|
|
@@ -1800,7 +1856,7 @@ def _op(p, t, op, find):
|
|
|
1800
1856
|
if kind == "copy_speed":
|
|
1801
1857
|
# A's retime onto each target (0.9.5 _carry_speed / apply_speed, measured 21.1: SetSpeed with RippleTimeline
|
|
1802
1858
|
# off keeps the record range, only the source consumed changes); read back; a ramp is not on the API: said
|
|
1803
|
-
if not
|
|
1859
|
+
if not has(it, "GetSpeed"):
|
|
1804
1860
|
return {"ok": False, "undo": [], "detail": "this Resolve has no clip speed in its API (21.1+)"}
|
|
1805
1861
|
want = (it.GetSpeed() or {}).get("Percentage")
|
|
1806
1862
|
if want is None:
|
|
@@ -1825,7 +1881,7 @@ def _op(p, t, op, find):
|
|
|
1825
1881
|
return {"ok": bool(ok), "undo": [{"op": "speed", "item": item, "percentage": old}] if ok and old is not None else []}
|
|
1826
1882
|
if kind == "copy_fades":
|
|
1827
1883
|
# A's fade in / out (frames, 21.1) onto each target, read back (0.9.5 _carry_fades)
|
|
1828
|
-
if not
|
|
1884
|
+
if not has(it, "GetFades"):
|
|
1829
1885
|
return {"ok": False, "undo": [], "detail": "this Resolve has no fades in its API (21.1+)"}
|
|
1830
1886
|
src = it.GetFades() or {}
|
|
1831
1887
|
want = {k: src[k] for k in ("FadeIn", "FadeOut") if k in src}
|
|
@@ -1843,16 +1899,19 @@ def _op(p, t, op, find):
|
|
|
1843
1899
|
off.append("Resolve 21.1.1 does not save fades made by a script: they are gone when the project is reopened")
|
|
1844
1900
|
return {"ok": len(off) == 1, "undo": undo, "detail": "; ".join(off)}
|
|
1845
1901
|
if kind == "copy_grade" and op.get("drx"):
|
|
1846
|
-
# a grade from
|
|
1902
|
+
# a grade from a .drx (Grade Tracer: another project, or a keyframe choice): mode 0 no keyframes, 1 source TC
|
|
1903
|
+
# aligned, 2 start frames aligned (the default)
|
|
1847
1904
|
stuck, short = [], []
|
|
1848
1905
|
for a in op["to"]:
|
|
1849
1906
|
x = find(a)
|
|
1850
1907
|
if not _onto_local_version(x, "Version 1"):
|
|
1851
1908
|
stuck.append(a)
|
|
1852
|
-
elif not x.GetNodeGraph().ApplyGradeFromDRX(op["drx"], 2):
|
|
1909
|
+
elif not x.GetNodeGraph().ApplyGradeFromDRX(op["drx"], int(op.get("mode", 2))):
|
|
1853
1910
|
short.append(a)
|
|
1854
1911
|
return {"ok": not stuck and not short, "undo": [], "unverified": stuck + short,
|
|
1855
1912
|
**({"detail": "on a shared remote grade and could not move to a local version"} if stuck else {})}
|
|
1913
|
+
if kind == "copy_nodes":
|
|
1914
|
+
return _copy_nodes(it, op, find(op["from"]))
|
|
1856
1915
|
if kind == "copy_grade":
|
|
1857
1916
|
targets = [find(a) for a in op["to"]]
|
|
1858
1917
|
sv = it.GetCurrentVersion() or {}
|
|
@@ -1920,9 +1979,9 @@ def _op(p, t, op, find):
|
|
|
1920
1979
|
if op.get("target_loudness") not in (None, ""):
|
|
1921
1980
|
opts["targetLoudness"] = float(op["target_loudness"])
|
|
1922
1981
|
const = "NORMALIZE_AUDIO_SET_LEVEL_INDEPENDENT" if op.get("independent") else "NORMALIZE_AUDIO_SET_LEVEL_RELATIVE"
|
|
1923
|
-
if _RESOLVE is not None and
|
|
1982
|
+
if _RESOLVE is not None and getattr(_RESOLVE, const, None) is not None:
|
|
1924
1983
|
opts["setLevelMode"] = getattr(_RESOLVE, const)
|
|
1925
|
-
if not
|
|
1984
|
+
if not has(t, "NormalizeAudioLevel"):
|
|
1926
1985
|
return {"ok": False, "undo": [], "detail": "this Resolve has no audio normalization (Resolve 20+)"}
|
|
1927
1986
|
ok = bool(t.NormalizeAudioLevel([it], opts))
|
|
1928
1987
|
return {"ok": ok, "undo": [{"op": "properties", "item": item, "set": {"AudioVolume": old}}] if ok and old is not None else []}
|
|
@@ -2252,13 +2311,13 @@ def _signature(it):
|
|
|
2252
2311
|
return [(tuple(g.GetToolsInNode(k) or []), g.GetLUT(k) or "", (label(k) if label else "") or "") for k in range(1, n + 1)]
|
|
2253
2312
|
|
|
2254
2313
|
|
|
2255
|
-
def _aligned_version(it, vname, vtype):
|
|
2314
|
+
def _aligned_version(it, vname, vtype, ours=ALIGNED):
|
|
2256
2315
|
"""The version our sizing goes on: (name, made). The clip already on OUR version (a re-run) is written in place;
|
|
2257
2316
|
anything else gets a new local version, so the colorist's own version is never written. (None, True) = no version."""
|
|
2258
|
-
if vtype == 0 and (vname or "").startswith(
|
|
2317
|
+
if vtype == 0 and (vname or "").startswith(ours):
|
|
2259
2318
|
return vname, False
|
|
2260
2319
|
taken = set(it.GetVersionNameList(0) or [])
|
|
2261
|
-
name =
|
|
2320
|
+
name = ours if ours not in taken else next("%s %d" % (ours, k) for k in range(2, 999) if "%s %d" % (ours, k) not in taken)
|
|
2262
2321
|
if not it.AddVersion(name, 0) or not it.LoadVersionByName(name, 0):
|
|
2263
2322
|
return None, True
|
|
2264
2323
|
return name, True
|
|
@@ -2881,6 +2940,93 @@ def _grade_node_kept(it, op, t=None):
|
|
|
2881
2940
|
return refuse("the sized grade did not come through intact")
|
|
2882
2941
|
return {"ok": True, "undo": back, "detail": (("on new local version %r" if made else "Sizing replaced on our own version %r") + " = %s + Sizing in node %d%s (%d node(s) kept)") % (name, src, num, " %r" % label if label else "", len(after))}
|
|
2883
2942
|
|
|
2943
|
+
# ── Copy Nodes: chosen nodes of one clip's grade onto another's, the rest of its grade kept ───────────────────────
|
|
2944
|
+
# (INK, 2026-10-28: "copy specific nodes between clips, around Resolve's preserve-x-nodes"). Nodes are matched by
|
|
2945
|
+
# label (Resolve numbers nodes in signal-flow order, not the Body's stored order: a number is turned into the source
|
|
2946
|
+
# node's label through Resolve). The destination node's tools (node field 9: every tool, keyframes included) become
|
|
2947
|
+
# the source node's; its place, links and label stay. On a new local version, so the colorist's own is untouched.
|
|
2948
|
+
NODES_VERSION = "conform.tools nodes"
|
|
2949
|
+
|
|
2950
|
+
|
|
2951
|
+
def splice_nodes(dest_hex, src_hex, labels):
|
|
2952
|
+
"""`dest_hex` with each labelled node's tools taken from the source's node of the same label."""
|
|
2953
|
+
raw = bytes.fromhex(dest_hex[2:])
|
|
2954
|
+
graph, dnodes = _body_nodes(raw)
|
|
2955
|
+
_sg, snodes = _body_nodes(bytes.fromhex(src_hex[2:]))
|
|
2956
|
+
tools = {}
|
|
2957
|
+
for label in labels:
|
|
2958
|
+
for side, nodes in (("source", snodes), ("destination", dnodes)):
|
|
2959
|
+
hits = [n for n in nodes if _node_label(n) == label]
|
|
2960
|
+
if len(hits) != 1:
|
|
2961
|
+
raise ValueError("the %s grade has %d nodes labelled %r (need exactly one)" % (side, len(hits), label))
|
|
2962
|
+
src = next(n for n in snodes if _node_label(n) == label)
|
|
2963
|
+
tools[label] = b"".join(f[2] for f in _pb(src[3]) if f[0] == 9)
|
|
2964
|
+
def swapped(node):
|
|
2965
|
+
out, put = b"", False
|
|
2966
|
+
for f in _pb(node[3]):
|
|
2967
|
+
if f[0] == 9:
|
|
2968
|
+
if not put:
|
|
2969
|
+
out, put = out + tools[_node_label(node)], True
|
|
2970
|
+
else:
|
|
2971
|
+
out += f[2]
|
|
2972
|
+
return out if put else out + tools[_node_label(node)]
|
|
2973
|
+
parts = [_fb(7, swapped(f)) if f[0] == 7 and _node_label(f) in tools else f[2] for f in _pb(graph[3])]
|
|
2974
|
+
return "80" + b"".join((_fb(1, b"".join(parts)) if f[0] == 1 else f[2]) for f in _pb(raw)).hex()
|
|
2975
|
+
|
|
2976
|
+
|
|
2977
|
+
def _copy_nodes(it, op, src):
|
|
2978
|
+
item = op["item"]
|
|
2979
|
+
if src is None:
|
|
2980
|
+
return {"ok": False, "undo": [], "refused": ["no source"], "detail": "refused: the source clip is not there now; nothing changed"}
|
|
2981
|
+
cur = it.GetCurrentVersion() or {}
|
|
2982
|
+
vname, vtype = cur.get("versionName"), int(cur.get("versionType") or 0)
|
|
2983
|
+
base = ((op.get("bodies") or {}).get("remote" if vtype == 1 else "local") or {}).get(vname)
|
|
2984
|
+
if not base or not op.get("from_body"):
|
|
2985
|
+
return {"ok": False, "undo": [], "refused": ["grade unreadable"],
|
|
2986
|
+
"detail": "refused: the %s grade could not be read from the timeline's export; nothing changed" % ("source's" if base else "clip's")}
|
|
2987
|
+
sg = src.GetNodeGraph(1)
|
|
2988
|
+
label_of = getattr(sg, "GetNodeLabel", None) if sg else None
|
|
2989
|
+
if not label_of:
|
|
2990
|
+
return {"ok": False, "undo": [], "refused": ["no labels"], "detail": "refused: this Resolve cannot name its nodes (GetNodeLabel)"}
|
|
2991
|
+
slabels = [label_of(k) or "" for k in range(1, int(sg.GetNumNodes() or 0) + 1)]
|
|
2992
|
+
labels = []
|
|
2993
|
+
for w in op.get("nodes") or []:
|
|
2994
|
+
w = str(w).strip()
|
|
2995
|
+
if w.isdigit():
|
|
2996
|
+
k = int(w)
|
|
2997
|
+
if not 1 <= k <= len(slabels):
|
|
2998
|
+
return {"ok": False, "undo": [], "refused": ["no node"], "detail": "refused: the source has no node %d (it has %d); nothing changed" % (k, len(slabels))}
|
|
2999
|
+
if not slabels[k - 1] or slabels.count(slabels[k - 1]) != 1:
|
|
3000
|
+
return {"ok": False, "undo": [], "refused": ["unlabelled"],
|
|
3001
|
+
"detail": "refused: source node %d has no label of its own (%r): label it the same on both clips; nothing changed" % (k, slabels[k - 1])}
|
|
3002
|
+
w = slabels[k - 1]
|
|
3003
|
+
labels.append(w)
|
|
3004
|
+
if not labels:
|
|
3005
|
+
return {"ok": False, "undo": [], "refused": ["no nodes"], "detail": "refused: no nodes named; nothing changed"}
|
|
3006
|
+
try:
|
|
3007
|
+
body = splice_nodes(base, op["from_body"], labels)
|
|
3008
|
+
except ValueError as e:
|
|
3009
|
+
return {"ok": False, "undo": [], "refused": ["node match"], "detail": "refused: %s; nothing changed" % e}
|
|
3010
|
+
want = {l: s for s in _signature(src) for l in [s[2]] if l in labels} # the source nodes as Resolve shows them
|
|
3011
|
+
before = _signature(it)
|
|
3012
|
+
name, made = _aligned_version(it, vname, vtype, NODES_VERSION)
|
|
3013
|
+
if not name:
|
|
3014
|
+
return {"ok": False, "undo": [], "refused": ["no version"], "detail": "refused: could not add a local version; nothing changed"}
|
|
3015
|
+
back = _undo_of(item, vname, vtype, name, made, base)
|
|
3016
|
+
def refuse(why):
|
|
3017
|
+
_put_back(it, vname, vtype, name, made, base)
|
|
3018
|
+
return {"ok": False, "undo": [], "refused": [why.split(":")[0]], "detail": "refused: %s; put back, nothing changed" % why}
|
|
3019
|
+
if not _apply_body(it, body):
|
|
3020
|
+
return refuse("Resolve would not take the grade")
|
|
3021
|
+
after = _signature(it)
|
|
3022
|
+
copied = [x for x in after if x[2] in labels]
|
|
3023
|
+
if len(after) != len(before) or [x for x in after if x[2] not in labels] != [x for x in before if x[2] not in labels] \
|
|
3024
|
+
or any(x[:2] != want[x[2]][:2] for x in copied):
|
|
3025
|
+
return refuse("the grade did not come through as planned")
|
|
3026
|
+
return {"ok": True, "undo": back, "detail": "on %s local version %r: node(s) %s from the source, %d other node(s) kept" % (
|
|
3027
|
+
"new" if made else "our", name, ", ".join(repr(l) for l in labels), len(after) - len(copied))}
|
|
3028
|
+
|
|
3029
|
+
|
|
2884
3030
|
def serve():
|
|
2885
3031
|
"""bridge.py serve: one request per stdin line ({"action", "args"}) -> one reply line, Resolve connected once and kept
|
|
2886
3032
|
(a call costs ~20 ms instead of a python start + connect, ~1 s). A dead connection (Resolve quit or restarted) is
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a,b,c,d,e,f}from"./chunk-
|
|
3
|
+
import{a,b,c,d,e,f}from"./chunk-2WNNDPVR.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{b as APPLIED,a as BACKUP_SUFFIX,e as applyPatch,c as patchFolders,d as planPatch,f as undoPatch};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{A as a,B as b,C as c,D as d,E as e,F as f,G as g}from"./chunk-
|
|
3
|
+
import{A as a,B as b,C as c,D as d,E as e,F as f,G as g}from"./chunk-3WJSWOCS.js";import"./chunk-2XQ42O7E.js";import"./chunk-M545OKDZ.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{a as createSession,g as getExtra,c as getSession,b as lastSessionId,e as listSessions,f as saveExtra,d as updateSession};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{$b as k,Rb as a,Sb as b,Tb as c,Ub as d,Vb as e,Wb as f,Xb as g,Yb as h,Zb as i,_b as j,ac as l,bc as m,cc as n,dc as o,ec as p,fc as q,gc as r,hc as s,ic as t}from"./chunk-
|
|
3
|
+
import{$b as k,Rb as a,Sb as b,Tb as c,Ub as d,Vb as e,Wb as f,Xb as g,Yb as h,Zb as i,_b as j,ac as l,bc as m,cc as n,dc as o,ec as p,fc as q,gc as r,hc as s,ic as t}from"./chunk-6IL7M3VP.js";import"./chunk-IN6XVTUS.js";import"./chunk-GBNPOZ32.js";import"./chunk-3PVQ5QP4.js";import"./chunk-VFXMP7IF.js";import"./chunk-GHP6HDLM.js";import"./chunk-LUKA7UUJ.js";import"./chunk-ATEWMIY5.js";import"./chunk-2GRXBIJB.js";import"./chunk-EWW5KWAO.js";import"./chunk-567IWIX6.js";import"./chunk-OSUIS4JU.js";import"./chunk-JV7TZDKJ.js";import"./chunk-BBCQMZQN.js";import"./chunk-2DEUYEQD.js";import"./chunk-4V3KLFCJ.js";import"./chunk-2S2ZPQQD.js";import"./chunk-ZAL7Y5VZ.js";import"./chunk-IPQLKAF2.js";import"./chunk-Y7PFSVRX.js";import"./chunk-C2ESM27Z.js";import"./chunk-N34DQ6MH.js";import"./chunk-NU3X7P4N.js";import"./chunk-L2RTMZCN.js";import"./chunk-3WJSWOCS.js";import"./chunk-2XQ42O7E.js";import"./chunk-M545OKDZ.js";import"./chunk-COALWMI7.js";import"./chunk-MU5AGXSH.js";import"./chunk-PSANHDZM.js";export{j as OPERATION_KINDS,a as READ_FORMATS,k as applyOperation,m as applyOperationWithSources,s as consolidate,b as detectFormat,d as detectTimelineFormat,t as judge,r as linkText,g as listClips,i as listFlags,h as listMedia,e as readTimeline,n as resolveTarget,q as routesText,c as sniffFormat,f as summarize,l as trackIndex,p as writeDestination,o as writeTimeline};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
import"./chunk-PSANHDZM.js";function O(e,_){let o,t;try{let s=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.capability_issues_json(s,c,f,w);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,b(a[2]);return o=r,t=i,d(r,i)}finally{n.__wbindgen_free(o,t,1)}}function S(e){let _=g(e,n.__wbindgen_malloc),o=l,t=n.deobfuscate_ptx(_,o);if(t[3])throw b(t[2]);var r=A(t[0],t[1]).slice();return n.__wbindgen_free(t[0],t[1]*1,1),r}function I(e){let _,o;try{let t=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),r=l,i=n.drt_project_colour(t,r);return _=i[0],o=i[1],d(i[0],i[1])}finally{n.__wbindgen_free(_,o,1)}}function U(e){let _,o;try{let t=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),r=l,i=n.drx_grade_tree(t,r);return _=i[0],o=i[1],d(i[0],i[1])}finally{n.__wbindgen_free(_,o,1)}}function D(e){let _,o;try{let i=g(e,n.__wbindgen_malloc),s=l,c=n.extract_aaf_json(i,s);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function F(e,_){let o,t;try{let s=g(e,n.__wbindgen_malloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.extract_avb_json(s,c,f,w);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,b(a[2]);return o=r,t=i,d(r,i)}finally{n.__wbindgen_free(o,t,1)}}function B(e){let _,o;try{let i=g(e,n.__wbindgen_malloc),s=l,c=n.extract_blscene_json(i,s);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function L(e){let _,o;try{let i=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),s=l,c=n.extract_drt_json(i,s);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function k(e){let _,o;try{let i=g(e,n.__wbindgen_malloc),s=l,c=n.extract_flame_json(i,s);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function C(e,_){let o,t;try{let s=g(e,n.__wbindgen_malloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.extract_prproj_json(s,c,f,w);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,b(a[2]);return o=r,t=i,d(r,i)}finally{n.__wbindgen_free(o,t,1)}}function q(e){let _,o;try{let i=g(e,n.__wbindgen_malloc),s=l,c=n.extract_ptx_json(i,s);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function z(e){let _,o;try{let i=g(e,n.__wbindgen_malloc),s=l,c=n.inspect_aaf_json(i,s);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function P(e){let _,o;try{let i=g(e,n.__wbindgen_malloc),s=l,c=n.inspect_avb_json(i,s);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function N(e,_){let o,t;try{let s=g(e,n.__wbindgen_malloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_blscene_json(s,c,f,w);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,b(a[2]);return o=r,t=i,d(r,i)}finally{n.__wbindgen_free(o,t,1)}}function V(e,_){let o,t;try{let s=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_capcut_json(s,c,f,w);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,b(a[2]);return o=r,t=i,d(r,i)}finally{n.__wbindgen_free(o,t,1)}}function X(e){let _,o;try{let i=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),s=l,c=n.inspect_drt_json(i,s);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function Y(e,_){let o,t;try{let s=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_fcpxml_json(s,c,f,w);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,b(a[2]);return o=r,t=i,d(r,i)}finally{n.__wbindgen_free(o,t,1)}}function G(e,_){let o,t;try{let s=g(e,n.__wbindgen_malloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_flame_json(s,c,f,w);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,b(a[2]);return o=r,t=i,d(r,i)}finally{n.__wbindgen_free(o,t,1)}}function H(e,_){let o,t;try{let s=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_otio_json(s,c,f,w);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,b(a[2]);return o=r,t=i,d(r,i)}finally{n.__wbindgen_free(o,t,1)}}function J(e){let _,o;try{let i=g(e,n.__wbindgen_malloc),s=l,c=n.inspect_prproj_json(i,s);var t=c[0],r=c[1];if(c[3])throw t=0,r=0,b(c[2]);return _=t,o=r,d(t,r)}finally{n.__wbindgen_free(_,o,1)}}function K(e,_){let o,t;try{let s=g(e,n.__wbindgen_malloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_ptx_json(s,c,f,w);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,b(a[2]);return o=r,t=i,d(r,i)}finally{n.__wbindgen_free(o,t,1)}}function Q(e,_){let o,t;try{let s=u(e,n.__wbindgen_malloc,n.__wbindgen_realloc),c=l,f=u(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=l,a=n.inspect_xmeml_json(s,c,f,w);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,b(a[2]);return o=r,t=i,d(r,i)}finally{n.__wbindgen_free(o,t,1)}}function v(){return{__proto__:null,"./timeline_core_bg.js":{__proto__:null,__wbg_Error_fdd633d4bb5dd76a:function(_,o){return Error(d(_,o))},__wbindgen_cast_0000000000000001:function(_,o){return d(_,o)},__wbindgen_init_externref_table:function(){let _=n.__wbindgen_externrefs,o=_.grow(4);_.set(0,void 0),_.set(o+0,void 0),_.set(o+1,null),_.set(o+2,!0),_.set(o+3,!1)}}}}function A(e,_){return e=e>>>0,p().subarray(e/1,e/1+_)}function d(e,_){return T(e>>>0,_)}var y=null;function p(){return(y===null||y.byteLength===0)&&(y=new Uint8Array(n.memory.buffer)),y}function g(e,_){let o=_(e.length*1,1)>>>0;return p().set(e,o/1),l=e.length,o}function u(e,_,o){if(o===void 0){let c=x.encode(e),f=_(c.length,1)>>>0;return p().subarray(f,f+c.length).set(c),l=c.length,f}let t=e.length,r=_(t,1)>>>0,i=p(),s=0;for(;s<t;s++){let c=e.charCodeAt(s);if(c>127)break;i[r+s]=c}if(s!==t){s!==0&&(e=e.slice(s)),r=o(r,t,t=s+e.length*3,1)>>>0;let c=p().subarray(r+s,r+t),f=x.encodeInto(e,c);s+=f.written,r=o(r,t,s,1)>>>0}return l=s,r}function b(e){let _=n.__wbindgen_externrefs.get(e);return n.__externref_table_dealloc(e),_}var m=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});m.decode();var W=2146435072,j=0;function T(e,_){return j+=_,j>=W&&(m=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),m.decode(),j=_),m.decode(p().subarray(e,e+_))}var x=new TextEncoder;"encodeInto"in x||(x.encodeInto=function(e,_){let o=x.encode(e);return _.set(o),{read:e.length,written:o.length}});var l=0,R,E,n;function h(e,_){return E=e,n=e.exports,R=_,y=null,n.__wbindgen_start(),n}async function M(e,_){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,_)}catch(r){if(e.ok&&o(e.type)&&e.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let t=await e.arrayBuffer();return await WebAssembly.instantiate(t,_)}else{let t=await WebAssembly.instantiate(e,_);return t instanceof WebAssembly.Instance?{instance:t,module:e}:t}function o(t){switch(t){case"basic":case"cors":case"default":return!0}return!1}}function Z(e){if(n!==void 0)return n;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let _=v();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let o=new WebAssembly.Instance(e,_);return h(o,e)}async function $(e){if(n!==void 0)return n;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),e===void 0&&(e=new URL("timeline_core_bg.wasm",import.meta.url));let _=v();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:o,module:t}=await M(await e,_);return h(o,t)}export{O as capability_issues_json,$ as default,S as deobfuscate_ptx,I as drt_project_colour,U as drx_grade_tree,D as extract_aaf_json,F as extract_avb_json,B as extract_blscene_json,L as extract_drt_json,k as extract_flame_json,C as extract_prproj_json,q as extract_ptx_json,Z as initSync,z as inspect_aaf_json,P as inspect_avb_json,N as inspect_blscene_json,V as inspect_capcut_json,X as inspect_drt_json,Y as inspect_fcpxml_json,G as inspect_flame_json,H as inspect_otio_json,J as inspect_prproj_json,K as inspect_ptx_json,Q as inspect_xmeml_json};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conformtools",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.20",
|
|
4
4
|
"description": "conform.tools on your machine: timeline exchange, relink, media trim, delivery and auto conform, as MCP tools for Claude and other AI apps, a CLI and a local HTTP API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"optionalDependencies": {
|
|
47
|
-
"conformtools-darwin-arm64": "0.6.
|
|
48
|
-
"conformtools-darwin-x64": "0.6.
|
|
49
|
-
"conformtools-linux-x64": "0.6.
|
|
50
|
-
"conformtools-windows-x64": "0.6.
|
|
47
|
+
"conformtools-darwin-arm64": "0.6.20",
|
|
48
|
+
"conformtools-darwin-x64": "0.6.20",
|
|
49
|
+
"conformtools-linux-x64": "0.6.20",
|
|
50
|
+
"conformtools-windows-x64": "0.6.20"
|
|
51
51
|
}
|
|
52
52
|
}
|
package/dist/chunk-2V5PY4P5.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{Gb as L,Hb as A,Ib as E,Jb as P,Kb as T,Lb as M,Mb as N,Nb as D,Ob as z,Pb as B,Qb as I,tb as S}from"./chunk-QBQJDV2F.js";import{a as b}from"./chunk-ROGMKTND.js";import{_ as p,t as R}from"./chunk-GTPTZRO6.js";async function W(r,t){let c=t.media_root?[t.media_root]:await z();if(!c.length)throw new b("invalid_args","no media_root given and no remembered locations \u2014 pass the folder to link from");for(let e of c)try{if(!(await R(e)).isDirectory)throw 0}catch{throw new b("invalid_args",`media_root is not a folder on this machine: ${e}`)}let i=A(r,{ref_ids:t.ref_ids,lane:t.lane,reset:t.reset});if(!i.length)return{session:r,changed:!1,note:"",text:"nothing in scope: every reference in scope is already linked (use reset=true to re-point) or the ids/lane matched nothing"};if(t.reset)for(let e of i)e.binding_state="unbound",delete e.coverage_reason;let m=[],k=!1,u=[];for(let e of c)if(t.gather==="path")for(let n of i){let l=n.local_path??n.target_url??"",o=l?await P(e,l):null;o?m.push(o):u.push(`${n.id} ${p(l)}: not at its recorded path under ${e}`)}else{let n=await E(e,i,t.cap,{byName:t.criteria?.file_name!==!1,exts:t.criteria?.extensions});m.push(...n.paths),k||=n.capped}let{refs:$,failed:_}=await T([...new Set(m)]);t.remember&&t.media_root&&await B(t.media_root);let y=new Set(i.map(e=>e.id)),f=S(r,$,y);if(f.splits.length){r=f.session;let e=new Set([...y,...f.splits.flatMap(n=>n.into)]);i=(r.media_references??[]).filter(n=>e.has(n.id));for(let n of f.splits){let l=o=>p(i.find(G=>G.id===o)?.target_url??o);u.push(`split ${n.ref_id} across ${n.into.length} section file(s): ${n.into.map(l).join(", ")}`)}}let d=L(t.criteria),a=M(r,i,$,d,t.tolerances),O=t.criteria?.picture?await N(r,a):[],s=e=>a.rows.filter(n=>n.status===e).length,U=c.map(e=>e.split(/[\\/]/).filter(Boolean).pop()??e).join(", "),v=[`${t.dry_run?"would link":"found"} ${s("matched")} of ${i.length} clip${i.length===1?"":"s"} in ${U}${s("ambiguous")?`, ${s("ambiguous")} with more than one match`:""}${i.length-s("matched")-s("ambiguous")?`, ${i.length-s("matched")-s("ambiguous")} not found there`:""}${t.dry_run?" (dry run: nothing changed)":""}`,`scope: ${i.length} reference(s)${t.lane!=="both"?` (${t.lane} lane)`:""}${t.ref_ids?` (zone of ${t.ref_ids.length})`:""}; gather=${t.gather} under ${c.join(", ")}: ${$.length} candidate clip(s)${k?` (CAPPED at ${t.cap} \u2014 narrow the folder)`:""}`,`criteria: ${[...Object.entries(d).filter(([,e])=>e===!0).map(([e])=>e),...t.criteria?.picture?["picture"]:[]].join(", ")}${d.fileName?` (${d.fileNameMode})`:""}${d.fileExtensions?`; ext ${d.fileExtensions}`:""}; timecode containment + fps always on`,..._.length?[`could not probe ${_.length}: ${_.slice(0,5).join("; ")}`]:[],...u.slice(0,20),...O.slice(0,40)];if(t.dry_run)return{session:r,changed:!1,note:"",text:[...v,I(r,a,{compare:t.compare}),"(dry run \u2014 nothing changed; pass accept=[{ref_id,candidate_id}] to commit chosen rows, or run again without dry_run to apply every matched row)"].join(`
|
|
4
|
-
`)};let h,g=[];if(t.accept?.length){h=[];for(let e of t.accept){let n=a.rows.find(o=>o.ref_id===e.ref_id);n&&(n.candidate?.id===e.candidate_id||n.alternatives.some(o=>o.id===e.candidate_id))?h.push(e):g.push(`${e.ref_id} \u2192 ${e.candidate_id}: not a proposed match or alternative for that reference`)}}else h=a.rows.filter(e=>e.status==="matched"&&e.candidate).map(e=>({ref_id:e.ref_id,candidate_id:e.candidate.id}));let w=D(r,a,h),x=w.session.media_references??[],j=x.filter(e=>i.some(n=>n.id===e.id)&&e.binding_state==="linked").length,q=w.applied,C=x.filter(e=>i.some(n=>n.id===e.id)&&e.binding_state!=="linked").map(e=>` - ${e.id} ${p(e.target_url??"")}: ${e.coverage_reason??(a.rows.find(n=>n.ref_id===e.id)?.status==="ambiguous"?"ambiguous \u2014 pick one with accept":"no file matched")}`),F=[...v,`Linked ${j} of ${i.length}${g.length?`; ${g.length} pick(s) vetoed`:""}`,...q.map(e=>`- ${e.ref_id}: ${p(e.before.path??"?")} \u2192 ${e.after.path}${e.warning?` \u26A0 ${e.warning}`:""}`),...g.map(e=>` \u2717 ${e}`),...C.length?["unresolved:",...C]:[]].join(`
|
|
5
|
-
`);return{session:w.session,changed:!0,note:`relink ${t.gather} ${c[0]} (${j}/${i.length})`,text:F}}export{W as a};
|