• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Add Icons [for all SU files on mac]

Scheduled Pinned Locked Moved Plugins
47 Posts 8 Posters 10.7k Views 8 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.
  • D Offline
    driven
    last edited by driven 17 Feb 2015, 23:15

    this has been evolving for a long while, but here it is...
    I have now added it to the plugin store...
    http://plugin.sketchucation.com/pluginserv_joomla.php?f=Add_Icons or visit the Plugin Store for a little more info...
    If you have any other versions you should upgrade after a manual 'move to trash' of the older files...
    The manual deletion is required as I changed a lot of the filenames...
    skp batch mode
    Finder in list view after running Batch Mode
    please give feedback, so i can put this to bed, before my wife kills me...

    v1.0.2: updated to fix v8 ruby bugs...
    changed the Toggling of windows size to enhance the process...

    john

    learn from the mistakes of others, you may not live long enough to make them all yourself...

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dave R
      last edited by 18 Feb 2015, 02:23

      Excellent work, sir!

      Etaoin Shrdlu

      %

      (THERE'S NO PLACE LIKE)

      G28 X0.0 Y0.0 Z0.0

      M30

      %

      1 Reply Last reply Reply Quote 0
      • D Offline
        driven
        last edited by 18 Feb 2015, 02:51

        cheers dave,

        don't know why I cant find it in the plugin store yet...

        I probably did something amiss loading the details...

        I'll chase it up tomorrow...

        john

        learn from the mistakes of others, you may not live long enough to make them all yourself...

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dave R
          last edited by 18 Feb 2015, 02:53

          Go to bed and worry about it when the sun is shining. Or at least supposed to be shining. 😉

          Etaoin Shrdlu

          %

          (THERE'S NO PLACE LIKE)

          G28 X0.0 Y0.0 Z0.0

          M30

          %

          1 Reply Last reply Reply Quote 0
          • G Offline
            gilles
            last edited by 18 Feb 2015, 09:14

            I get this loading SU:

            Error Loading File jcb_Add_Icon.rb
            undefined method `[]' for #<LanguageHandler:0x10ccfca8 @strings={}>

            SU V 8.0.14345

            " c'est curieux chez les marins ce besoin de faire des phrases "

            1 Reply Last reply Reply Quote 0
            • R Offline
              Rich O Brien Moderator
              last edited by 18 Feb 2015, 09:41

              @john

              you don't go live until this is green.

              PicPick-014.png

              it allows you to pull down or publish extensions whenever you wish.

              Download the free D'oh Book for SketchUp 📖

              1 Reply Last reply Reply Quote 0
              • D Offline
                driven
                last edited by 18 Feb 2015, 18:43

                @gilles

                I found a few other v8 issues which I've 'almost' sorted out...

                can I PM you another version, when done?

                the making of icons is working, but the window resizing [used for improving them] needs a tweak...

                john

                learn from the mistakes of others, you may not live long enough to make them all yourself...

                1 Reply Last reply Reply Quote 0
                • D Offline
                  driven
                  last edited by 18 Feb 2015, 22:33

                  @driven said:

                  this has been evolving for a long while, but here it is...
                  I have now added it to the plugin store...
                  [anchor=DOWNLOAD goto=http://sketchucation.com/pluginstore?pln=Add_Icons:2nj0v7ut]DOWNLOAD[/anchor:2nj0v7ut]
                  If you have any other versions you should upgrade after a manual 'move to trash' of the older files...
                  The manual deletion is required as I changed a lot of the filenames...
                  [attachment=0:2nj0v7ut]<!-- ia0 -->batch_icons2.gif<!-- ia0 -->[/attachment:2nj0v7ut]

                  please give feedback, so i can put this to bed, before my wife kills me...

                  v1.0.2: updated to fix v8 ruby bugs...
                  changed the Toggling of windows size to enhance the process...

                  john

                  learn from the mistakes of others, you may not live long enough to make them all yourself...

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    Rich O Brien Moderator
                    last edited by 19 Feb 2015, 16:16

                    @driven said:

                    this has been evolving for a long while, but here it is...
                    I have now added it to the plugin store...

                    404 Not Found

                    favicon

                    (plugin.sketchucation.com)

                    If you have any other versions you should upgrade after a manual 'move to trash' of the older files...
                    The manual deletion is required as I changed a lot of the filenames...
                    [attachment=0:1cyy9qnj]<!-- ia0 -->batch_icons2.gif<!-- ia0 -->[/attachment:1cyy9qnj]

                    please give feedback, so i can put this to bed, before my wife kills me...

                    v1.0.2: updated to fix v8 ruby bugs...
                    changed the Toggling of windows size to enhance the process...

                    john

                    Download the free D'oh Book for SketchUp 📖

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      gilles
                      last edited by 19 Feb 2015, 17:57

                      The symlink is there but no change, error when loading.

                      Pm me any version you want to test with SU8. 👍

                      " c'est curieux chez les marins ce besoin de faire des phrases "

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        driven
                        last edited by 19 Feb 2015, 18:04

                        @gilles,

                        I got v8 back up and running so the new v1.0.2 in the Plugins Store should now work...

                        can you test it to make sure?

                        I also have a translation plugin if you want to try it?

                        john

                        learn from the mistakes of others, you may not live long enough to make them all yourself...

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          driven
                          last edited by 19 Feb 2015, 19:00

                          @gilles said:

                          I get this loading SU:

                          Error Loading File jcb_Add_Icon.rb
                          undefined method `[]' for #<LanguageHandler:0x10ccfca8 @strings={}>

                          SU V 8.0.14345

                          cheers gilles,

                          I recently changed it to use 'langhandler' for translations, but forgot 'langhandler' changed at v14...

                          As a test, could you try this from 'Ruby Console'
                          EDIT: code is now added to v1.0.2...

                          Add Icon should then work...
                          john

                          learn from the mistakes of others, you may not live long enough to make them all yourself...

                          1 Reply Last reply Reply Quote 0
                          • G Offline
                            gilles
                            last edited by 20 Feb 2015, 08:16

                            @driven said:

                            @gilles,

                            I got v8 back up and running so the new v1.0.2 in the Plugins Store should now work...

                            can you test it to make sure?

                            I also have a translation plugin if you want to try it?

                            john

                            It does not work.

                            inside jcb_Add_Icon.rb I read: add_icons_on_mac.version = '1.0.1'

                            " c'est curieux chez les marins ce besoin de faire des phrases "

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              driven
                              last edited by 20 Feb 2015, 12:01

                              @gilles said:

                              ...inside jcb_Add_Icon.rb I read: add_icons_on_mac.version = '1.0.1'

                              oops... I just re-uploaded, and then downloaded the .rbz to check that it is now the 1.0.2 version...

                              sorry about that...
                              john

                              learn from the mistakes of others, you may not live long enough to make them all yourself...

                              1 Reply Last reply Reply Quote 0
                              • G Offline
                                gilles
                                last edited by 20 Feb 2015, 18:35

                                Sorry,

                                Erreur de chargement du fichier jcb_Add_Icon.rb
                                undefined method `[]' for #<LanguageHandler:0x10bccff4 @strings={}>

                                Don't pull out your hairs. 💚

                                " c'est curieux chez les marins ce besoin de faire des phrases "

                                1 Reply Last reply Reply Quote 0
                                • D Offline
                                  driven
                                  last edited by 20 Feb 2015, 18:39

                                  @gilles said:

                                  Don't pull out your hairs. :mrgreen:

                                  I've got quite a lot, and it's working on v8 for me so it's some silly uploading issue...
                                  I'll PM my copy
                                  john

                                  learn from the mistakes of others, you may not live long enough to make them all yourself...

                                  1 Reply Last reply Reply Quote 0
                                  • G Offline
                                    greatoe
                                    last edited by 20 Mar 2015, 16:08

                                    For the latest version 1.0.2, I noticed that a solid white colour is added to the backgound of the icon, and if my SketchUp window is not square, red bars will be added to the top and bottom, or left and right of the icon.

                                    The "set window to square" button/function seems not working, I'm on SketchUp 2015 and OS X 10.10.3.

                                    I was using an early version of your script, and was pleased with it while it generates icons with transparent background.

                                    When I wanted to generate an icon, I use a window management tool (named Window Tidy) to set my SketchUp window to nearly (but not exactly) square to have the best icon result.

                                    May I ask for the transparent background back, and get rid of the red bars?

                                    The old version I use was running good, but I do like the batch function of adding icons to Layout files and skm file.

                                    1 Reply Last reply Reply Quote 0
                                    • D Offline
                                      driven
                                      last edited by 20 Mar 2015, 16:31

                                      hi

                                      I added the 'Red' banding so you can quickly see that a 'better' icon is available by using 'Make Square',

                                      I am looking at adding some user preferences that will let you set the band color to any or transparent...

                                      but first, get 'Set Square' working is quite critical...

                                      It may be a locale issue, do you use 'en-US' for SU or other...

                                      if you could run a couple of test's in 'Ruby Console' we can try and work out the issue...
                                      use 'Select All' >> Copy >> Paste in 'Rudy Console' >> hit 'Enter/Return'

                                          class  Change
                                      
                                          @plist = (ENV["XPC_SERVICE_NAME"]).split('.')[0..-2].join('.')
                                      
                                      #----------------------------------------------------------------------------------------#
                                      
                                          def self.vpw
                                            Sketchup.active_model.active_view.vpwidth
                                          end
                                      
                                      #----------------------------------------------------------------------------------------#
                                      
                                          def self.vph
                                            Sketchup.active_model.active_view.vpheight
                                          end
                                      
                                      #----------------------------------------------------------------------------------------#
                                      
                                          def self.win_read
                                      
                                            %x(defaults  read  #{@plist}      "NSWindow Frame SketchUpDoc")
                                      
                                          end
                                      
                                      #----------------------------------------------------------------------------------------#
                                      
                                          def self.frame_read
                                      
                                            %x(defaults  read  #{@plist}     "Sketchup.MainFrameSize")
                                      
                                          end
                                      
                                      #----------------------------------------------------------------------------------------#
                                      
                                          def self.win_write(arry)
                                      
                                            %x(defaults  write  #{@plist}      "NSWindow Frame SketchUpDoc" #{arry})
                                      
                                          end
                                      
                                      #----------------------------------------------------------------------------------------#
                                      
                                          def self.frame_write(hash)
                                      
                                           %x(defaults  write  #{@plist}     "Sketchup.MainFrameSize" -string "#{hash}")
                                      
                                          end
                                      
                                      #----------------------------------------------------------------------------------------#
                                      
                                          def self.su_window
                                      
                                            win_read.chomp!.split(' ').map{|e| e.to_i}
                                      
                                          end
                                      
                                      #----------------------------------------------------------------------------------------#
                                      
                                          def self.main_frame
                                      
                                            frame_read.chomp!.gsub(/[\{\}]/, '').split(', ').map{|e| e.to_i}
                                      
                                          end
                                      
                                      #----------------------------------------------------------------------------------------#
                                      
                                          SUD = win_read.dup.chomp!   if not defined? SUD
                                      
                                          SMF = frame_read.dup.chomp! if not defined? SMF
                                      
                                          @@revert = false if not defined? SUD
                                      
                                      #----------------------------------------------------------------------------------------#
                                      type = %x(defaults read com.apple.print.PrintingPrefs DefaultPaperID).chomp!
                                      p Sketchup.get_locale
                                      p @plist
                                      p SUD
                                      p SMF
                                      p [vpw, vph]
                                      p type
                                      nil
                                      end
                                      

                                      this should return your machines version of this...
                                      "en-US" "com.sketchup.SketchUp.2015" "189 651 977 526 0 0 1920 1177 " "{{37, 608}, {977, 569}}" [977, 473] "iso-a4"
                                      and hopefully show me what's going wrong...
                                      if you can paste that info back here, that a start...

                                      I'm working on batch mode at the moment as there are issues with versions other than v2015...
                                      john

                                      learn from the mistakes of others, you may not live long enough to make them all yourself...

                                      1 Reply Last reply Reply Quote 0
                                      • G Offline
                                        greatoe
                                        last edited by 21 Mar 2015, 00:27

                                        hi john,

                                        here's the result:

                                        "en-US"
                                        "com.sketchup.SketchUp.2015"
                                        "73 40 1810 1137 0 0 1920 1177 "
                                        "{{73, 4}, {1810, 1173}}"
                                        [3620, 2124]
                                        nil

                                        ps. I'm on a 15" retina display macbook pro.

                                        1 Reply Last reply Reply Quote 0
                                        • D Offline
                                          driven
                                          last edited by 21 Mar 2015, 00:39

                                          cheers,

                                          I think I see the issue, SU shows the 'retina' values but system shows 'traditional' sizes...
                                          in yours this two double...
                                          "{{73, 4}, {1810, 1173}}"
                                          [3620, 2124]
                                          on mine it stays the same...
                                          "189 651 977 526 0 0 1920 1177 "
                                          "{{37, 608}, {977, 569}}"
                                          [977, 473]

                                          I need to add a check for retina, and will post a test file...

                                          john

                                          learn from the mistakes of others, you may not live long enough to make them all yourself...

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

                                          Advertisement