Extension manager hooks?
-
The release notes for M2 state this:
@unknownuser said:
"Ruby plugin hooks: In addition to the above functionality, we have added several API hooks to allow Developers to more easily write their own Ruby extension managers."
I haven't been able to find any info about this on the sketchup blogs, here at sketchucation, the API docs, or anywhere. Does anyone know what this new functionality is?
-
basically, if you zip your my.rb and rename it my.rbz, SU Extension Manager will load it from your 'download destination' directly into 'Plugins', saving your Users all the grief of what do I put where.
and some other bits...
john
-
The release docs list the zip stuff separately from the "API hooks". And the zip integration wouldn't be have anything to do with the API anyway. I think they must be talking about something different, at least it certainly sounds like it to me.
-
@avariant said:
zip integration wouldn't be have anything to do with the API anyway.
they had to rewrite a bit of the API and authors have write/re-write their scripts via the API to use those 'new' hooks effectively, but there is other stuff coming, I'm sure... john
-
The .rbz file format can be 'auto-installed' via Preferences even it it's NOT an 'Extension'...
I already asked Google to rephrase the wording on that button... but to no avail...This means that any script packaged as a .rbz format file can be [relatively] painlessly installed using that button using the Preferences option [in an appropriate v8+++]... however, those that are made as proper 'Extensions' offer the user the ability to switch the tools on and off via Preferences...
-
@tig said:
however, those that are made as proper 'Extensions' offer the user the ability to switch the tools on and off via Preferences...
But this isn't new, right? This has been available for a long time...
-
Sketchup.install_from_archive("C;/Folder/Plugin.[rbz|zip]") # unzips an .rbz or .zip archive to the Plugins folder. Skethcup.plugins_disabled=(true|false) # enable/disable loading of the Plugins folder on next start. Skethcup.plugins_disabled? Sketchup.extensions #- returns the list of SketchupExtension objects Sketchup.extensions[name_or_index] Sketchup.extensions.methods ["select", "partition", "grep", "reject", "member?", "find", "each_with_index", "collect", "all?", "length", "entries", "detect", "zip", "map", "any?", "size", "sort", "count", "min", "find_all", "each", "inject", "keys", "sort_by", "max", "[]"] SketchupExtension.new.methods - Object.methods ["description=", "copyright", "copyright=", "loaded?", "version", "version=", "check", "load_on_start?", "load", "name=", "registered?", "register_from_sketchup", "creator", "uncheck", "creator=", "unload", "description"]
My understanding is that at least some of the SketchupExtension instance methods are meant to be called by SketchUp rather than by plugins.
-
@jim said:
My understanding is that at least some of the SketchupExtension instance methods are meant to be called by SketchUp rather than by plugins.
Yep.
If interested, just read comments in the new extensions.rb file in the Tools dir.
Advertisement