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

    Call to Mac users for script portability

    Scheduled Pinned Locked Moved Developers' Forum
    101 Posts 10 Posters 5.1k Views 10 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.
    • fredo6F Offline
      fredo6
      last edited by

      @takesh h said:

      I think, with the new "Lib6Traductor_31.rb", arrow keys work, Fkeys that are not assigned shortcuts in SU work, Alt/Option key still works as Ctrl key. I couldn't test Shift key.
      Below I copied and pasted what was in Ruby console when I typed Fkeys.

      Glad to see that this works now.
      That was an error on the codes for Function keys on MAC.
      To test Shift, just use any of the tool and toggle SHIFT to either select all connected geometry or just an edge or face. That will show if this works.

      Attached is the file without the trace

      Fredo


      to drop in LIBFREDO6_Dir_31

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

        For Web Dialogs, I have made a slight change to open the windows in a bigger size, and then try to resize.

        Do you notice any difference.

        Fredo

        PS: actually, the test is also to know if I have a problem with SU Web dialogs or with Safari.


        to drop in LIBFREDO6_Dir_31


        to drop in LIBFREDO6_Dir_31

        1 Reply Last reply Reply Quote 0
        • jeff hammondJ Offline
          jeff hammond
          last edited by

          @takesh h said:

          I think, with the new "Lib6Traductor_31.rb", arrow keys work, Fkeys that are not assigned shortcuts in SU work, Alt/Option key still works as Ctrl key.

          a little info about macs and F keys... the keys became programmed as volume, brightness, etc. because of the laptops.. there wasn't enough space on the keyboards for these controls so apple took over the F keys for that purpose..

          on your keyboard, you'll notice a key called fn.. that's basically like a shift key for the function keys.. it allows F4 etc to perform double duty..

          if you want to use F4 in freescale, you have to push fn/F4 together.. if you push F4 by itself, the dashboard will pop up.. in the system prefs (i mentioned this earlier in the thread), you can flip this around to where the F keys will work as they used to and the assigned functions will only work if you press the fn key as well (ie- fn/F10 for mute)

          dotdotdot

          1 Reply Last reply Reply Quote 0
          • jeff hammondJ Offline
            jeff hammond
            last edited by

            @unknownuser said:

            For Web Dialogs, I have made a slight change to open the windows in a bigger size, and then try to resize.

            Do you notice any difference.

            Fredo

            PS: actually, the test is also to know if I have a problem with SU Web dialogs or with Safari.

            ok, so the window opens up nearly twice the size as it use to but it very quickly goes back to the original size only now it's near the bottom of the screen.. nothing has change other than the location of where it's at on the screen.. it happens so fast that i can't see if the save/reset buttons are appearing or not on the initial opening.

            also, i'm not sure if you have this going straight to safari or not but earlier, i tried setting my default browser to firefox and everything stayed the same...

            earlier you asked "By chance, is there on Mac, like in Windows, a contextual menu where you can do a Refresh and see the source code?"
            i don't really know my way around that stuff but it does exist. i pretty much keep it on the GUI side of things.. i wouldn't be much help with code

            [EDIT]-oh wait, you said 'code' and i started getting scared 😄.. if you mean is there a way to view the source code for a page in safari then yeah, it's easy.. right-click/view source

            dotdotdot

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

              Jeff and Takeshi,

              If you can right-click in the dialog box, then could you select the menu "Refresh" if there is one.

              Attached is an updated file to avoid the resizing, so that you can possibly check whether the whole content of the dialog box is displayed or not. Keep the previous Lib6Config_31.rb (which open the box with a big size).

              I am still wondering why SU does not show the full content, unless there is another problem, but with Safari.

              Thanks again

              Fredo

              PS: SU uses Safari, regardless of the setting of your preferred browser on your MAC. So changing to Firefox would have no influence.


              to drop into LIBFREDO6_Dir_31

              1 Reply Last reply Reply Quote 0
              • jeff hammondJ Offline
                jeff hammond
                last edited by

                here's a screenshot of the dialog using the latest file.

                http://homepage.mac.com/jeffhammond/.Public/scf/freescaleweb.jpg

                that's exactly how it opens up and it's the best version yet.. the entire red outlined box is now visible but i still have to stretch the window to get to the save/reset buttons.

                as far as i'm concerned, everything is totally fine as is but i can understand the confusion by a mac user that is just installing freescale.. regardless, all of the tools work perfectly and that's my main concern.

                as far as safari's context menu, these are my options with a normal web page:

                http://homepage.mac.com/jeffhammond/.Public/scf/safaricontext.jpg

                with the freescale dialog, i only have one option which it 'reload'.. if i click on that, everything stays the same.

                dotdotdot

                1 Reply Last reply Reply Quote 0
                • C Offline
                  caronte01
                  last edited by

                  Several plugins on the mac, including yours, won´t remember the state of it´s toolbars (opened or closed), between sessions. Someone at google told me that this can be fixed by including something similar to this:

                  Show toolbar if it was open when we shutdown.

                  state = toolbar.get_last_state
                  if (state == TB_VISIBLE)
                    toolbar.restore
                  end
                  

                  Santiago

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

                    Santiago,

                    Do you mean that this is specific to the Mac platform?
                    On Windows, just calling toolbar.show is sufficient to take into account the previous state when Sketchup is closed.

                    Anyway it's easy to fix, based on your example.

                    Thanks for the tip

                    Fred

                    1 Reply Last reply Reply Quote 0
                    • jeff hammondJ Offline
                      jeff hammond
                      last edited by

                      that would be great to find out a way i could turn the toolbars on and off and have their status remembered.. the only toolbars i have that will do this are the ones that come with SU (sandbox, dynamic components, etc.).. two of the rubies containing toolbars that i have (skin.rb and kerkythea exporter) will not appear upon launch of sketchup and the rest of them will not 'hide' upon launch -- regardless of how they are set up prior to closing the app..

                      speaking of dynamic components fredo, have you by any chance looked at the code for it (or is it even possible?).. that has a web dialog and there are no problems with it on macs.

                      dotdotdot

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

                        @unknownuser said:

                        that would be great to find out a way i could turn the toolbars on and off and have their status remembered.. the only toolbars i have that will do this are the ones that come with SU (sandbox, dynamic components, etc.).. two of the rubies containing toolbars that i have (skin.rb and kerkythea exporter) will not appear upon launch of sketchup and the rest of them will not 'hide' upon launch -- regardless of how they are set up prior to closing the app..

                        I made a small modification to follow the advice from Santiago (attached file). This problem may be specific to the Mac, because, on Windows, toolbars are well 'remembered'.

                        @unknownuser said:

                        speaking of dynamic components fredo, have you by any chance looked at the code for it (or is it even possible?).. that has a web dialog and there are no problems with it on macs.

                        Thanks for this good idea. Difficult to tell however, because it is done differently (mostly in Javascript for the displays). Also their ruby code is encrypted and I suspect my problem precisely lies in the way the dialog box is configured from Ruby.


                        to drop into LIBFREDO6_Dir_31

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

                          For the display of Web dialog boxes

                          Sorry to bother again, I made a slight modif to shift the content down, because it seems that on Mac the top of the HTML content starts under the title bar.
                          Maybe the attached file will correct this.

                          Fredo


                          to drop into LIBFREDO6_Dir_31 subfolder

                          1 Reply Last reply Reply Quote 0
                          • T Offline
                            Tasman
                            last edited by

                            Fredo

                            Thanks for all this work you are doing on the Mac versions.

                            I have just tried your last update which should remember the last position of the toolbars on Quit. Tools on Surface and Free Scale work OK but BZ_Toolbar, Round Edge and Null Transform still have the problem of returning to there previously displayed position.

                            Tasman

                            1 Reply Last reply Reply Quote 0
                            • jeff hammondJ Offline
                              jeff hammond
                              last edited by

                              haha, nice

                              one of the 3-4 toolbars i would like to keep open at all times now has the ability to stay closed.. 😄

                              question: did you have to write something specifically related to this script or is there a generic piece of code i can add to (or request that the writers add) the other toolbar containing rubies.

                              dotdotdot

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

                                About Toolbar persistence across Sketchup sessions

                                Jeff, do you confirm, as Tasman, that you get what you wish with the FreeScale toolbar.
                                It works the same incidently with ToolsOnSurface because the script also uses LibFredo6 31 now.
                                For JPP, BezierSpline and RoundEdge that's not the case however and this is why the change as no effect.

                                @unknownuser said:

                                haha, nice

                                one of the 3-4 toolbars i would like to keep open at all times now has the ability to stay closed.. 😄

                                question: did you have to write something specifically related to this script or is there a generic piece of code i can add to (or request that the writers add) the other toolbar containing rubies.

                                I just used the method suggested by Santiago http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18152&start=15#p147126

                                Fredo

                                1 Reply Last reply Reply Quote 0
                                • jeff hammondJ Offline
                                  jeff hammond
                                  last edited by

                                  @unknownuser said:

                                  About Toolbar persistence across Sketchup sessions

                                  Jeff, do you confirm, as Tasman, that you get what you wish with the FreeScale toolbar.
                                  It works the same incidently with ToolsOnSurface because the script also uses LibFredo6 31 now.
                                  For JPP, BezierSpline and RoundEdge that's not the case however and this is why the change as no effect.

                                  yes, everything is working fine.
                                  thank you

                                  i would like to keep most of your tools open at all times so it's not much of an issue but i am wondering what you added to the script.. i would like to get enough info about it so i can put in a request to the writer of 1001bit that he add the code.. (his scripts are encrypted so he would have to do it)... his toolbar looks like this:

                                  http://homepage.mac.com/jeffhammond/.Public/scf/long_ass_toolbar.jpg

                                  i use two of the tools and it's a slight annoyance to see that big toolbar everytime i open sketchup 😄

                                  i couldn't find where you added the things that santiago wrote a few posts back. what would be the easiest way for me to describe the problem/solution to GOHCH @ 1001bit?

                                  dotdotdot

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

                                    @unknownuser said:

                                    i couldn't find where you added the things that santiago wrote a few posts back. what would be the easiest way for me to describe the problem/solution to GOHCH @ 1001bit?

                                    Jeff,

                                    If you find a line where a toolbar tlbis shown, for instance tlb.show, then transform the code into:

                                    
                                    	case tlb.get_last_state
                                    	when 1
                                    	   tlb.restore
                                    	when -1	
                                    	   tlb.show
                                    	end	
                                    
                                    

                                    This is the modif I did in my script, based on Santiago's suggestion, and it seems to do the job on Mac.

                                    Fredo

                                    PS: What about my last change concerning the display of web dialog boxes? Did it change anything?

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

                                      @unknownuser said:

                                      I don't seem to get the expected result on my iMac when using the Radial Bending function: the object just "leans" instead of bending (see attached picture)

                                      Bob,

                                      You just need to activate the slicer (via the contextual menu, and key fn F4 when it works on Mac).

                                      Fredo

                                      1 Reply Last reply Reply Quote 0
                                      • Bob JamesB Offline
                                        Bob James
                                        last edited by

                                        I don't seem to get the expected result on my iMac when using the Radial Bending function: the object just "leans" instead of bending (see attached picture)

                                        All other functions work great!


                                        Picture 17.png

                                        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 Reply Last reply Reply Quote 0
                                        • Bob JamesB Offline
                                          Bob James
                                          last edited by

                                          Great! Thanks for the quick answer.

                                          In your U-Tube demo you stretch a sphere into a cylinder.
                                          I clicked on the Stretching Tool, oriented the grid by clicking on a line in another part of the screen, but when I stretch it I don't get the cylinder.
                                          Obviously, this is the first time I've tried this incredible tool.


                                          Picture 20.png


                                          Picture 18.png


                                          Picture 19.png

                                          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 Reply Last reply Reply Quote 0
                                          • fredo6F Offline
                                            fredo6
                                            last edited by

                                            @unknownuser said:

                                            Great! Thanks for the quick answer.

                                            In your U-Tube demo you stretch a sphere into a cylinder.
                                            I clicked on the Stretching Tool, oriented the grid by clicking on a line in another part of the screen, but when I stretch it I don't get the cylinder.
                                            Obviously, this is the first time I've tried this incredible tool.

                                            It depends how you built the sphere. Yours seems to be made of 'Sketchup Curves', which as indicated in the video are never stretched in the current version (I have to work on a more flexible approach, because sometimes this is what the user wants, and sometimes it's not, as in your current case).

                                            Fredo

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

                                            Advertisement