Ability to mass-delete certain objects

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


    • Sep 2006
    • 2846
    • .
    • General

    #1

    Ability to mass-delete certain objects

    Is there a function in TSRE to mass delete certain scenery items from all W files? Route Riter had that ability. I would hate to lean back on that. Its all about scenery, nothing track or TDB related.
    My Open Rails videos https://www.youtube.com/@lakecities3663/videos
  • scottb613
    2500 Post Veteran


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

    #2
    Hi...

    Eric's TSRE settings look promising - but I couldn't get it to work.

    Code:
    #objectsToRemove=""
    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

    • eric
      9500 Post Veteran and Administrator



      • Dec 2002
      • 9583
      • NS MP245.4 CNO&TP South District
      • English, SQL
      • General

      #3
      Yes, the "ObjectsToRemove" tag will do it. Comma separated values for the shapefile names, and yes, they have to be a static object. There should be a guardrail in the testing versions of 8.005 to prevent deleting a TrackObj. I've deleted over 100 different .S files in one pass.
      If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

      Comment

      • scottb613
        2500 Post Veteran


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

        #4
        Originally posted by eric
        Yes, the "ObjectsToRemove" tag will do it. Comma separated values for the shapefile names, and yes, they have to be a static object. There should be a guardrail in the testing versions of 8.005 to prevent deleting a TrackObj. I've deleted over 100 different .S files in one pass.
        Hi Eric,

        Very cool - I'll have to try it again.

        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

          #5
          Originally posted by eric
          Yes, the "ObjectsToRemove" tag will do it. Comma separated values for the shapefile names, and yes, they have to be a static object. There should be a guardrail in the testing versions of 8.005 to prevent deleting a TrackObj. I've deleted over 100 different .S files in one pass.
          Hi Eric,

          I tested again - placed a single "tree1.s" on the route.

          I tried to see if deleted - with and without quotes - saved the file and went back in - tree1.s still present.

          Is there any action required to initiate?

          Using version "S".

          Code:
          // FIXES
          #autoFix = false
          objectsToRemove="tree1.s"
          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

          • eric
            9500 Post Veteran and Administrator



            • Dec 2002
            • 9583
            • NS MP245.4 CNO&TP South District
            • English, SQL
            • General

            #6
            I'll check. That should work if it is uncommented.
            If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

            Comment

            • scottb613
              2500 Post Veteran


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

              #7
              Hi Eric,

              I tried one more time.

              Code:
              objectsToRemove = tree1.s
              Charlie Brown is still one happy camper.
              Image1.jpg

              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

              • eric
                9500 Post Veteran and Administrator



                • Dec 2002
                • 9583
                • NS MP245.4 CNO&TP South District
                • English, SQL
                • General

                #8
                OK, there's a dependency here. It's in my version of the Settings.txt:
                Code:
                 objectsToRemove = ""  
                 
                                // requires ListFiles and LoadAllWFiles
                                // Comma separated list of shapefiles to remove. This will only remove static items.
                Some versions of the settings might have the wrong keyword "ListAllFiles" showing instead of "ListFiles".
                If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                Comment

                • scottb613
                  2500 Post Veteran


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

                  #9
                  Hi Eric.

                  Gracias amigo.

                  And like magic - poof - it's gone.

                  Code:
                  // REMOVE FILES (Requires ListFiles and LoadAllWFiles) CSV of Static Shapes
                  loadAllWFiles = true
                  listFiles = true
                  objectsToRemove = tree1.s
                  Image1.jpg

                  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

                  • eric
                    9500 Post Veteran and Administrator



                    • Dec 2002
                    • 9583
                    • NS MP245.4 CNO&TP South District
                    • English, SQL
                    • General

                    #10
                    Yep... this had to change in v8.005 to avoid track shapes from being deleted in error.

                    I found that out the hard way because I did indeed enter in a trackshape name, and it deleted the shape leaving the TDB lines in place... now there's a check for the object type to make sure it's not a TrackObj.
                    If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                    Comment

                    Working...