I’m using the slapi to make an importer plugin. I used to install it in the PlugIns folder inside the SketchUp package, but with the latest versions of Mac OSX if I do that, when I start SketchUp a dialog pops up saying that the application is corrupted and can’t start. Apparently in the latest version of OSX they increased security.
Am I still supposed to install the importer plugins in that directory? Is there a workaround?
Thanks,
Also … if you put the plugin into a Zip archive, and rename the file extension from .zip to .rbz, then the “Install Extension” button, on the “Extensions” panel, of the “Preferences” dialog, will install it into the correct location for your customers. (No need to explain any complicated technicalities of how to unhide the appdata folders, etc.)
As an .rbz archive, it can also be installed by the Trimble Extension Warehouse, or the SketchUcation Plugin Store extension.
@fluidinteractv is talking about importer plugins (the ones which generally have .plugin extensions instead of .rb)
these ones:
i don’t know whether or not these will work in the regular plugins folder but just pointing out that fluid is talking about import/export plugins that show up in the list at File->Export
In OS X 10.9.5 and OS X 10.10, Apple has changed their code-signing requirements. This is a bit of a guess, but you may need to sign your plugin before OS X will allow SketchUp to load it.
The funny think is that there appears to be some check on the integrity of the SketchUp package, even if you just delete one of the default importer plugins shipped with SketchUp, you won’t be able to open SketchUp anymore.
So I suspect that new importer plugins should be installed somewhere else.
Installing the .plugin file to the ~/Library/Application Support/SketchUp/SketchUp 2015/SketchUp/Plugins directory doesn’t work, I’m gonna try zipping it and changing to the rbz extension, but I suspect that is not the correct location for importer plugins.
Ok, I can confirm that the extension mechanism works for importer plugins as well. Just zip the .plugin file and then rename the extension from .zip to .rbz
Cool. Where did the “mechanism” end up putting the files, just for giggles ?
On PC, these files are DLLs, and the OEM ones are in the “Exporters” and “Importers” sub-directories.
There is a SketchUp RubyAPI Importer wrapper class that helps interface with SketchUp.
Ruby’s global require() method can load binaries as well as rb scripts.
So (theoretically,) an importer plughin could be wrapped in a SketchupExtension instance, that allowed the user to switch it on and off.
Interesting. I have a similar thing I’m trying to figure out in another thread about building a custom exporter using the Xcode example in the SDK which generates a XmlExporter.plugin file.
zipping that resulting file, renaming it to XmlExporter.plugin.rbz or XmlExporter.rbz, neither end up with it showing up on the File->Export menu for 3D.
Any suggestions? Is your Importer written in C or Ruby?
I used the Ruby API method Sketchup.register_importer(), to make SketchUp aware of my importer instance (so it could be listed as a filetype in the import file dialog’s filetype dropdown list.)
What? Did you think you got your own special standalone listing in the File menu (or Import submenu )?
I do not think that is the case, unless you yourself create the menuitem, and program the Export file dialog yourself.