Change location of the plugins folder in SU8
-
I'm not sure, but perhaps this recent thread will help.
http://forums.sketchucation.com/viewtopic.php?f=323&t=35803 -
@box said:
I'm not sure, but perhaps this recent thread will help.
http://forums.sketchucation.com/viewtopic.php?f=323&t=35803Thnx Box but the plugin you suggested is about shortcut's to user folders like my documents etc.
-
don't think it is possible without changing it in the program itself
-
@cadfather said:
don't think it is possible without changing it in the program itself
It's possible. But some plugins might not work correctly outside the plugins folder. Some make assumptions to their location.
But you can make a
loader.rb
and add the following line:
require_all E:\Sketchplugins
That will make SU load all .rb and .rbs file in the given location.
Note that the path can not have non-English characters - as then it'll fail.
-
Dear Thomas,
Could your recommendation be taken further? Could a plugin be created, with a drop down menu activated by an icon, to load plugins from different locations on one's C drive? The idea being that one has a baseline plugin folder in the normal Google Sketchup location, and then one loads plugins from different folders on the C drive as and when they are needed. Ideally, the user should be able to edit the drop down menu to label menu items, to assign directory path names and to add/remove items.
Just a thought.
Regards,
Bob -
@watkins said:
Dear Thomas,
Could your recommendation be taken further? Could a plugin be created, with a drop down menu activated by an icon, to load plugins from different locations on one's C drive? The idea being that one has a baseline plugin folder in the normal Google Sketchup location, and then one loads plugins from different folders on the C drive as and when they are needed. Ideally, the user should be able to edit the drop down menu to label menu items, to assign directory path names and to add/remove items.
Just a thought.
Regards,
BobI think this plugin can do that:
http://forums.sketchucation.com/viewtopic.php?t=17660 -
Hi Thomas,
How can I tell what plugin will load and what not outside the plugins-folder?
What do you mean by making assumptions about their location? Do I have to edit
non loading scripts or something?Thankyou
-
Thomas's idea is simple http://forums.sketchucation.com/viewtopic.php?p=316146#p316146 but as he warns some scripts assume that they are in Plugins [especially older ones] and therefore fail to load required files etc.
Theloader.rb
goes into Plugins as that [and Tools] folder MUST be on load path that Sketchup automatically makes.
If you want to add another folder to the path add this extra line of code to yourloader.rb
file
require_all 'E:\Sketchplugins' $LOAD_PATH << 'E:\Sketchplugins'
Any cripts on the E: drive that use 'find_support_file' will fail to find files if they are not also in the set up, but those using 'FILE' should be OK... -
OK TIG I see thnx
-
TIG: do you think that if I use a program such as grepWin to replace all "find_support_file" with "File" it will work? (I guess it won't work for the scrambled ones).
-
As you surmised it'll fail to find anything in .rbs or 'packed' .rb files...
There's a list of the most common files using the
find_support_file
method in another parallel thread - I made it using Baregrep - a free utility to search folders/subfolders [used on Plugins folder]. You can open any found file[s] from its browser window...Once you have a list of these files containing the phrase you'll need to open each one in Notepad++ and then actually read what it does each time - there are good find/replace and copy/paste in such editors... So lines like
xxxx=Sketchup.find_support_file('Plugins')
CAN be replaced withxxxx=File.dirname(__FILE__)
BUT if there are other similar calls to say the 'Components' folder it's more convoluted as that might NO LONGER be still relative to the current .rb file's folder and you'd need to leave thatfind_support_file
call alone ??
Also doing this editing makes an admin headache because you need to check every newly installed file for compliance... -
grepWin does batch find-and-replace... I am tempted to do this because I like keeping my "libraries" on an external, where it's easier to backup and gives me more mobility.
I guess I will just backup my plugins folder, give it a try, and then test each plugin.
But before I get to this step, I need to make the loader.rb work - I think I might be doing something wrong...
Here is what I did: Moved all plugins to E:_Library\Sketchup\Plugins
Then in the original plugins folder, I added a file called loader.rb with the exact lines:require_all 'E:\Library\Sketchup\Plugins'
$LOAD_PATH << 'E:\Library\Sketchup\Plugins'But when I opened Sketchup, plugins where nowhere to be seen.
Any ideas? -
Is it
E:\**_**Library\Sketchup\Plugins
or
E:\Library\Sketchup\Plugins
You have a typo - which is it ?Add this line
require 'sketchup.rb'
at the start of your 'loader' script.Try renaming the 'loader' script as '
!loader.rb
' so it loads very early or 'zzzloader.rb
' so it loads very late...If you type this line
require_all 'E:\Library\Sketchup\Plugins'
into the Ruby Console after everything else has loaded then does it load the E: drive stuff too ?
If you type this into the Ruby Console
$LOAD_PATH
does it return an array that now includes
E:\Library\Sketchup\Plugins
as well as the paths to the Tools and Plugins folders?It is quite possible to have this set up - I use it so that my Uni students can load their own scripts from a special folder on their personal accessible H: drive, because IT won't let the do anything to the drive Plugins folder for security reasons... IT simply added a short script that I wrote doing much what you want, loading every script from the folder and adding the folder to $LOAD_PATH so that they can load a file by typing its name only and it'll get found there after SUp has looked in the other folders too...
-
(the "E:\Libary" was just an example" the actual directory is shown below)
ok, I tried entering the what you suggested in the console, and I got this:
$LOAD_PATH
["C:/Program Files (x86)/Google/Google SketchUp 8/Plugins", "C:/Program Files (x86)/Google/Google SketchUp 8/Tools", "I:\_Library\SketchUp\_Plugins", "I:\_Library\SketchUp\_Plugins"]
require_all 'I:_Library\SketchUp_Plugins'
[] " < EMPTY ARRAY ???"I assumed the [] is an empty array of plugins, which tells me that SU was not finding the directory. But the double \ made me me think SU was misinterpreting the directory address.
And that's when I figured out what was wrong!!!
I replaced:
require_all 'I:_Library\SketchUp_Plugins'
$LOAD_PATH << 'I:_Library\SketchUp_Plugins'with
require_all 'I:/_Library/SketchUp/_Plugins'
$LOAD_PATH << 'I:/_Library/SketchUp/_Plugins'and voila. For some reason (I am sure you know why) the path that I copied from windows explorer (which uses back slash) is not well understood by SU.
(Most plugins are loading ok, but when I type "require_all 'I:_Library\SketchUp_Plugins'" the console still returns "[]")
Thanks for your help. I guess now all I have to do is find and edit all the " find_support_file". RBS that use that call will
have to stay in the standard folder : (
-
Hi Guys!
I just got my new laptop and I've finished my new Windows 7 installation.. And I like It!!!
I also found a real good solution to the problem of this topic...http://www.techrepublic.com/article/vistas-symbolic-links-feature-saves-navigating-time/6177180
-
I am almost regretting doing this... I wish the SU team would add way to load an "external" plugin library.
I really want to have my plugins in my Dropbox so I have them all sync in all computers that I use for sketchuping.Most plugins seem to work, but I have noticed a few that don't.
Every time I open Sketchup I get all these errors!
PS: I still haven't replaced the "find_support_file".Error Loading File I:/_Library/SketchUp/_Plugins/Artisan/artisan_load.rb
(eval):3641:injoin': can't convert nil into StringError Loading File I:/_Library/SketchUp/_Plugins/artisan_loader.rb (eval):3641:in
join': can't convert nil into StringError Loading File I:/_Library/SketchUp/_Plugins/c-midpoint.rb
I:/_Library/SketchUp/_Plugins/c-midpoint.rb:196: syntax error, unexpected kEND, expecting $endError Loading File I:/_Library/SketchUp/_Plugins/camera-cameraslidecontrols.rb
no such file to load -- smustard-app-observer.rbError Loading File I:/_Library/SketchUp/_Plugins/CameraKeyMaker/camera_key_maker.rb
no such file to load -- bezier.rbError Loading File I:/_Library/SketchUp/_Plugins/cameraKeyMaker.rb
no such file to load -- bezier.rbError Loading File I:/_Library/SketchUp/_Plugins/q-parking.rb
I:/_Library/SketchUp/_Plugins/q-parking.rb:137: syntax error, unexpected tCONSTANT, expecting '{'
BEGIN CHANGES BY organizerEdit.rb
^
I:/_Library/SketchUp/_Plugins/q-parking.rb:149: syntax error, unexpected tCONSTANT, expecting '{'
END CHANGES BY organizerEdit.rb
^Error Loading File I:/_Library/SketchUp/_Plugins/zzz-SU_Podium_Browser_loader.rb
(eval):361:in `small_icon=': can't convert nil into String
Advertisement