Calling Whaat and Fredo!! new MAC issues (SOLVED)
-
Sketchup.find_support_file("Plugins")
/Library/Application Support/Google SketchUp 7/SketchUp/Pluginsnote: i have now all my plugins at the hd level.
-
Ah. Then we need someone else with 10.5/10.6 and User plugins folder to test this.
-
Can I say a huge Thank you to all those people who have helped this problem go away. I have no user level plugins folder now and everything seems to work. THANK YOU!
-
Holy carp, so
Sketchup.find_support_file
is not portable?Does that mean I need to look at all the locations stored in $LOAD_PATH to be sure?
It does explain some blank toolbar image problems I have on the Mac.
-
@jim said:
Holy carp, so
Sketchup.find_support_file
is not portable?Does that mean I need to look at all the locations stored in $LOAD_PATH to be sure?
It does explain some blank toolbar image problems I have on the Mac.
If you use that to get the path of your own plugin - use
File.dirname(__FILE__)
instead. Or possilbyFile.dirname( File.realpath(__FILE__) )
.To find other plugins: yes I think you do.
-
Yes, but
File.dirname(__FILE__)
does not return a valid path when used in an encrypted file.What is File.realpath?
-
@jim said:
Yes, but File.dirname(FILE) does not return a valid path when used in an encrypted file.
Really? Never used encrypted files. What do you get in return then?
@jim said:
What is File.realpath?
Sorry, I mixed up with PHP. I meant
File.expand_path
http://ruby-doc.org/core/classes/File.html#M002540
Reason you might want to use that is explained here: http://forums.sketchucation.com/viewtopic.php?f=180&t=26040&st=0&sk=t&sd=a#p224558 -
The File:
print "*** file1.rb being loaded..." print __FILE__ print File.dirname(__FILE__) print File.dirname(File.expand_path(__FILE__)) print "*** Done."
Output when not scrambled:
*** file1.rb being loaded... c;/Program Files/Google/Google Sketchup 7/Plugins/file1.rb c;/Program Files/Google/Google Sketchup 7/Plugins c;/Program Files/Google/Google Sketchup 7/Plugins *** Done.
Output when scrambled:
No idea why the podium path is in there?
*** file1.rb being loaded... (eval) . c;/Program Files/Google/Google Sketchup 7/Plugins/SU_Podium_V2/plug_in/extensions *** Done.
-
eh? Now that's odd!
-
@jim said:
It does explain some blank toolbar image problems I have on the Mac.
sorry if I'm interupting
May not be related, I'm new to ruby scripting, but in trying to figure out why I sometimes have blank tool buttons, I have noticed a couple of things.
if I load a sphere_tool.rb from WebConsole I don't get the icon, but the ruby works
if I use a full 'load' call from WC to Ruby Console using a "Plugins" I get the large icon or "plugins" I get the small icon,
the other thing is they just add into the existing unless I restart in between.
In other cases, depending on the path in the .rb I'm calling, the blank button may or may not work from WC or ConsoleEditor. even if it works load though ruby Console or place in plugins folder. I'll keep tabs on the path in future, to see if it's a type of path causing the issue.
Spare non functional buttons (like I get with TIG's EE toolbar) only appear (on re-start) if left open and horizontal on close, but they go away when moved vertical down a left side
I don't know why or how I'm just poking around to try and learn something...
For what I've been playing around with this seems to be the most reliable path...
@str = Sketchup.get_resource_path("")
are there problems with me using that if I want to share what I make?
john
-
even if I am not anymore involved in Podium 2 development, I will take a look tomorrow when I get back on my Windows machine.
-
Thank you TBD. That's very decent of you.
-
regarding v2 "odd" behaviour when running scrambled scripts - as .rbs are executed dynamically the FILE returns "." (current directory) which is changed by Podium v2 (renderer.rb) via Dir.chdir.
that's why File.expand_path(FILE) returns .../SU_Podium_V2/plug_in/extensions path
you can try this code:
Dir.chdir "c;/" puts "*** file1.rb being loaded..." puts __FILE__ puts File.dirname(__FILE__) puts File.dirname(File.expand_path(__FILE__)) puts "*** Done."
and you will get back:
*** file1.rb being loaded... (eval) . c;/ *** Done.
-
I missed this thread.
Fantastic piece of info about moving rubies and deleting the User level plugins folder on the Mac.
That extra folder has been a pain with rubies in the past. -
Hello everyone. I am a relatively new Sketchup user using a MAC with OSX 10.58 and Sketchup 7.1.6859. I openly admit to be totally lost as to how to install the Bezier Curve plugin. Reading all of this thread has me totally lost. I am running some tools I added for generating CNC files for a foam cutting machine. I am pretty sure I installed those a long time ago as .rb files. Would someone please tell me the easiest way to get a spline tool installed? I need to create some airfoil designs. Thank you very much.
-
do as it was suggested:
- move everything you have in the plugins folder at the user level to the plugins folder to be found at the system level.
- delete the plugins folder at the user level
- from now on install all plugins at the HD level.
-
Thank you Edson. Thanks for the screenshots too. That helps a lot. If I can see it I can do it.
Beautiful. That worked fine.
-
-
Hi!
I have followed the discussion but I have still problems with the icons and tools using the Bezier curve.
Could anyone explain me which are the right steps?I have seen Fredo released a new .rb file called beziermain.rb but also overwriting that in the old folder BezierSpline1.3 I still don't see all the tools.
HELP!
thanks.Stef.
Advertisement