@motionharness/bridge-davinci 0.0.23 → 0.0.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionharness/bridge-davinci",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -9,7 +9,7 @@
9
9
  "url": "git+https://github.com/VibeMG/vibe-motion-graphics.git",
10
10
  "directory": "packages/bridge/davinci"
11
11
  },
12
- "description": "Motion Harness Bridge Component for DaVinci Resolve",
12
+ "description": "MotionHarness Bridge Component for DaVinci Resolve",
13
13
  "exports": {
14
14
  ".": "./dist/runner.mjs"
15
15
  },
@@ -2,7 +2,7 @@
2
2
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0"><dict>
4
4
  <key>CFBundleIdentifier</key><string>com.hotionharness.bridge.davinci</string>
5
- <key>CFBundleName</key><string>Motion Harness Bridge Component</string>
5
+ <key>CFBundleName</key><string>MotionHarness Bridge Component</string>
6
6
  <key>CFBundleExecutable</key><string>HotionHarness.ofx</string>
7
7
  <key>CFBundlePackageType</key><string>BNDL</string>
8
8
  <key>CFBundleVersion</key><string>1</string>
@@ -2,9 +2,9 @@
2
2
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0"><dict>
4
4
  <key>CFBundleIdentifier</key><string>com.hotionharness.bridge.status</string>
5
- <key>CFBundleName</key><string>Motion Harness Bridge Component</string>
6
- <key>CFBundleDisplayName</key><string>Motion Harness Bridge Component</string>
7
- <key>CFBundleExecutable</key><string>HotionHarnessStatus</string>
5
+ <key>CFBundleName</key><string>MotionHarness Bridge Component</string>
6
+ <key>CFBundleDisplayName</key><string>MotionHarness Bridge Component</string>
7
+ <key>CFBundleExecutable</key><string>MotionHarnessBridge</string>
8
8
  <key>CFBundlePackageType</key><string>APPL</string>
9
9
  <key>CFBundleVersion</key><string>1</string>
10
10
  <key>CFBundleShortVersionString</key><string>1.0</string>
@@ -0,0 +1,2 @@
1
+ "CFBundleDisplayName" = "MotionHarness Bridge Component";
2
+ "CFBundleName" = "MotionHarness Bridge Component";
@@ -0,0 +1,2 @@
1
+ "CFBundleDisplayName" = "MotionHarness 桥接组件";
2
+ "CFBundleName" = "MotionHarness 桥接组件";
@@ -48,7 +48,7 @@ return function(request)
48
48
  else
49
49
  action = 'error'
50
50
  payload = '{"workspace":' .. json_string(workspace)
51
- .. ',"code":"SELECTION_UNAVAILABLE","message":"无法确认当前所选片段,请只选择一个 Motion Harness 片段后重试。"}'
51
+ .. ',"code":"SELECTION_UNAVAILABLE","message":"无法确认当前所选片段,请只选择一个 MotionHarness 片段后重试。"}'
52
52
  end
53
53
  os.execute(quote(helper) .. ' --config ' .. quote(config) .. ' --action ' .. quote(action)
54
54
  .. ' --request ' .. quote(payload) .. ' >/dev/null 2>&1 &')
@@ -51,14 +51,14 @@ def selected_target(application, management=False):
51
51
  project = manager.GetCurrentProject()
52
52
  timeline = project.GetCurrentTimeline() if project else None
53
53
  if not timeline:
54
- raise SelectionError("NO_TIMELINE", tr("请打开时间线并选择一个 Motion Harness 片段。"))
54
+ raise SelectionError("NO_TIMELINE", tr("请打开时间线并选择一个 MotionHarness 片段。"))
55
55
  if project.IsRenderingInProgress():
56
56
  raise SelectionError("RESOLVE_BUSY", tr("达芬奇正在导出,请完成后重试。"))
57
57
  selected = timeline.GetSelectedClips() or []
58
58
  identifiers = sorted(item.GetUniqueId() for item in selected)
59
59
  videos = [item for item in selected if item.GetType().lower() == "video"]
60
60
  if len(videos) != 1:
61
- raise SelectionError("SELECTION_AMBIGUOUS", tr("请只选择一个 Motion Harness 视频片段。"))
61
+ raise SelectionError("SELECTION_AMBIGUOUS", tr("请只选择一个 MotionHarness 视频片段。"))
62
62
  media = videos[0].GetMediaPoolItem()
63
63
  if not media:
64
64
  raise SelectionError("NOT_PLAIN_MEDIA", tr("所选片段没有普通视频素材。请先转换旧版生成器。"))
@@ -71,7 +71,7 @@ def selected_target(application, management=False):
71
71
  isinstance(link.get(key), str) and link[key] for key in ("bindingId", "sourceId", "artifactId")
