sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update

    Create Icons for Plugins?

    Scheduled Pinned Locked Moved Plugins
    11 Posts 6 Posters 564 Views 6 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.
    • Rich O BrienR Offline
      Rich O Brien Moderator
      last edited by

      If you mean by Ruby code then yes....

      If you look at the code of a simple plugin that uses an icon you can then apply that to one that doesn't.

      if not file_loaded?(File.basename(__FILE__))
      	new_menu = UI.menu("Draw").add_submenu("Pen Tool +")	
      	new_toolbar = UI;;Toolbar.new("Pen Tool +")
      	plugins = Sketchup.find_support_file("Plugins")	
      	imgdir = File.join(plugins, "rob_hsltool")
      
      	cmd = UI;;Command.new("Soft Draw")  {Sketchup.active_model.select_tool(SLineTool.new())  }
      	cmd.small_icon = File.join(imgdir, "sline16x16.png")
      	cmd.large_icon = File.join(imgdir, "sline24x24.png")
      	cmd.tooltip = "Soft Draw"
      	cmd.menu_text = "Soft Draw"
      

      This is from my/TIG's Pen Tool+. It adds a menu item to the Draw menu then assigns it to a toolbar where it's icons reside in the 'rob_hsltool' folder. Further down it references the small and large icons and some tool tip text when you hover over the icon. There are other things it referencing like classes.

      I've a very custom set of toolbars that I built from various tools with custom icons. The problem arises when someone updates a plugin and then your digging around trying to see what changed etc.

      I'm sure one of the gurus will correct my very rudimentary understanding of it but that's my 2 cents.

      Download the free D'oh Book for SketchUp 📖

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        Hay you icon creating maniacs - post them icons back to the developer and it will probably go into the next release. Often icons aren't made because it simply takes time to do them.

        hmmm... community project?

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • fredo6F Offline
          fredo6
          last edited by

          @thomthom said:

          Hay you icon creating maniacs - post them icons back to the developer and it will probably go into the next release. Often icons aren't made because it simply takes time to do them.

          hmmm... community project?

          Not just a matter of time, but of artistic capability....!

          Fredo

          1 Reply Last reply Reply Quote 0
          • CadFatherC Offline
            CadFather
            last edited by

            ask, and you shall receive! ☀

            1 Reply Last reply Reply Quote 0
            • U Offline
              unclex
              last edited by

              Question 2

              How to make a Toolbar within different RB file?

              1 Reply Last reply Reply Quote 0
              • CadFatherC Offline
                CadFather
                last edited by

                you give the toolbars the same name - then the icons will be in one toolbar

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  @cadfather said:

                  you give the toolbars the same name - then the icons will be in one toolbar

                  Sure?
                  I thought you got two different toolbars. Thought the only way was to share the Toolbar object...

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • thomthomT Offline
                    thomthom
                    last edited by

                    At least, if the toolbar has been displayed it won't accept new buttons....

                    Thomas Thomassen — SketchUp Monkey & Coding addict
                    List of my plugins and link to the CookieWare fund

                    1 Reply Last reply Reply Quote 0
                    • CadFatherC Offline
                      CadFather
                      last edited by

                      well, that's what i do to group icons - if you share the same menu name, you will get two menus but in the case of toolbars it works. (this tip was from master fredo long time ago)..

                      1 Reply Last reply Reply Quote 0
                      • U Offline
                        unclex
                        last edited by

                        A lots of Billiant Plugins
                        But
                        Perhaps, should need a Standard for write Plugins

                        Such as

                        module Somebody
                        class Something
                        def Somejob

                        it make plugins less conflict
                        and easier for someguy Creating Icons

                        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