sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Help for Macfriendlying a plugin (Jim's custom toolbar)

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 343 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      Michaelv
      last edited by

      I tried to use Jim's custom toolbar but it only accesses sketchup commands (I'm on MAC) not plugins. I tried to get into it and modify it to access all plugins by name but I'm not 100% sure of how yet.
      I'm pretty sure it's a directory issue, it only looks into the proper subfolder (toolbars>Files>sketchup).

      I figure either I could add another place for it to look (like this folder and the plugin folder), with a command such as: dir = File.dirname(FILE) or Path=File.join etc.. and proper direction, or in the "if file.exist" loop, add a look somewhere else (in plugin folder).

      And then I probably have to create another folder with copies of the icons (as they could be all over the place) which I would also use for new icons for tools that don't have them yet.
      Anybody can help? I'm not really experienced in Ruby so I'd have to understand what those do exactly before.

      Thanks

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        It's not a simple thing like pointing buttons at files.

        Although some scripts (these would be linear command scripts that load, do their thing and finish,) can be run with a load 'filename.rb' command; many real Plugins are complex with multiple files. Thess complex Plugins are not run like a linear command file (aka like the old DOS batch command scripts.) They either already have a menuitem object created to run them, or if they are a toolbar enabled Plugin, then they'll have a UI::Command object already created for them.

        1. You need to make backups of your Plugins folder (before hacking.)

        2. You need to learn Standard Ruby.

        • See the list I posted over at GoogleGroups. Lots of:* free books in PDF form * online Ruby Tutorials * RUBY RESOURCES (Links)1. Then delve into the Sketchup API for Ruby. You'll need to read the API on:

        • the UI::Toolbar class* the UI::Command class.* the UI::Menu class

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • M Offline
          Michaelv
          last edited by

          Thanks!
          Yeah I know about the different files and such and this one is such a complex branched one, a beautifully programmed one. As for the sketchup API (toolbar, command and menu) I'm not 100% fluent yet, but getting there, already fixed many plugins.
          The thing is it seems to me that it's a difference in file behavior from the PC to the Mac, as if I understand comments made it behaves properly on the PC (looks in the plugin folder) but doesn't seem to on the Mac. Since Jim wrote it for PC there may be a quirk on Mac for which there is a way around that someone had already encountered.
          Of course I won't hack without backup and protections and what not, and without understanding the behavior of the original program, but I can only imagine what it does on a PC and see what it does or doesn't on the Mac.
          In this case the program and the UI work great.

          OK I know you're right I'll do more homework! 😄 Thanks for the links.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement