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

    [Plugin] Material_Maintenance v2.2 - 2013-01-13

    已排程 已置頂 已鎖定 已移動 Plugins
    155 貼文 19 Posters 49.5k 瀏覽 19 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • M 離線
      Myhand
      最後由 編輯

      @driven said:

      tempPath = /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T @tempDir = /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T/material_maintenance /var/folders/rp/b9k42l5x7xngx_8tckgs0zdr0000gn/T/material_maintenance exists!!! Total Entities = 0

      Somehow the getSystemParameters method does not make it to Ruby... I have sent you a PM with another version to test if you don't mind. Probably better to take the debuging off-thread.

      http://www.keepingmyhandin.com/

      1 條回覆 最後回覆 回覆 引用 0
      • D 離線
        driven
        最後由 編輯

        might be a good idea to remove the spare rb files, I'll delete some posts as well, john

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

        1 條回覆 最後回覆 回覆 引用 0
        • M 離線
          Myhand
          最後由 編輯

          @cmd said:

          tempPath = /var/folders/jt/x_n2z5n109n9v_qfj562bsc87bn_mb/T
          @tempDir = /var/folders/jt/x_n2z5n109n9v_qfj562bsc87bn_mb/T/material_maintenance
          /var/folders/jt/x_n2z5n109n9v_qfj562bsc87bn_mb/T/material_maintenance exists!!!
          String Time = 4.0e-06
          Total Entities = 0
          UI => null/jean blue_173796570.png?1

          Here is the output after a material from list is selected and List Components Containing CMD

          I was expecting more trace statements so I have a hunch that this might have to do with my lazy loading the tempdir. This means that I have a situation where I am calling from JS to Ruby, to JS, back to Ruby and then back into JS all in one call. This works in Windows, but there might be a threading/race condition issue on the MAC.

          I have now re-written this part of the code and also enabled tracing directly in the JavaScript side.

          Can you please test again and send me the output (it might even just work now).

          This time though you need to do an extra step to capture the trace in the WebDialog. Once the dialog is open and has focus, press the F7 key, this will bring up a console window which will contain client side trace. See screenshot.

          Please send me both the JS and Ruby console output.


          ScreenShot.jpg

          http://www.keepingmyhandin.com/

          1 條回覆 最後回覆 回覆 引用 0
          • TIGT 離線
            TIG Moderator
            最後由 編輯

            You are using .set_html()
            This is known to be broken on recent MAC versions [Safari]...
            http://sketchucation.com/forums/viewtopic.php?f=180&t=49338&p=443684#p443684
            So it's time to recode that part so it becomes MAC friendly...

            TIG

            1 條回覆 最後回覆 回覆 引用 0
            • D 離線
              driven
              最後由 編輯

              @tig said:

              You are using .set_html()
              This is known to be broken on recent MAC versions [Safari]...
              ...

              @Tig,
              I'm the one using .set_html on my mac, to test his image paths, because it does work on recent MAC versions, btw... Safari is only an indicator of 'next' the 'WebKit' version to be used by WebDialogs, it's always different and a step ahead.
              I can only find one release of 'WebKit' where .set_html() fails, a 'WebKit' version sniffer would be more appropriate for a single release.
              john

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

              1 條回覆 最後回覆 回覆 引用 0
              • M 離線
                Myhand
                最後由 編輯

                @tig said:

                You are using .set_html()
                This is known to be broken on recent MAC versions [Safari]...
                http://sketchucation.com/forums/viewtopic.php?f=180&t=49338&p=443684#p443684
                So it's time to recode that part so it becomes MAC friendly...

                Thanks TIG, I use my_dialog.set_file(html_path) in the plugin.

                Do you mind waving your magic moderator wand and deleting the "to remove" posts above? 😄

                http://www.keepingmyhandin.com/

                1 條回覆 最後回覆 回覆 引用 0
                • TIGT 離線
                  TIG Moderator
                  最後由 編輯

                  Gone!

                  TIG

                  1 條回覆 最後回覆 回覆 引用 0
                  • M 離線
                    Myhand
                    最後由 編輯

                    @tig said:

                    Gone!

                    Thanks TIG! 👍

                    I will release an update soon. Mainly fixing the outstanding bugs on the MAC.

                    A special thanks to @driven and @cmd for helping me debug this remotely! 👍 👍

                    I have learned the following about Sketchup WebDialog on a MAC:

                    • Calls from JS to Ruby, i.e. window.location.href = "skp:xxx" are not synchronous on the MAC, nor are they buffered. In short this means that you can loose calls if they are made in quick succession. I had to create a JS side call stack/event pump

                    • you need to pre-pend the file protocol "file:///" to the start of file paths for them to load on the MAC

                    http://www.keepingmyhandin.com/

                    1 條回覆 最後回覆 回覆 引用 0
                    • thomthomT 離線
                      thomthom
                      最後由 編輯

                      @myhand said:

                      • Calls from JS to Ruby, i.e. window.location.href = "skp:xxx" are not synchronous on the MAC, nor are they buffered. In short this means that you can loose calls if they are made in quick succession. I had to create a JS side call stack/event pump

                      http://sketchucation.com/forums/viewtopic.php?f=180&t=23445

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

                      1 條回覆 最後回覆 回覆 引用 0
                      • M 離線
                        Myhand
                        最後由 編輯

                        @thomthom said:

                        http://sketchucation.com/forums/viewtopic.php?f=180&t=23445

                        Ahaa, the lost manual indeed! 👍

                        http://www.keepingmyhandin.com/

                        1 條回覆 最後回覆 回覆 引用 0
                        • Bob JamesB 離線
                          Bob James
                          最後由 編輯

                          I have three plugins that claim to change materials:

                          1. Global Material Change
                          2. Repaint
                          3. Material Maintenance.

                          Last night I thought I'd give all of them a try to see which is best.
                          I had a transparent material and wanted to change it to a chain-link fence material.

                          Global Material Change did nothing.
                          Material Maintenance did nothing.
                          Repaint fixed it as requested.

                          I was really disappointed that Material Maintenance did not work. 😞

                          i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

                          1 條回覆 最後回覆 回覆 引用 0
                          • thomthomT 離線
                            thomthom
                            最後由 編輯

                            Got a sample model?

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

                            1 條回覆 最後回覆 回覆 引用 0
                            • M 離線
                              Myhand
                              最後由 編輯

                              This could be due to the object_id bug for large models where the id's can get garbage collected. I have fixed this already and will release shortly, but a sample model would be useful or at least some info on where the material was applied to, what settings you used etc.

                              http://www.keepingmyhandin.com/

                              1 條回覆 最後回覆 回覆 引用 0
                              • Bob JamesB 離線
                                Bob James
                                最後由 編輯

                                This is the file I used


                                Fence 2012-12-10.skp

                                i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

                                1 條回覆 最後回覆 回覆 引用 0
                                • M 離線
                                  Myhand
                                  最後由 編輯

                                  @bob james said:

                                  This is the file I used

                                  Thanks Bob. Which material did you try and replace and with what? Which options did you select "Apply to" section? I just replaced metal128 with beige on Front faces, Back Faces and Edges, and that worked fine on the latest bug fix version.

                                  http://www.keepingmyhandin.com/

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • M 離線
                                    Myhand
                                    最後由 編輯

                                    Hi Bob, I have just done the same test with the current release version. 2.1.1 and it also worked. It would also help if you can send a screen shot so I can see which settings you used.

                                    http://www.keepingmyhandin.com/

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • M 離線
                                      Myhand
                                      最後由 編輯

                                      For those that are interested here is a link to my call buffer implementation to get past the call synchronisation problem on a MAC.

                                      Works pretty well and fixes the last bug I had on the MAC. I will now tidy up and release the new version tomorrow.

                                      http://www.keepingmyhandin.com/Downhome/Sketchup/callbuffertosolvewebdialogtorubysynchronisationproblemsonmac

                                      http://www.keepingmyhandin.com/

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • Bob JamesB 離線
                                        Bob James
                                        最後由 編輯

                                        All of the fence originally had a transparent material. I changed them all to the chain-link fence material. I just used the default selections.

                                        i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • M 離線
                                          Myhand
                                          最後由 編輯

                                          @bob james said:

                                          All of the fence originally had a transparent material. I changed them all to the chain-link fence material. I just used the default selections.

                                          Did you select the "Front Faces" and "Back Faces" check boxes at the bottom of the screen under "Apply to"? None of these are selected by default.

                                          http://www.keepingmyhandin.com/

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • C 離線
                                            cadmenow
                                            最後由 編輯

                                            Thank you for such a plug in. I notice that in the download page, there is still v1.0 icon with hyperlink, when you click it, it opens a blank error page...

                                            Anyway, I succeed to download by clicking little arrow but I just want you know about that v1.0 issue,

                                            Thanks again!

                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 8
                                            • 7 / 8
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement