sketchucation logo sketchucation
    • 登入
    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

    You are now editing multiple components

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

      This sketchyphysics model modifies the watermark text in realtime during a simulation based on user inputs....not sure if its any help for this problem: http://sketchup.google.com/3dwarehouse/details?mid=5b618d4ba6c22ca85fd35d52fb19ea9b&prevstart=0

      Just some stuff I do with Sketchup.

      1 條回覆 最後回覆 回覆 引用 0
      • T 離線
        Trogluddite
        最後由 編輯

        Hi There,
        Just wanted to say thanks, Ash, for the idea; and Dan for for the sterling work putting it into practice.
        I very often derive components in a model from other template parts, and I forget to click "make unique" about 50 times a week!
        Having a warning that pops up regardless of the 'hiding other stuff' settings is something that could save me oodles of time re-loading components or going back to previous file version.

        1 條回覆 最後回覆 回覆 引用 0
        • ashscottA 離線
          ashscott
          最後由 編輯

          That is awesome, pretty much the exact functionality I was looking for.

          Just trying to figure out how to make that text bolder...

          Just some stuff I do with Sketchup.

          1 條回覆 最後回覆 回覆 引用 0
          • ashscottA 離線
            ashscott
            最後由 編輯

            @unknownuser said:

            I forget to click "make unique" about 50 times a week!

            Tell me about it. I was certain someone must have written a script to do this but I had a browse around and it appeared they hadn't.

            Frankly, I think the lack of a warning like this plugin and the errors it causes for users (who are focusing on what they are drawing on not how many components they are messing with) is a limitation to the efficiency of sketchup as many users don't use components to their full potential because they have been burned in the past.

            When I concentrate really hard I can draw parts and assemblies with a lot more speed using components but the concentration required to keep track of what other parts I am modifying is a drain.

            I hope this enables people to get right back into using components to their full potential.

            Just some stuff I do with Sketchup.

            1 條回覆 最後回覆 回覆 引用 0
            • Dan RathbunD 離線
              Dan Rathbun
              最後由 編輯

              @ashscott said:

              This sketchyphysics model modifies the watermark text in realtime ...

              Warkmarks are images, and currently have no exposure in the API.
              They are a no go, at this time.

              Besides that example would require users to install SketchyPhysics, which has some "naughty poor programming" issues at this time. (But should be fixed soon.)

              I'm not here much anymore.

              1 條回覆 最後回覆 回覆 引用 0
              • ashscottA 離線
                ashscott
                最後由 編輯

                Has anyone else with a bit more ruby experience than me had a chance to tinker with the sketchyphysics model I linked to (above) and worked out how it modifies the watermark in real time depending on user's inputs? Is it something to do with the sketchyphysics runtime (requires sketchyphysics running?) or could it be applied to our current problem?

                Just some stuff I do with Sketchup.

                1 條回覆 最後回覆 回覆 引用 0
                • Dan RathbunD 離線
                  Dan Rathbun
                  最後由 編輯

                  Perhaps it directly manipulates an external watermark image file ?

                  I'm not here much anymore.

                  1 條回覆 最後回覆 回覆 引用 0
                  • ashscottA 離線
                    ashscott
                    最後由 編輯

                    I don't know how this works but as far as I can tell this is the line that controls it:

                    logLine "mode;" + @@hokou.to_s
                    

                    Have poked around the documentation but I'm not really sure what logLine does

                    Just some stuff I do with Sketchup.

                    1 條回覆 最後回覆 回覆 引用 0
                    • Dan RathbunD 離線
                      Dan Rathbun
                      最後由 編輯

                      it looks like a method call

                      I'm not here much anymore.

                      1 條回覆 最後回覆 回覆 引用 0
                      • ashscottA 離線
                        ashscott
                        最後由 編輯

                        Any use for the problem we have here?

                        Just some stuff I do with Sketchup.

                        1 條回覆 最後回覆 回覆 引用 0
                        • Dan RathbunD 離線
                          Dan Rathbun
                          最後由 編輯

                          I do not have the SketchyPhysics code downloaded, so I cannot look at it.

                          I'm not here much anymore.

                          1 條回覆 最後回覆 回覆 引用 0
                          • T 離線
                            Trogluddite
                            最後由 編輯

                            @dan rathbun said:

                            Perhaps it directly manipulates an external watermark image file ?

                            Interesting - just stumbled over this thread as I was wanting to do something similar - a constant tally of faces in the corner, as I'm working on some models where minimal poly count is critical.
                            I did a text search through the SketchyPhysics .rb files to see how they did it, and found an 'addWatermarkText' method.
                            Seems it's not a watermark at all, but a 'face-me' text component, loaded from a support folder, and placed using 'pickray' to find it a consistent location on screen.
                            Presumably this means that it has its position transformed whenever the view is orbited etc., though I didn't have the patience to go looking through all of the files for the method calls.

                            1 條回覆 最後回覆 回覆 引用 0
                            • ashscottA 離線
                              ashscott
                              最後由 編輯

                              Awesome sleuthing!

                              Just some stuff I do with Sketchup.

                              1 條回覆 最後回覆 回覆 引用 0
                              • Dan RathbunD 離線
                                Dan Rathbun
                                最後由 編輯

                                @trogluddite said:

                                I did a text search through the SketchyPhysics .rb files to see how they did it, and found an 'addWatermarkText' method.

                                Seems it's not a watermark at all, but a 'face-me' text component, ...

                                This is how I am currently doing it (in (WIP) Edit Mode Warning Flag v1.1.0,) using:
                                model.add_note(@note,@x,@y)
                                This above method creates a special viewport-based "face camera" Sketchup::Text object.

                                @trogluddite said:

                                ..., and placed using 'pickray' to find it a consistent location on screen.
                                Presumably this means that it has its position transformed whenever the view is orbited etc., ...

                                The view-based Text object does this automatically, but the x and y are percentages, so it can handle viewport resizing better.

                                But the main drawback is that using a Drawingelement always modifies any model file opened.

                                I CAN make a transparent window or WebDialog on PC. John (Driven) already has done work on this for the Mac.

                                I'm not here much anymore.

                                1 條回覆 最後回覆 回覆 引用 0
                                • ashscottA 離線
                                  ashscott
                                  最後由 編輯

                                  Do we have any more options with the advent of SU 2013?

                                  What can I do to help move this forward as I'm struggling with some of the documentation again - is there a way I can use pickray to position the note in the current version more accurately?

                                  Dan, what is involved in getting the transparent window or WebDialog working?

                                  Just some stuff I do with Sketchup.

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • ashscottA 離線
                                    ashscott
                                    最後由 編輯

                                    I'm trying to modify Dan's script to make this a little more lightweight and to see if I can make a UI.messagebox appear whenever I'm editing multiple components as I seem to not notice the current notification in its current form.

                                    First thing, can't we chop out anything referring to groups as groups won't modify other groups that are derived from them? Like this:

                                    if inst.is_a?(Sketchup;;Group)
                                                parent = inst.entities.parent
                                                num = parent.count_instances
                                                text = "Editing #{num} group instances"
                                                puts(text) if debug
                                    

                                    That would also save the editpath query thingamajig from having a second "if" function in it (I think)

                                    Also, in order to get the UI.messagebox I'm trying to add in something like this:

                                          parent = inst.definition
                                                num = parent.count_instances
                                                puts {UI.messagebox("Editing #{num} component instances")} if debug
                                    

                                    But that keeps breaking the script....

                                    I feel like this should be really simple and it probably is - can someone point out how I'm misusing UI.messagebox?

                                    Just some stuff I do with Sketchup.

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • Dan RathbunD 離線
                                      Dan Rathbun
                                      最後由 編輯

                                      messageboxes are modal (and it will suck to have to manually click a button each time you are editing multiple components.

                                      I'm not here much anymore.

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • Dan RathbunD 離線
                                        Dan Rathbun
                                        最後由 編輯

                                        @ashscott said:

                                        Do we have any more options with the advent of SU 2013?

                                        NO.. they did not update the API much at all.

                                        I'm not here much anymore.

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • Dan RathbunD 離線
                                          Dan Rathbun
                                          最後由 編輯

                                          @ashscott said:

                                          Dan, what is involved in getting the transparent window or WebDialog working?

                                          I would do the WebDialog first (as the transparent window would be only MSWIN.)

                                          BUT... per new policy... I am no longer doing ANY free development.

                                          Sorry guys.. but I got sick and NEED income.

                                          I'm not here much anymore.

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • ashscottA 離線
                                            ashscott
                                            最後由 編輯

                                            Hi all,

                                            We got this plugin up and running in a really functional way.

                                            EditFlag

                                            It has improved my workflow in SU immensely as I can now work with multiple component instances (using components to their full potential) without the fear of editing a bunch of components accidentally.

                                            Would love your feedback and any bug reports on this.

                                            Big shoutout to Dan Rathburn - He coded this and I highly recommend his work.

                                            Just some stuff I do with Sketchup.

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

                                            Advertisement