72
72
  )
73
73
  if not linked and not management:
74
- raise SelectionError("NOT_LINKED", tr("所选视频未关联 Motion Harness 工程。"))
74
+ raise SelectionError("NOT_LINKED", tr("所选视频未关联 MotionHarness 工程。"))
75
75
  database = manager.GetCurrentDatabase() if management else None
76
76
  if management and (not isinstance(database, dict) or not database):
77
77
  raise SelectionError("SCOPE_UNAVAILABLE", tr("无法确认当前工程位置,请检查达芬奇连接。"))
@@ -130,7 +130,7 @@ def main():
130
130
  except (OSError, ValueError, TypeError, KeyError):
131
131
  pass
132
132
  if not status_path.is_absolute() or not status_path.is_file() or not os.access(status_path, os.X_OK):
133
- raise RuntimeError(tr("缺少 Motion Harness 状态窗口,请运行 mh bridge davinci install 修复组件。"))
133
+ raise RuntimeError(tr("缺少 MotionHarness 状态窗口,请运行 mh bridge davinci install 修复组件。"))
134
134
  # The shared helper resolves the installed CLI launcher. Checking the old
135
135
  # platform-binary path here would incorrectly reject a completed npm upgrade.
136
136
  request = {}
@@ -155,9 +155,9 @@ def main():
155
155
  subprocess.Popen(arguments, stdin=subprocess.DEVNULL,
156
156
  stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
157
157
  env=command_environment(config), close_fds=True, start_new_session=True)
158
- print(request["message"] if action == "error" else tr("正在打开 Motion Harness 工程…") if action == "edit" else
159
- tr("正在读取所选 Motion Harness 片段…") if action == "manage" else
160
- tr("正在提交 Motion Harness 请求,状态窗口将显示进度。"))
158
+ print(request["message"] if action == "error" else tr("正在打开 MotionHarness 工程…") if action == "edit" else
159
+ tr("正在读取所选 MotionHarness 片段…") if action == "manage" else
160
+ tr("正在提交 MotionHarness 请求,状态窗口将显示进度。"))
161
161
 
162
162
 
163
163
  if __name__ == "__main__":
@@ -1,15 +1,13 @@
1
1
  <!doctype html>
2
2
  <html lang="en">
3
3
  <meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
