Making Unsafe patches Safe patches with the command line.

usefuldesign.au's picture

As much as I appreciate the KinemeCore unsafe patches preference tab, some people don't have Dev Tools installed.

I just sent a Keynote with embedded QC file and realised that not only is the Video Input patch unsafe, but also the Movie Downloader patch is unsafe.

(I tried putting the 4000 image sequence into a multipage PDF but it crashed Acrobat Pro).

So is there a command I could send as a string that somebody could open terminal, paste in, hit return and have whatever patch associate with the command go safe in Keynote?

I guess the command could even be embedded in to a QC comp with the Command Line plugin but they'd need to install that too.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

smokris's picture
Re: Making Unsafe patches Safe patches with the command line.

  1. Install KinemeCore
  2. Run the command defaults write com.apple.QuartzComposer.editor KCSafeModeOverride -dict-add YourApplicationName '( "PatchToRunUnsafely", "AnotherPatchToRunUnsafely" )'

For example, to make Video Input work in Keynote:

defaults write com.apple.QuartzComposer.editor KCSafeModeOverride -dict-add Keynote '( "QCVideoInput" )'

(You don't even need to have the QC Editor / dev tools installed.)

usefuldesign.au's picture
Re: Making Unsafe patches Safe patches with the command line.

Thanks a bundle Steve!

One more dumb question… where can I find the correct command line token (is it filename?) for each an every unsafe patch.

For example I want to make the Movie Loader Patch safe for Keynote, I can guess it's called "QCMovieLoader" but what if it isn't, where do I find those strings please?

Incidentally the stock Movie Loader patch doesn't accept relative paths like "./" in Keynote, you have to use "~/Desktop" and absolute paths like that from my testing.

So it's okay to email the KinemeCore-20090430.zip (or latest version) to someone and they double click* and that's it for install or do you want people registering for beta patches and downloading for themselves?

  • Actually double-click probably wont work if a version of KinemeCore doesn't already exist will it?

smokris's picture
Re: Making Unsafe patches Safe patches with the command line.

The token to use on the commandline is the patch's class name. There isn't really a straightforward way to get this value. (You could save a simple composition containing just that patch, then open the composition in Property List Editor, and pick it out of there.)

The stock Movie Importer patch should already run in safe mode as-is (without KinemeCore).

The current version of KinemeCore (0.5.1) is a production release (not beta), and it includes an installer which users can just double-click.

gtoledo3's picture
Re: Making Unsafe patches Safe patches with the command line.

@ usefuldesign:

I usually use the plist editor route the smokris suggested, but this also provides you with the class names:

http://kineme.net/release/CompositionTool/20080815

It has a mode that shows classes, safe mode, and other info of all patches in a composition.

It also has a flattening mode. The only quirk I can think of with that is that if you flatten something that has a 64-bit only build, the patch may not be present in the flattened version... I haven't extensively tested that, but I've noticed it in one scenario. Since you're running in Leopard it wouldn't be something that would pop up.

usefuldesign.au's picture
Re: Making Unsafe patches Safe patches with the command line.

Thanks Steve. Oh yeah Plist, I thought of that later. I only use .plist for global find replace exercises so it's not on my QC radar!

I was wrong about Movie Loader, sorry 'bout that.

usefuldesign.au's picture
Re: Making Unsafe patches Safe patches with the command line.

So that's what all that flattening talk was about. Does the QC "Save as Flattened…" do the same as this or bit different? Thanks george I'l check this little app out for sure.

Re: Making Unsafe patches Safe patches with the command line.

Sorry for what may be a redundant question, but i am fairly new to all of this and am trying to get a better grasp on it. I have made a QC composition and have my widget ready in DashCode to load my QC composition. However, whenever I try to load it in it tells me that it has unsafe patches and can not load it because of this. Is there any way around this problem? Any Advice would be greatly Appreciated

Re: Making Unsafe patches Safe patches with the command line.

sorry answered my own question had to restart system but it is fine now sorry for the stupid question

chiara's picture
Re: Making Unsafe patches Safe patches with the command line.

Hi there,

I've m. lion and i've installed kinemecore under /Library/Spotlight in order to enable the video input from quartz composer in Dashcode. Something in terminal did not work. What is the right command? Thanks in advance. Best, CHiara

PreviewAttachmentSize
Schermata 03-2456736 alle 17.44.16.png
Schermata 03-2456736 alle 17.44.16.png175 KB

chiara's picture
Re: Making Unsafe patches Safe patches with the command line.

This works fine in terminal: defaults write com.apple.QuartzComposer.editor KCSafeModeOverride -dict-add Dashcode '( "QCVideoInput" )' in fact, dashcode does not shows anymore error mnsg. when i load the q.c. comp. The problem is that dashcode does not switchs on the video input enabling the internal webcam. Don't know why...

chiara's picture
Re: Making Unsafe patches Safe patches with the command line.

solved... I had an old version of kineme core taht I've substituted.