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

    Possible or Impossible? (or post your favourite jQuery..)

    Scheduled Pinned Locked Moved Developers' Forum
    20 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.
    • CadFatherC Offline
      CadFather
      last edited by CadFather

      i've done some good searching and a few weekends trying things out, but am not much further than i started. so better just ask some masters about whether these are just impossible to achieve and rest the case.

      Q1 - move a texture along a curved mesh of faces by arrow keys. rather like TIG's texture rotate tool but able to work on curved faces.

      Q2 - change the sun position/time by drawing a vector (line). i was thinking that if i can draw a line, given a set location, i'd be able to calculate the position of the sun and then change the shadowinfo to match it.

      Q3 - activate the color picker without calling the paint bucket. just like when on pc i click on the icon on the mat browser.

      Q4 - would the new toolbar system allow for input fields? (you know where this is going) - no info whatever on this.


      Q1 can be achieved manually by Fredo's thrupain,t but not in the way TIG's works. when i tried my own tweaks, on a texture cylinder, the curved texture just became a mess.

      Q2 most internet finds say it is not possible, but none was using the above technique.

      thanks in advance

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

        Q1: The trouble with curved surfaces is the mesh complexity. If the curved surface is based on quads, then it's much more feasible.

        Q2: I should think so... ...though I'm not sure how you calculate this...

        Q3: You want to prompt the user for a colour? Unfortunately not any API calls for that.

        Q4: The current API - no. But it would be a great feature though.

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

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          @cadfather said:

          Q3 - activate the color picker without calling the paint bucket. just like when on pc i click on the icon on the mat browser.

          On PC I have done this using an special integer for Sketchup.send_action() ...
          ... BUT that dialog is not yet setup to return a value to Ruby.

          😒

          I'm not here much anymore.

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

            Thanks, so Q4 out of the question for the foreseeable (probably long) future, while there is gradual hope for the others. not too bad.

            one more Q1 question - insane, but if SU allowed one to fix the texture in coordinates apart from the face... in other words move the face while the texture stays fixed.

            re Q3, i was thinking of getting some winscript to key the 'alt' down while on paint - since that tiny icon in the browser just can't be accessed(!), maybe i can trick it. it may be useful for example when i've got vray mat editor + mat browser opening up all the time and i have to constantly shift between paint and select.

            1 Reply Last reply Reply Quote 0
            • Dan RathbunD Offline
              Dan Rathbun
              last edited by

              @cadfather said:

              Q2 - change the sun position/time by drawing a vector (line).

              Yes I know how to do this .. it was on my "todo" list. Have not gotten to it yet.

              I'm not here much anymore.

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

                @cadfather said:

                re Q3, i was thinking of getting some winscript to key the 'alt' down while on paint - since that tiny icon in the browser just can't be accessed(!), maybe i can trick it. it may be useful for example when i've got vray mat editor + mat browser opening up all the time and i have to constantly shift between paint and select.

                You mean the material picker? You want to activate that?

                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

                  @ Dan - might ask some feedback on that one if i get somewhere,

                  @ Thomas - Yes, that's the one - just the color sampler without invoking the painter.

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

                    hm... not sure about that one. It doesn't appear to be a standalone tool...

                    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

                      that's right, no send.action, no shortcut, no nothing... i'll post something if i get it working (would be only on pc)

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

                        @cadfather said:

                        Q3 - activate the color picker without calling the paint bucket. just like when on pc i click on the icon on the mat browser.

                        not the same, but have you looked at this
                        http://sketchucation.com/forums/viewtopic.php?f=180&t=47808#p428608

                        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
                        • renderizaR Offline
                          renderiza
                          last edited by

                          @cadfather said:

                          Q3 - activate the color picker without calling the paint bucket. just like when on pc i click on the icon on the mat browser.

                          Apart from what was suggested here is an alternative that I am currently using for an upcoming plugin done with "jQuery"...

                          HTML5 Canvas Based Photoshop Like Color Picker

                          Photoshop Like Color Picker developed using HTML5 canvas element.

                          favicon

                          (www.jswidget.com)

                          Cheers!

                          Note: This is limited to people that have internet IE10 or newer installed. Also on html for web-dialog this needs to be put <meta http-equiv="X-UA-Compatible" content="IE=10">

                          [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                          1 Reply Last reply Reply Quote 0
                          • jiminy-billy-bobJ Offline
                            jiminy-billy-bob
                            last edited by

                            @renderiza said:

                            HTML5 Canvas Based Photoshop Like Color Picker

                            Photoshop Like Color Picker developed using HTML5 canvas element.

                            favicon

                            (www.jswidget.com)

                            Nice ! πŸ‘

                            25% off Skatter for SketchUcation Premium Members

                            1 Reply Last reply Reply Quote 0
                            • renderizaR Offline
                              renderiza
                              last edited by

                              Here is another just in case...

                              Link Preview Image
                              Farbtastic Color Picker

                              An easy-to-use, compact jQuery color picker.

                              favicon

                              Acko.net (acko.net)

                              Cheers! πŸ‘

                              [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

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

                                wow, some good stuff, but just in case it isn't clear, i'm trying to sample 'textures' under the mouse... πŸ˜‰

                                i'm sure there is some code hidden somewhere that does this - Fredo has a sampler in his thrupaint, however the code is quite complex to just isolate the block. but in fact, it doesn't have to be the material sampler it could just be 'find the texture under the mouse'.. i've been looking at 'pickhelper' (especially Thom's good 'revolting' posts on it) but it doesn't seems to contain materials in the array (that i could fathom).

                                didn't know Chris colour picker post, great implementation!

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

                                  Ah! Ok now we're getting at the core of things. This is possible though. You use the PickHelper to get the best picked face - in a custom Tool - where you can then obtain from the face entity (face.material.texture).

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

                                  1 Reply Last reply Reply Quote 0
                                  • renderizaR Offline
                                    renderiza
                                    last edited by

                                    I know you want to be able to pick from SketchUp models but maybe picking from and image you upload on web-dialog is not that bad of an idea. πŸ˜•

                                    Sorry for this sudden spam of jQuery plugins I just discover them and am little too excited. 🀣
                                    Demo: http://www.script-tutorials.com/creating-an-html5-canvas-image-color-picker/

                                    Script: http://www.script-tutorials.com/creating-an-html5-canvas-image-color-picker/

                                    Cheers!

                                    note: posted before seeing thomthom post and I think his suggestion is way better than mind...cheers!

                                    2nd note: Although don't think that will work with textures...maybe you can get average color of texture but not much else...not 100% sure though

                                    [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                                    1 Reply Last reply Reply Quote 0
                                    • renderizaR Offline
                                      renderiza
                                      last edited by

                                      Maybe when clicking on a texture where you want to sample color, start by creating a small face on that spot with script so that you can make unique and then use PickHelper to get color. πŸ˜•

                                      [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

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

                                        @thomthom said:

                                        Ah! Ok now we're getting at the core of things. This is possible though. You use the PickHelper to get the best picked face - in a custom Tool - where you can then obtain from the face entity (face.material.texture).

                                        ok, so 'best_picked' and then extract the material - i thought i was going to use 'pickhelper.all_picked' to do that, that's a start (how many years testing did you do to write all that stuff in the blog!)

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

                                          Rafael, if you don't stop posting colour pickers, i will have to rename this 'possible or impossible Jqueries'.. πŸ˜„

                                          really, the sampler idea started when i became tired of having to shift between the paint bucket only to select textures to highlight in vray. then you move around the model and you have the paint bucket active but you don't need it. i thought why not just have a picker directly to do JUST this? (this is actually part of few beta suggestions i'm sending to the Chaos guys).

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

                                            best_picked - or best_face if you want to avoid getting an edge or group or whatnot.

                                            Yea, I've spent a lot of time testing things. The API docs are much better now then in 2007 when I started, but it's still lacking details.

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

                                            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