4
- <title>Motion Harness Bridge Component · Add the sidebar editing entry</title>
5
- <style>
6
- :root{color-scheme:dark;font:15px/1.7 system-ui,-apple-system,sans-serif;color:#eee;background:#191a1e}*{box-sizing:border-box}body{max-width:960px;margin:auto;padding:32px 24px}h1{font-size:26px;line-height:1.3;margin:0 0 12px}p{color:#c9cad2}li{margin:14px 0}strong{color:#fff}code,kbd{font:inherit;background:#303139;border-radius:5px;padding:2px 6px}.diagram{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:20px;background:#22242b;border:1px solid #555661;border-radius:10px}.panel{border:1px solid #51545f;border-radius:6px;padding:16px}.panel h2{font-size:15px;margin:0 0 12px}.search,.effect{padding:8px 10px;margin:8px 0;background:#30333e;border-radius:5px}.effect{border-left:3px solid #81aaff}.timeline{grid-column:1/-1;border-top:1px solid #50535f;padding-top:14px}.clip{background:#36496e;border:1px solid #81aaff;border-radius:5px;padding:12px}.caption{font-size:13px}aside{border-top:1px solid #40414b;margin-top:24px;padding-top:12px}@media(max-width:600px){body{padding:20px 16px}.diagram{grid-template-columns:1fr}.timeline{grid-column:auto}}
7
- </style>
4
+ <title>MotionHarness Bridge Component · Add the sidebar editing entry</title>
5
+ <link rel="stylesheet" href="guide.css">
8
6
  <h1>Add the sidebar editing entry</h1><p>The media sent through the bridge is already linked to its source project. Adding this optional effect does not render the video again.</p>
9
- <ol><li>On the <strong>Edit</strong> page in DaVinci Resolve, open the <strong>Effects Library</strong> (magic wand icon).</li><li>Search for <strong>Motion Harness Bridge Component</strong> and drag the Open FX effect onto the target animation clip.</li><li>Select the clip and click <strong>Edit Motion Harness project</strong> under <strong>Inspector → Effects → Open FX</strong>.</li></ol>
7
+ <ol><li>On the <strong>Edit</strong> page in DaVinci Resolve, open the <strong>Effects Library</strong> (magic wand icon).</li><li>Search for <strong>MotionHarness Bridge Component</strong> and drag the Open FX effect onto the target animation clip.</li><li>Select the clip and click <strong>Edit MotionHarness project</strong> under <strong>Inspector → Effects → Open FX</strong>.</li></ol>
10
8
  <div class="diagram" role="img" aria-label="Illustration: Effects Library, inspector and target clip">
11
- <section class="panel"><h2>① Effects Library</h2><div class="search">⌕ Motion Harness</div><div class="effect">② Motion Harness Bridge Component</div></section>
12
- <section class="panel"><h2>Inspector → Effects → Open FX</h2><div class="effect">Edit Motion Harness project</div><p>Update this media · Check status · More…</p></section>
9
+ <section class="panel"><h2>① Effects Library</h2><div class="search">⌕ MotionHarness</div><div class="effect">② MotionHarness Bridge Component</div></section>
10
+ <section class="panel"><h2>Inspector → Effects → Open FX</h2><div class="effect">Edit MotionHarness project</div><p>Update this media · Check status · More…</p></section>
13
11
  <div class="timeline"><div class="clip">③ Target animation clip · Add the effect here</div></div></div>
14
- <p class="caption">Layout illustration. Labels follow the language selected when installing the component. Search for “Motion Harness” in either language.</p><aside><p><strong>Shortcut:</strong> Select the clip, press <kbd>Shift</kbd> + <kbd>Space</kbd>, and search for Motion Harness. If your shortcuts are customized, use the Effects Library.</p><p><strong>Cannot find the effect?</strong> Install the Motion Harness Bridge Component with <code>mh bridge davinci install</code>. Save your project and restart DaVinci Resolve after installation.</p><p><strong>Menu alternative:</strong> Workspace → Scripts → Utility → Motion Harness Bridge Component → Edit project. Clips with the effect already attached do not need it added again.</p></aside>
12
+ <p class="caption">Layout illustration. Labels follow the language selected when installing the component. Search for “MotionHarness” in either language.</p><aside><p><strong>Shortcut:</strong> Select the clip, press <kbd>Shift</kbd> + <kbd>Space</kbd>, and search for MotionHarness. If your shortcuts are customized, use the Effects Library.</p><p><strong>Cannot find the effect?</strong> Install the MotionHarness Bridge Component with <code>mh bridge davinci install</code>. Save your project and restart DaVinci Resolve after installation.</p><p><strong>Menu alternative:</strong> Workspace → Scripts → Utility → MotionHarness Bridge Component → Edit project. Clips with the effect already attached do not need it added again.</p></aside>
15
13
  </html>
@@ -0,0 +1,14 @@
1
+ /* Offline bridge guides use the graphite Studio palette in either language. */
2
+ :root{color-scheme:dark;font:14px/1.6 "PingFang SC",system-ui,sans-serif;color:#e8e8e6;background:#17181a}
3
+ *{box-sizing:border-box}
4
+ body{max-width:960px;margin:auto;padding:24px}
5
+ h1{margin:0 0 8px;font-size:22px;line-height:1.35}
6
+ p,li{color:#a5a6aa}li{margin:10px 0}strong{color:#e8e8e6}
7
+ code,kbd{padding:2px 6px;border-radius:4px;background:#25262a;font:12px/1.6 ui-monospace,monospace;overflow-wrap:anywhere}
8
+ .diagram{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px;background:#1d1e21;border:1px solid #ffffff1c;border-radius:12px}
9
+ .panel{min-width:0;padding:12px;border:1px solid #ffffff1c;border-radius:6px}.panel h2{margin:0 0 12px;font-size:14px}
10
+ .search,.effect,.clip{margin:8px 0;padding:8px 10px;border-radius:4px;background:#25262a}
11
+ .effect,.clip{border-inline-start:2px solid #ff6a1a;background:#ff6a1a12}
12
+ .timeline{grid-column:1/-1;border-top:1px solid #ffffff1c;padding-top:12px}
13
+ .caption{font-size:12px}aside{border-top:1px solid #ffffff1c;margin-top:20px;padding-top:8px}
14
+ @media(max-width:600px){body{padding:16px}.diagram{grid-template-columns:minmax(0,1fr)}}
@@ -1,15 +1,13 @@
1
1
  <!doctype html>
2
2
  <html lang="zh-CN">
3
3
  <meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
4
- <title>Motion Harness 桥接组件 · 添加侧栏编辑入口</title>
5
- <style>
6
- :root{color-scheme:dark;font:15px/1.7 system-ui,-apple-system,sans-serif;color:#eee;background:#191a1e}*{box-sizing:border-box}body{max-width:960px;margin:auto;padding:32px 24px}h1{font-size:26px;line-height:1.3;margin:0 0 12px}p{color:#c9cad2}li{margin:14px 0}strong{color:#fff}code,kbd{font:inherit;background:#303139;border-radius:5px;padding:2px 6px}.diagram{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:20px;background:#22242b;border:1px solid #555661;border-radius:10px}.panel{border:1px solid #51545f;border-radius:6px;padding:16px}.panel h2{font-size:15px;margin:0 0 12px}.search,.effect{padding:8px 10px;margin:8px 0;background:#30333e;border-radius:5px}.effect{border-left:3px solid #81aaff}.timeline{grid-column:1/-1;border-top:1px solid #50535f;padding-top:14px}.clip{background:#36496e;border:1px solid #81aaff;border-radius:5px;padding:12px}.caption{font-size:13px}aside{border-top:1px solid #40414b;margin-top:24px;padding-top:12px}@media(max-width:600px){body{padding:20px 16px}.diagram{grid-template-columns:1fr}.timeline{grid-column:auto}}
7
- </style>
4
+ <title>MotionHarness 桥接组件 · 添加侧栏编辑入口</title>
5
+ <link rel="stylesheet" href="guide.css">
8
6
  <h1>添加侧栏编辑入口</h1><p>通过桥接发送的素材已关联源工程。添加这个可选效果不会重新导出视频。</p>
9
- <ol><li>进入达芬奇的<strong>「剪辑」页</strong>,打开左上角的<strong>「特效库」</strong>(魔棒图标)。</li><li>搜索 <strong>Motion Harness 桥接组件</strong>,将 Open FX 中的同名效果拖到时间线上的目标动效片段。</li><li>选中片段,在<strong>「检查器 → 特效 → Open FX」</strong>中点击<strong>「编辑 Motion Harness 工程」</strong>。</li></ol>
7
+ <ol><li>进入达芬奇的<strong>「剪辑」页</strong>,打开左上角的<strong>「特效库」</strong>(魔棒图标)。</li><li>搜索 <strong>MotionHarness 桥接组件</strong>,将 Open FX 中的同名效果拖到时间线上的目标动效片段。</li><li>选中片段,在<strong>「检查器 → 特效 → Open FX」</strong>中点击<strong>「编辑 MotionHarness 工程」</strong>。</li></ol>
10
8
  <div class="diagram" role="img" aria-label="特效库、检查器和目标片段的布局示意">
11
- <section class="panel"><h2>① 特效库</h2><div class="search">⌕ Motion Harness</div><div class="effect">② Motion Harness 桥接组件</div></section>
12
- <section class="panel"><h2>检查器 → 特效 → Open FX</h2><div class="effect">编辑 Motion Harness 工程</div><p>更新此素材 · 查看状态 · 更多…</p></section>
9
+ <section class="panel"><h2>① 特效库</h2><div class="search">⌕ MotionHarness</div><div class="effect">② MotionHarness 桥接组件</div></section>
10
+ <section class="panel"><h2>检查器 → 特效 → Open FX</h2><div class="effect">编辑 MotionHarness 工程</div><p>更新此素材 · 查看状态 · 更多…</p></section>
13
11
  <div class="timeline"><div class="clip">③ 目标动效片段 · 将效果拖到这里</div></div></div>
14
- <p class="caption">布局示意图。名称按组件安装时的语言显示;中英文均可搜索“Motion Harness”。</p><aside><p><strong>快捷方式:</strong>选中片段,按 <kbd>Shift</kbd> + <kbd>Space</kbd>,搜索 Motion Harness 并添加。快捷键被自定义时,请使用特效库。</p><p><strong>找不到效果?</strong>先安装 Motion Harness 桥接组件:<code>mh bridge davinci install</code>。安装完成后保存工程并重启达芬奇。</p><p><strong>也可以使用菜单:</strong>工作区 → 脚本 → Utility → Motion Harness 桥接组件 → 编辑工程。已经添加过效果的片段无需重复添加。</p></aside>
12
+ <p class="caption">布局示意图。名称按组件安装时的语言显示;中英文均可搜索“MotionHarness”。</p><aside><p><strong>快捷方式:</strong>选中片段,按 <kbd>Shift</kbd> + <kbd>Space</kbd>,搜索 MotionHarness 并添加。快捷键被自定义时,请使用特效库。</p><p><strong>找不到效果?</strong>先安装 MotionHarness 桥接组件:<code>mh bridge davinci install</code>。安装完成后保存工程并重启达芬奇。</p><p><strong>也可以使用菜单:</strong>工作区 → 脚本 → Utility → MotionHarness 桥接组件 → 编辑工程。已经添加过效果的片段无需重复添加。</p></aside>
15
13
  </html>
@@ -1,2 +0,0 @@
1
- "CFBundleDisplayName" = "Motion Harness Bridge Component";
2
- "CFBundleName" = "Motion Harness Bridge Component";
@@ -1,2 +0,0 @@
1
- "CFBundleDisplayName" = "Motion Harness 桥接组件";
2
- "CFBundleName" = "Motion Harness 桥接组件";