Blender Addon - SCO ButtObjects

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scottb613
    2500 Post Veteran


    • Apr 2003
    • 2848
    • Downeast Maine (soon)
    • ORTS

    #1

    Blender Addon - SCO ButtObjects

    Hi Folks,


    RE: Ver 2.0.3
    https://www.trainsim.com/forums/file...leid?fid=89593
    SCO_ButtObjects.jpg



    Icon128.png

    Python Script addon - inspiration from a tool we had in 3DC - sorely needed in Blender.

    SCO ButtObjects add-on for Blender - provides tools for aligning Selected Objects to the bounds of the Active Object, the 3D Cursor, or the Origin of the Active Object. Users can align along the X, Y, or Z axis and choose to align to the Minimum, Center, or Maximum bounds, with options for Inside or Outside alignment. When "Align to Object Origin" is selected, additional tools allow copying the Active Object's Scale and Rotation to the Selected Objects. The addon also includes a Distribute function, enabling users to evenly space selected Objects along the X, Y, or Z axis when three or more Objects are selected. The addon is accessible in the Item tab of the 3D Viewport Sidebar, offering a streamlined interface for precise alignment, distribution, and property transfer.

    SCO ButtObjects (Object Alignment in Object Mode)
    • Processes Multiple Objects
    • Align To Selected Active Object
    • Align To 3D Cursor
    • Align To Selected Active Object Origin
    • Align To X, Y, or Z Axis
    • Align To Bounds Extent: Min, Ctr, or Max
    • Align To Bounds Position: Inside or Outside
    • Copy Selected Object Rotation
    • Copy Selected Object Scale
    • Equally Distribute 3 or More Objects - X, Y, or Z Axis
    ​

    Manual Installation: Install ZIP [From File].


    Location: "3D View > Sidebar > Item Tab > Object Mode"


    License: GPLv3


    Notes:
    • The addon is accessible in the Item tab of the 3D Viewport Sidebar - in Object Mode.
    • Only tested in Blender 4.0 and later.
    • Suggest you throw down a bunch of cubes, different scale, different rotation and play to see how it works.
    • Please post any problems or suggestions here.
    • I'll keep updating this thread if/when I update the addon.

    Regards,
    Scott​
    Last edited by scottb613; 12-18-2024, 07:01.
    <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models
  • pwillard
    3000 Post Veteran



    • Nov 1999
    • 3070
    • Cumming Ga
    • ORTS

    #2
    Appears to work so far in Blender 3.6 LTS release.
    http://www.railsimstuff.com
    Just Blender now, 3DCrafter only when I have to.
    Formerly The Keystone Works (All Permissions Granted)
    Things I work on: https://github.com/pwillard

    Comment

    • scottb613
      2500 Post Veteran


      • Apr 2003
      • 2848
      • Downeast Maine (soon)
      • ORTS

      #3
      Originally posted by pwillard
      Appears to work so far in Blender 3.6 LTS release.
      Hi Pete,

      Thanks for looking - glad it works. I'm testing one last release - as I wanted the tool panel it to vanish when switching to Edit Mode. I should upload it in a day or two. Other than that - I think it does all I need it to do. It will - vastly - speed my modeling efforts.

      Regards,
      Scott
      <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

      Comment

      • scottb613
        2500 Post Veteran


        • Apr 2003
        • 2848
        • Downeast Maine (soon)
        • ORTS

        #4
        Hi Folks,

        Updated Ver 2.0.0
        • Tool is not used in Edit Mode - removed addon panel while in same
        • Renamed the application - requires manual removal of old version in Blender 4.2 or later.

        Someone suggested I rename the file to help with spurious search results. I did the same with the latest fix - gotta luv the internet.
        😁

        Because I renamed it - if you installed a previous version of my addon - I'd suggest the following...

        In Blender 4.2 and later - it appears that we don't have the ability to remove packages formatted as addons - just disable them.

        I had to manually remove the folder to remove my old addon completely.

        I found mine in:
        Code:
        C:\Users\scott\AppData\Roaming\Blender Foundation\Blender\4.3\extensions\user_default\sco _butt_objects
        Just remove the entire folder "sco_butt_objects" before installing the 2.0.0 release.

        You may need to "Show Hidden Folders" on your PC to see AppData.

        Sorry for any inconvenience - I'm pretty new at Blender Python Scripting.

        Regards,
        Scott​
        ​
        Last edited by scottb613; 12-11-2024, 11:38.
        <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

        Comment

        • pwillard
          3000 Post Veteran



          • Nov 1999
          • 3070
          • Cumming Ga
          • ORTS

          #5
          In Blender 4.2 and later - it appears that we don't have the ability to remove packages formatted as addons - just disable them.

          I had to manually remove the folder to remove my old addon completely.​
          I believe this is normal behavior. Many add-on creators mention needing to remove old versions. Although some add-on developers have included an upgrade option, I'm not sure how they do it.
          http://www.railsimstuff.com
          Just Blender now, 3DCrafter only when I have to.
          Formerly The Keystone Works (All Permissions Granted)
          Things I work on: https://github.com/pwillard

          Comment

          • scottb613
            2500 Post Veteran


            • Apr 2003
            • 2848
            • Downeast Maine (soon)
            • ORTS

            #6
            Originally posted by pwillard

            I believe this is normal behavior. Many add-on creators mention needing to remove old versions. Although some add-on developers have included an upgrade option, I'm not sure how they do it.
            Hi Pete,

            Yeah - I just find it odd to remove the ability to clean house.

            My addons were named very similar - so it might be confusing to some - thought it might have been better to remove.

            Regards,
            Scott
            <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

            Comment

            • EldoradoRailroad
              Senior Member

              • May 2010
              • 212

              #7
              1) Scott, what incantation with ChatGPT was used to generate the Python script? That would be very instructive for more work in the future. I wasted a bit of time with ChatGPT with a subject that had nothing to do with Blender or Python a week ago. Did you have to create an account with ChatGPT to get the results you got to produce the "Blender Butt'er" code?

              2) I found this: https://www.blendergpt.org/ and this conversation: https://news.ycombinator.com/item?id=42398913. Is this of any interest?

              I am not looking for any sympathy here, but I am ill right now, and there are so many other more important projects that need attention that I was lucky to get a bit of train simming in, ....3 weeks ago!

              Why is it that as we get older there seems to be more and more stuff getting in the way of doing what we would rather do.....no comment.

              Steve

              Comment

              • pwillard
                3000 Post Veteran



                • Nov 1999
                • 3070
                • Cumming Ga
                • ORTS

                #8
                Scott, what incantation with ChatGPT was used to generate the Python script
                It's pretty easy to get CHATGPT to comply with your wishes, but you need to be willing to "work through" the insanity, as CHATGPT sometimes suffers from wishful thinking.

                Note: CHATGPT has a section dedicated to Python code and it is very good at understanding the Blender Python Dialect.


                My addons were named very similar - so it might be confusing to some - thought it might have been better to remove.
                This is why I mentioned the idea about MERGING add-ons into a larger OpenRailsTools addon.

                For an example of what I mean. check out HOLT TOOLS add on. https://github.com/curtisjamesholt/Holt-Tools
                http://www.railsimstuff.com
                Just Blender now, 3DCrafter only when I have to.
                Formerly The Keystone Works (All Permissions Granted)
                Things I work on: https://github.com/pwillard

                Comment

                • EldoradoRailroad
                  Senior Member

                  • May 2010
                  • 212

                  #9
                  Pete,

                  Originally posted by pwillard
                  It's pretty easy to get CHATGPT to comply with your wishes, but you need to be willing to "work through" the insanity, as CHATGPT sometimes suffers from wishful thinking.

                  Note: CHATGPT has a section dedicated to Python code and it is very good at understanding the Blender Python Dialect.
                  Not trying to be lazy here, just old and tired at times. Any examples of how to do this, that means what ChatGPT gave you and what you had to do to take the result OUT OF the insane asylum? The "conversation" that I had with ChatGPT was about ethical issues, not coding! So dunno where to start at all. Did you need to log in to ChatGPT?

                  Thanks,

                  Steve

                  Comment

                  • pwillard
                    3000 Post Veteran



                    • Nov 1999
                    • 3070
                    • Cumming Ga
                    • ORTS

                    #10
                    Probably ought to move this discussion to the Blender Coding thread. https://www.trainsim.com/forums/foru...even-openrails
                    http://www.railsimstuff.com
                    Just Blender now, 3DCrafter only when I have to.
                    Formerly The Keystone Works (All Permissions Granted)
                    Things I work on: https://github.com/pwillard

                    Comment

                    • scottb613
                      2500 Post Veteran


                      • Apr 2003
                      • 2848
                      • Downeast Maine (soon)
                      • ORTS

                      #11
                      Originally posted by EldoradoRailroad
                      1) Scott, what incantation with ChatGPT was used to generate the Python script? That would be very instructive for more work in the future. I wasted a bit of time with ChatGPT with a subject that had nothing to do with Blender or Python a week ago. Did you have to create an account with ChatGPT to get the results you got to produce the "Blender Butt'er" code?

                      2) I found this: https://www.blendergpt.org/ and this conversation: https://news.ycombinator.com/item?id=42398913. Is this of any interest?

                      I am not looking for any sympathy here, but I am ill right now, and there are so many other more important projects that need attention that I was lucky to get a bit of train simming in, ....3 weeks ago!

                      Why is it that as we get older there seems to be more and more stuff getting in the way of doing what we would rather do.....no comment.

                      Steve
                      Hi Steve,

                      Hah - it's not quite a simple thing - I've probably got over 80 hours trying to make this application and make it work well.

                      I do have a subscription with Chat GPT - so I am using 4.0.

                      The best way to do it is start with a simple task - get that working - and expand from there.

                      Sometimes Chat GPT can be so dumb - "look - I just told you how to avoid the mistake - why do you keep doing it over and over again?"... It happens often.

                      I know how to Unix Script - so - I can follow along with the code - sometimes we hit an impasse - I have to read and find the mistake - others - I'll try passing it through Bing Copilot for suggestions - - - it's a REAL process.



                      Now - I have another problem - I submitted the code to Blender and they want to include it as an official extension - they want me to create a public support page on GitHub or something - perhaps that's more than I bargained for - maybe I should tell them to forget about it?

                      Ugh...

                      Regards,
                      Scott
                      <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

                      Comment

                      • pwillard
                        3000 Post Veteran



                        • Nov 1999
                        • 3070
                        • Cumming Ga
                        • ORTS

                        #12
                        Please give GitHub a shot. It's not hard. I've been using it for years. The support page is an optional setup, but really easy.

                        Also, Chatgpt is not magical... you do have to be able to understand what its writes or has you doing and you do spend a good amount of time saying "Almost, try again with this commentary from me" and stuff like that.

                        Note: Its MUCH easier to get started with this is you are willing to look into just running simple scripts in the "scripting" tab of Blender. Creating add-ons is for the more polished solutions. For quick setups and fixes, a simple prebuilt script is fine.

                        http://www.railsimstuff.com
                        Just Blender now, 3DCrafter only when I have to.
                        Formerly The Keystone Works (All Permissions Granted)
                        Things I work on: https://github.com/pwillard

                        Comment

                        • scottb613
                          2500 Post Veteran


                          • Apr 2003
                          • 2848
                          • Downeast Maine (soon)
                          • ORTS

                          #13
                          Originally posted by pwillard
                          Please give GitHub a shot. It's not hard. I've been using it for years. The support page is an optional setup, but really easy.
                          Hi Pete,

                          Might have to pick your brain on this - if I decide to move forward.

                          Pleeeeeaaaaase...


                          Regards,
                          Scott
                          <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

                          Comment

                          • pwillard
                            3000 Post Veteran



                            • Nov 1999
                            • 3070
                            • Cumming Ga
                            • ORTS

                            #14
                            You are welcome to do so. I just had to teach my work team how to use GitHub for file management when SharePoint wasn't cutting it.


                            Note:
                            I somehow broke Blender on my PC as it has crashed about 6 times in the last 2 days... I'm doing a Blender Cleanse at the moment. I also still prefer 3.6 LTS over 4.x.
                            http://www.railsimstuff.com
                            Just Blender now, 3DCrafter only when I have to.
                            Formerly The Keystone Works (All Permissions Granted)
                            Things I work on: https://github.com/pwillard

                            Comment

                            • scottb613
                              2500 Post Veteran


                              • Apr 2003
                              • 2848
                              • Downeast Maine (soon)
                              • ORTS

                              #15
                              Hi Pete,

                              Thanks - will do.


                              I have an odd issue that seems to have started during the same time I started on 4.3 - Windows Explorer - kind off breaks - I can't open images in any folder - says something like "application error" - if the images are on my desktop or moved to my desktop - they work fine. If I restart Windows Explorer everything returns to normal. I'm using Blender all the time lately - so - it may just be an coincidence and unrelated to Blender.

                              Regards,
                              Scott
                              <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

                              Comment

                              Working...