sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Redirect plugins folder

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    7 Posts 4 Posters 1.3k Views 4 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
      mirjman
      last edited by

      anyone know how to redirect the folder sketchup searches for plugins? window>preferences>files shows materials, styles, etc but not plugins.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • GaieusG Offline
        Gaieus
        last edited by

        All plugins are supposed to go into the Plugins folder under SU. Probably that's why you cannot customize the location.

        Gai...

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by

          I haven't tried this yet, but it will might work...

          Put this script in the original Plugins folder.

          
          path = "c;\\path\\to\\new\\plugins"
          require_all path
          
          

          Put new plugins in the new plugins folder.

          Hi

          1 Reply Last reply Reply Quote 0
          • GaieusG Offline
            Gaieus
            last edited by

            Ah yes, these scripters can always come up with something... πŸ˜’

            Gai...

            1 Reply Last reply Reply Quote 0
            • D Offline
              dtrarch
              last edited by

              Hi Mirjman & Gaieus too.

              I'm not a code-head at all, but there is a simple way to help re-distribute the scripts.
              At your own risk you can re-locate most scripts using a text editor.
              Save the script first to another folder just in case it goes upside down.

              Do a search for this code UI.menu("Plugins")and just change the "Plugins" to one of the
              other menus in SU such as "Tools" etc.
              Some scripts are encrypted, but can be converted back to simple text.
              Not a recommended procedure but check with the author to see if a special could be produced for you.

              Happy trails

              dtr

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

                Jim- can you explain what your code is doing? is it going to move just the plugins or will the program be looking for materials etc in the specified path. Also, do you need one or two "/" in the path?

                dtr- i might not have been clear, it seems like your trick will move where the plugin appears in the SU interface. I am trying to move where sketchup will look for the .rb files so that it might be possible to centralize them on a network and everyone will have the same files.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  Jim
                  last edited by

                  My code probably need to require the sketchup.rb file.

                  
                  require "sketchup.rb"
                  require_all("/plugins")
                  
                  

                  This is from sketchup.rb

                  
                  #-----------------------------------------------------------------------------
                  # By default, SketchUp automatically loads (using require) all files with
                  # the .rb extension in the plugins directory.  This function can be used
                  # to automatically load all .rb files from a different directory also.  to
                  # use this add a call like the following to a file in the plugins directory
                  # require_all "MyRubyScripts"
                  def require_all(dirname)
                      begin
                          rbfiles = Dir[File.join(dirname, "*.rb")]
                          $;.push dirname
                          rbfiles.each {|f| require f}
                      rescue
                          puts "could not load files from #{dirname}"
                      end
                  end
                  
                  

                  Hi

                  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