- (BOOL) execute:(id<QCPlugInContext>)context atTime:(NSTimeInterval)time withArguments:(NSDictionary*)arguments
{ if([self didValueForInputKeyChange:@"inputPath"]) { NSString * path = self.inputPath; NSURL *pathURL; // Is the path relative to the composition? // This isn't exhaustive, but it doesn't matter if you try for some non-paths if(![path hasPrefix:@"/"] && ![path hasPrefix:@"http://"]) { path = [NSString pathWithComponents:[NSArray arrayWithObjects:[[[context compositionURL] path] stringByDeletingLastPathComponent], path, nil]]; } path = [path stringByStandardizingPath]; if([[NSFileManager defaultManager] fileExistsAtPath:path]) { pathURL = [NSURL fileURLWithPath:path]; } else { pathURL = [NSURL URLWithString:[self.inputPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; } // ... } // ... } On 11 August 2011 09:10, Offonoll N Lists <regoffon...@gmail.com> wrote: > <snip off-list> > > > On Wed, Aug 10, 2011 at 14:04, Tom Butterworth <bangno...@gmail.com>wrote: > >> QCPlugInContext has a method compositionURL. Use that plus NSURL and >> NSString's path manipulation methods. Be prepared for it not to be a file >> URL. >> >> On 10 Aug 2011, at 22:47, Offonoll N Lists wrote: >> >> Hello List! >> I am using image exporter plugin from dev and the image is saved in user >> root (~) or HD root (.) Also when nothing is writing on destination path >> goes to HD root. >> In this thread you can find a image exporter plugin version for a custom >> file name >> http://kineme.net/forum/Discussion/DevelopingCompositions/ApplesImageExporterPlugin >> I would like to have a relative path, to a composer file. >> I search and dust is talking about using 'automatic'* **[plist >> writeToFile:self.inputPath atomically:YES]* here : >> http://kineme.net/forum/Discussion/Programming/XMLexporter >> also in dev Lib >> http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/Reference/Reference.html >> >> How can I integrate a relative path in the 'Destination path' input in the >> Image Exporter Plugin? >> >> fileURL = [NSURL fileURLWithPath:[self.inputPath >> stringByStandardizingPath]]; /*[NSURL fileURLWithPath:[self.inputPath >> stringByStandardizingPath]]; */ >> >> imageDestination = (fileURL ? >> CGImageDestinationCreateWithURL((CFURLRef)fileURL, >> kUTTypePNG, 1, NULL): NULL) ; >> >> if(imageDestination == NULL) { >> >> CGImageRelease(cgImage); >> >> [qcImage unlockBufferRepresentation]; >> >> return NO; >> >> } >> >> >> Thank you!!! >> _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com) >> Help/Unsubscribe/Update your Subscription: >> >> http://lists.apple.com/mailman/options/quartzcomposer-dev/bangnoise%40gmail.com >> >> This email sent to bangno...@gmail.com >> >> >> >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list (Quartzcomposer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com