Su plugin categories
-
Hi,
since I collected my first rubies, i wanted to organize my growing number of plugins too. So I found over the time various tools, like sutool (Wikii, only v. 008) the extension manager (Mario P.)-how to configure ?; a collection of rubies into large toolbars (Cadfather-some very useful) then the Redirect_Plugins by Fredo and at last the menu ruby of Didier B.**a)** The first tool (sutool) didn't work properly on my mac, because macs deal with slash, not backslash,-punctuations, for the paths. With a little workaround of this issue, the script worked well. Another annoying side-effect was given of the refreshing button, causing a silly collapsing-behavior on the sutool-window, all the time **b)** The extension manager by Mario Pehle was designed really nice, but unfortunately too much technic and therefore, too inconvenient to configure for a non-ruby-scripter like me (somebody knows a tutorial?? sorry for my ignorance) **c)** the toolbar collection of Cad father was and is indeed, very helpful, but the list of rubies is longer that any visual toolbar plugin can contain (thats sane and reasonable) **d)** the redirect_plugin of Fredo. But it doesn't work for me, because i need sorted menu entries within sketchup, than methods to call supplementary scripts. **e)** the menu-plugin does it well, but the code to add isn't applicable for any script. Maybe because one has to know more than five commands to add these all. In applescript i'm able to write scripts whose rewrite other scripts, but with ruby- :unamused: ..no idea how this should work.
Summary:
the best would be some load-standart handlers assigned with some tag which puts the script in a reasonable category folder. A lot of rubies could be better organized. Honestly i collected a certain amount of rubies, but after nice experiments i trash just as much, to not lost myself searching for a plugin when the work waits to be finished.. -
Hm, lets try to think about a solution:
its easy to create sub-sub-folders, but I want a method to find an existing subfolder, rather than to add a submenu twice, how do I do?some rubies has no path reference- whats about these? I don't mind the contextual menus but the extensions, libraries or other (for me at last) unidentified scripts.
-
You need to get a reference to the submenu object, when it's 1st created.
Is this what you want? Althought, it saids it has issues with the mac. Seems like it actually edit's your plugin files, which seems dangerous. That's why it so hard. You would have to modify every ruby file. I've not used it.
http://www.smustard.com/script/Organizer -
Hi Kyyu,
i'm confused.
I think you say I need to merge the relevant scripts, (who has to live in the same subfolder) into one longer script?
Because two scripts cannot load at the same time and scripts load hierarchically, after the abc, not? -
@jojo9 said:
Hi Kyyu,
i'm confused.
I think you say I need to merge the relevant scripts, (who has to live in the same subfolder) into one longer script?
Because two scripts cannot load at the same time and scripts load hierarchically, after the abc, not?No, you don't need to merge into one big script. You need to to save a reference to the submenu object, when it's created. For example, using a global varable. But make sure it is unique:
$jojo9_submenu=UI.menu('Plugins').add_submenu("[jojo9]") $jojo9_submenu.add_item("Item1") { puts "Item1"}
Then in the next plugin something like this:
if $jojo9_submenu $jojo9_submenu.add_item("Item2") { puts "Item2"} else something end
-
@unknownuser said:
No, you don't need to merge into one big script. You need to to save a reference to the submenu object, when it's created. For example, using a global varable. But make sure it is unique:
$jojo9_submenu=UI.menu('Plugins').add_submenu("[jojo9]") > $jojo9_submenu.add_item("Item1") { puts "Item1"}
Code 1 is designated for a standalone script, right? (like: #jojo9_startup.rb) If so, I would like to add the parallel projection as default view projection at startup of 'sketchup. Perspective is only good for perceptual and presentation purposes.
@unknownuser said:
Then in the next plugin something like this:
if $jojo9_submenu > $jojo9_submenu.add_item("Item2") { puts "Item2"} > else > something > end
Code 2 should be the syntax to append to any script i want to put in a previous defined reference subfolder. I've had no time to test these snippets but i think they 'must' work; they are so nice simple.
-
@jojo9 said:
I would like to add the parallel projection as default view projection at startup of 'sketchup. Perspective is only good for perceptual and presentation purposes.
is 'your template' setup with parallel projection, I think you can do that, otherwise
you can setup a shortcut key for parallel projection [shift+P is what I use] and then you can toggle between it and perspective anytime you wish.I'm not entirely sure what your trying to do, but you can do a lot with applescript and SketchUp startups.
there's a couple of tricks to it, but if you know applescript and automator you can have completely different sets of plugins for different tasks when started with an applescript and you can certainly switch on parallel projection and the tool of your choice that way...
if you do a search here for sumac.app you can see some of the apps I use.
john
-
@unknownuser said:
is 'your template' setup with parallel projection, I think you can do that, otherwise
you can setup a shortcut key for parallel projection [shift+P is what I use] and then you can toggle between it and perspective anytime you wish.sure my personal template starts up using parallel projection, but i would like to open any project in this particular view.
@unknownuser said:
I'm not entirely sure what your trying to do, but you can do a lot with applescript and SketchUp startups.
nothing more or less to organize/reduce the overall menu entries of my plugins and to load another view projection than the default one.
@unknownuser said:
there's a couple of tricks to it, but if you know applescript and automator you can have completely different sets of plugins for different tasks when started with an applescript and you can certainly switch on parallel projection and the tool of your choice that way...
Sketchup isn't nor Applescript- nor Automator-scriptable. What do you mean? The only method to access Sketchup is coding ruby scripts.
@unknownuser said:
if you do a search here for sumac.app you can see some of the apps I use.
i'll do a check. But i think, i love to write my own Applications with Applescripts.
Next days i'll put together a simple tutorial how to use Didier B.'s menu ruby using Applescript . -
@jojo9 said:
Code 1 is designated for a standalone script, right? (like: #jojo9_startup.rb)
No, it just shows how to save a reference to the submenu item. It doesn't have to be in a loader/startup script. If you want an example, look at my Pushpull & Group plugin: http://forums.sketchucation.com/viewtopic.php?t=28072 I wrote it using 2 global variables, but I have figure out since then that you only need 1. You will see that in my plugin, "Code 1" is actually in "Code 2", where it saids "else something".
Advertisement