开发者

Adding A Quartz Composer Macro to the Patch Creator

Can I add a macro in Quartz Composer to开发者_开发知识库 the Patch Creator, so I can add it to all my compositions?


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.


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!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