Developers: Organizer compatibility

Request help with installing and/or using Smustard plugins

Moderators: RickW, todd

Developers: Organizer compatibility

by RickW on Tue Sep 15, 2009 12:39 pm

For any authors who want to be Organizer-compatible, here is the protocol for adding menu items:
Code: Select all
# Supports Organizer.rb
   $submenu ? (organizer = $submenu) : (organizer = UI.menu("Plugins"))
   organizer.add_item("ItemName") { action }

$submenu is the global variable used by Organizer as it traverses the folders located in the Plugins folder. It creates a submenu consisting of the folder name, then adds the scripts in that folder to the submenu. Scripts can have their own submenus as well:
Code: Select all
# Supports Organizer.rb
   $submenu ? (organizer = $submenu) : (organizer = UI.menu("Plugins"))
   submenu=organizer.add_submenu("Name")
      submenu.add_item("ItemName1") { action }
      submenu.add_item("ItemName2") { action }
      submenu.add_item("ItemName3") { action }


Please note, the beginning comment line is important - it prevents the organizerEdit script from trying to automatically edit the script to make it compliant. It can exist at the beginning of the file to speed the process.

There is also a mechanism for developers to easily exclude their subfolders so Organizer will not try to load the contents of those folders. This should result in a smoother experience for users, who won't have to contend with manually maintaining the excluded folders list in the SmustardOrganizerExcludeFolders.txt file.

To do this: in your subfolder, create an empty text file called "exclude.txt" - that's it!
RickW
 
Posts: 27
Joined: Mon Dec 15, 2008 8:07 pm

Re: Developers: Organizer compatibility

by driven on Fri Feb 26, 2010 7:54 am

hi all,

just wondering if any progress has been made on a Mac version of organizer.

I'm teaching myself ruby so as to fix and organize all the unfriendly rubies I use.

I'm making ok progress on the fixing, modifying and even authoring fronts, and thought rather then reinvent the wheel it would be better to use the pre-existing organiZer (even if it's spelt wrong), then I need not modify any scripts that are already set-up for it.

if organizer is unable to be made Mac-able, is it the whole tool, or just the file conversion that's the issue?

I was thinking of using automator and Xcode to batch modify my ruby collection, external of sketchup.

If the base functionality of organizer is ok on the Mac than I would modify my files to work within it's hierarchy.

any thoughts welcome

john
driven
 
Posts: 2
Joined: Fri Feb 26, 2010 7:16 am

Re: Developers: Organizer compatibility

by RickW on Tue Mar 02, 2010 7:09 pm

I just did a quick test on Mac, and it seems to work. Until relatively recently, I didn't have a way to test it, so I put the disclaimer on the product page. It looks like it may be safe to remove that disclaimer now.
RickW
 
Posts: 27
Joined: Mon Dec 15, 2008 8:07 pm

Re: Developers: Organizer compatibility

by driven on Mon Mar 08, 2010 8:08 pm

cheers for the reply Rick,

i'll give it a try when I get a chance

sorry for delayed response I didn't get a mail notification? (have reset now)

john
driven
 
Posts: 2
Joined: Fri Feb 26, 2010 7:16 am


Return to Smustard Plugins

Who is online

Users browsing this forum: No registered users and 1 guest

cron