QLab通过脚本校准投影映射面

QLab通过脚本校准投影映射面 此脚本来自QLab论坛 原贴是一位网友求助:

我正在制作一个节目,我使用许多视频面将行星视频投影到舞台上的各种泡沫球体(尺寸在 40~90 厘米之间)。我正在寻找一种简单的方法来在演出前校准所有表面以精确投影,因为球体的位置可能会有几厘米的变化。有没有比编辑每个表面更简单的方法,例如通过一个脚本来调整每个表面的原点参数,通过按键(向上、向下、向左)轻推它们?

作者micpool回复:主要的障碍是你不能得到当前的表面原点,因为没有脚本钩子,所以无法使用OSC查询来返回这个属性。但是,可以手动将表面ID和表面原点的当前设置输入到用于存储变量的虚拟文本提示中,如下所示:
原点X存储在翻译X中
翻译Y中的原点Y
文本中的表面ID
按比例微调量X
使用此方法,可以在每个表面使用4个脚本用于上下左右调整,也可以通过热键触发。


以下为脚本:

--nudge DOWN  Surface 1
set theStore to "S1" --q number of cue used to store current position of origin for this surface 
---------------------------------------
tell application id "com.figure53.QLab.4" to tell front workspace
	set the originX to (translation x of cue theStore)
	set theID to text of cue theStore
	set theNudge to scale x of cue theStore
	set the originY to (translation y of cue theStore) + theNudge
	set the translation y of cue theStore to the originY
	set theOSC to "/settings/video/surfaces/" & theID & "/0/origin {" & (originX as integer) & "," & (originY as integer) & "}"
	do shell script "echo " & quoted form of theOSC & " | nc -u -w 0 localhost 53535"
end tell

--nudge UP Surface 1
set theStore to "S1" --q number of cue used to store current position of origin for this surface 
---------------------------------------
tell application id "com.figure53.QLab.4" to tell front workspace
	set the originX to (translation x of cue theStore)
	set theID to text of cue theStore
	set theNudge to scale x of cue theStore
	set the originX to (translation x of cue theStore)
	set the originY to (translation y of cue theStore) - theNudge
	set the translation y of cue theStore to the originY
	set theOSC to "/settings/video/surfaces/" & theID & "/0/origin {" & (originX as integer) & "," & (originY as integer) & "}"
	do shell script "echo " & quoted form of theOSC & " | nc -u -w 0 localhost 53535"
end tell

--nudge RIGHT Surface 1
set theStore to "S1" --q number of cue used to store current position of origin for this surface 
---------------------------------------
tell application id "com.figure53.QLab.4" to tell front workspace
	set the originX to (translation x of cue theStore)
	set theID to text of cue theStore
	set theNudge to scale x of cue theStore
	set the originX to (translation x of cue theStore) - theNudge
	set the originY to (translation y of cue theStore)
	set the translation x of cue theStore to the originX
	set theOSC to "/settings/video/surfaces/" & theID & "/0/origin {" & (originX as integer) & "," & (originY as integer) & "}"
	do shell script "echo " & quoted form of theOSC & " | nc -u -w 0 localhost 53535"
end tell

--nudge RIGHT Surface 1
set theStore to "S1" --q number of cue used to store current position of origin for this surface 
---------------------------------------
tell application id "com.figure53.QLab.4" to tell front workspace
	set the originX to (translation x of cue theStore)
	set theID to text of cue theStore
	set theNudge to scale x of cue theStore
	set the originX to (translation x of cue theStore) - theNudge
	set the originY to (translation y of cue theStore)
	set the translation x of cue theStore to the originX
	set theOSC to "/settings/video/surfaces/" & theID & "/0/origin {" & (originX as integer) & "," & (originY as integer) & "}"
	do shell script "echo " & quoted form of theOSC & " | nc -u -w 0 localhost 53535"
end tell
如果有很多面,可以通过使用此脚本创建由另一个热键触发的编号为“SEL”的Cue,将热键的数量减少到 5 个
告诉应用程序 id “com.figure53.QLab.4” 告诉前端工作区将提示“SEL”的注释设置为(返回的文本(显示对话框“您要轻推哪个表面编号?”默认答案 1)作为字符串)
并将 4 个微调脚本中的每一个的第一行更改为
将商店设置为“S”和“1”
并将其移动到 tell 块中。
 例如用于轻推
--nudge DOWN  Surface set in notes of cue SEL
---------------------------------------
tell application id "com.figure53.QLab.4" to tell front workspace
	set theStore to "S" & notes of cue "SEL"
	set the originX to (translation x of cue theStore)
	set theID to text of cue theStore
	set theNudge to scale x of cue theStore
	set the originY to (translation y of cue theStore) + theNudge
	set the translation y of cue theStore to the originY
	set theOSC to "/settings/video/surfaces/" & theID & "/0/origin {" & (originX as integer) & "," & (originY as integer) & "}"
	do shell script "echo " & quoted form of theOSC & " | nc -u -w 0 localhost 53535"
end tell
因此,可以将快捷键组织为菱形,表面选择在中间,例如使用数字键
     8  
4 5 6
  2

发表回复

后才能评论

网站资源属于虚拟商品,具有可复制可传播性,一旦购买,不接受任何形式的退款要求。 请您在购买获取之前确认好是否是您所需要的资源,软件资源请先自行下载试用版试用再购买。

本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。

最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用百度网盘软件或迅雷下载。 若排除这种情况,可在对应资源底部留言,或联络我们。

新疆与台湾地区是百度云的限制区,无法打开百度云分享链接属于正常情况。 解决方案: 海外同胞可以使用梯子,链接大陆网络即可打开!打开之后转存到自己的网盘再下载 国内朋友如遇到打不开,请检查自己的浏览器谷歌浏览器 以及防火墙。

如果您已经成功付款但是网站没有弹出成功提示,请联系站长提供付款信息为您处理