_1024_SVG QCplugin
A work in progress plugin to load a SVG vector file and render it using GL_LINES.
Currently supports paths, rectangles and circles.
Color and filling are not supported yet.
SVG path is absolute (unless someone points me a way to handle relative path in a QCplugin).
Note that you may have reduce the scale in order to see something in your viewport.
10.5/10.6 Universal. Sample file included, along with anIllustrator file to check the best positioning.
February 1, 2011 at 23:20
jesus i know a way:
try this:
its relative to the composition:
NSString *path = self.inputPath;
if([path length] != 0)//PATH SECTION
{
// is it an absolute path? if so, don’t do anything KINEME GUYS!!!
if([path characterAtIndex:0] != ‘/’)
{
NSLog(@”current ABSOLUT path : %@”, path);
if([path characterAtIndex:0] != ‘~’)
{
// this is when the file to save is relative to the compostion
//COMPOSITE PATH
path = [NSString pathWithComponents:[NSArray arrayWithObjects:[[[context compositionURL] path] stringByDeletingLastPathComponent], self.inputPath, nil]];
NSLog(@”current COMPOSITION path : %@”, path);
}
else
{ // it is a ~ directory, expand it
path = [path stringByExpandingTildeInPath];
NSLog(@”current TILDED path : %@”, path);
}
}
}
i really hope i can help….
February 2, 2011 at 06:16
You can handle this maybe a bit cleaner with:
NSString * path = self.inputPathToLoad;
// relative to composition ?
if(![path hasPrefix:@"/"])
path = [NSString pathWithComponents:[NSArray arrayWithObjects:[[[context compositionURL] path]stringByDeletingLastPathComponent], path, nil]];
// This loads ~ based paths and what not in one go.
path = [path stringByStandardizingPath];
if([[NSFileManager defaultManager] fileExistsAtPath:path])
{
// Load our new path to whatever we want...
}
February 2, 2011 at 11:14
those who know allways teach better than those who are learning….
thank you Vade. allays learning with you
February 2, 2011 at 05:42
This is great!
I was expecting it to render just as an image (from my kineme email), but seeing that this outputs structure is a wonderful surprise.
February 2, 2011 at 14:51
Hi!
Great news. This solves my urge to import vector into quartz.
regards Niklas