将 Quartz Composer 宏添加到 Patch Creator

发布于 2024-11-07 10:34:36 字数 67 浏览 7 评论 0原文

我可以将 Quartz Composer 中的宏添加到 Patch Creator 中,以便将其添加到我的所有作品中吗?

Can I add a macro in Quartz Composer to the Patch Creator, so I can add it to all my compositions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

原来是傀儡 2024-11-14 10:34:36

是的。有两种方法可以执行此操作:

  • 将宏另存为合成,并将合成文件放置在<您的主文件夹>/Library/Graphics/Quartz Composer Patches 中。重新启动 Quartz Composer 后,它将出现在 Patch Creator 中。
    • 警告:当您使用以这种方式保存的宏时,系统会创建一个引用(而不是复制宏的实际内容),因此您需要手动安装宏才能使其正常工作。
  • 在 Mac OS 10.6 及更高版本中,您可以创建虚拟宏。选择要制作到虚拟宏中的补丁,转到编辑器菜单,然后“添加到库”。
    • 注意:当您使用虚拟宏时,使用的合成会嵌入一个副本,但这些合成仅适用于 10.6 及更高版本。

Yes. There are two ways you can do this:

  • Save the macro as a composition, and place the composition file in <your home folder>/Library/Graphics/Quartz Composer Patches. After you restart Quartz Composer, it'll appear in the Patch Creator.
    • Caveat: When you use a macro saved this way, a reference is created (rather than copying the actual contents of the macro), so you'll need to manually install the macro in order for it to work.
  • In Mac OS 10.6 and later, you can create a Virtual Macro. Select the patches you want to make into the Virtual Macro, go to the Editor menu, and "Add to Library".
    • Caveat: When you use a Virtual Macro, a copy will be embedded with the using composition, however these compositions will only work on 10.6 and later.
叹沉浮 2024-11-14 10:34:36

smokris 有一个很好的回应,尽管我发现自己必须读几遍才能明白它的含义!如果您想从预先存在的补丁中构建单个补丁:点击“添加到库”,确保您已选择要合并的所有补丁并发布了您想要的输入输出等(smokris 选项 2)。我已经制作了一些“电源补丁”,其中仅包含我想要的相关参数/功能。您会丢失已连接的各个补丁,这也许可以使事情变得简洁。

如果您想保留整个合成和配置的补丁,以便可以调整和重新连接它们,则手动导入它(smorkis 选项 1)。真麻烦啊!

——但不一定是这样。如果您使用 Automator,您可以包含一个 Apple 脚本步骤来为您完成所有导入!例如,写一个:

*获取指定的查找器项目(您要导入的 qtz 作文)
*打开查找器项目
*运行苹果脚本:

on run {input, parameters}

    tell application "Finder"
        do shell script "jay is incredible"
    end tell
    tell application "System Events"
        keystroke "a" using command down
        keystroke "c" using command down
        keystroke "`" using command down
        keystroke "v" using command down
        delay 1

    end tell

    return input
end run

*open finder items
*run apple script:

on run {input, parameters}

    tell application "System Events"
        keystroke "w" using command down
    end tell

    return input
end run

这样,您可以通过 Spotlight(命令空格键)打开 Automator 应用程序,只需单击 1-2 次即可导入合成。厉害了哈!!

smokris has a good response although I find myself having to read it several times to get what it means! If you want to build a single patch out of pre-existing patches: Hit Add to Library, making sure you have selected all the patches you want to consolidate and the published the inputs outputs you want, etc (smokris option 2). I've made some of these "power patches" with only the relevant parameters/features I want. You lose the individual patches you've connected, which is maybe ok to make things concise.

IF you want to preserve the entire composition and configured patches so you can tweak and rewire them, then manually import it (smorkis option 1). What a hassle!

--BUT it doesn't have to be. If you use Automator, you can include an Apple Script step to do all the importing for you! For example, write one that:

*get specified finder items (your qtz composition you want to import)
*opens finder items
*run apple script:

on run {input, parameters}

    tell application "Finder"
        do shell script "jay is incredible"
    end tell
    tell application "System Events"
        keystroke "a" using command down
        keystroke "c" using command down
        keystroke "`" using command down
        keystroke "v" using command down
        delay 1

    end tell

    return input
end run

*open finder items
*run apple script:

on run {input, parameters}

    tell application "System Events"
        keystroke "w" using command down
    end tell

    return input
end run

That way, you can open that Automator application via Spotlight (command spacebar) and it'll import the composition in 1-2 clicks. Awesome huh!!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文