Redirect plugins folder
-
anyone know how to redirect the folder sketchup searches for plugins? window>preferences>files shows materials, styles, etc but not plugins.
Thanks!
-
All plugins are supposed to go into the Plugins folder under SU. Probably that's why you cannot customize the location.
-
I haven't tried this yet, but it will might work...
Put this script in the original Plugins folder.
path = "c;\\path\\to\\new\\plugins" require_all path
Put new plugins in the new plugins folder.
-
Ah yes, these scripters can always come up with something...
-
Hi Mirjman & Gaieus too.
I'm not a code-head at all, but there is a simple way to help re-distribute the scripts.
At your own risk you can re-locate most scripts using a text editor.
Save the script first to another folder just in case it goes upside down.Do a search for this code UI.menu("Plugins")and just change the "Plugins" to one of the
other menus in SU such as "Tools" etc.
Some scripts are encrypted, but can be converted back to simple text.
Not a recommended procedure but check with the author to see if a special could be produced for you.Happy trails
dtr
-
Jim- can you explain what your code is doing? is it going to move just the plugins or will the program be looking for materials etc in the specified path. Also, do you need one or two "/" in the path?
dtr- i might not have been clear, it seems like your trick will move where the plugin appears in the SU interface. I am trying to move where sketchup will look for the .rb files so that it might be possible to centralize them on a network and everyone will have the same files.
-
My code probably need to require the sketchup.rb file.
require "sketchup.rb" require_all("/plugins")
This is from sketchup.rb
#----------------------------------------------------------------------------- # By default, SketchUp automatically loads (using require) all files with # the .rb extension in the plugins directory. This function can be used # to automatically load all .rb files from a different directory also. to # use this add a call like the following to a file in the plugins directory # require_all "MyRubyScripts" def require_all(dirname) begin rbfiles = Dir[File.join(dirname, "*.rb")] $;.push dirname rbfiles.each {|f| require f} rescue puts "could not load files from #{dirname}" end end
Advertisement