sketchucation logo sketchucation
    • Login
    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!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Scene rename-missing dialog box

    Scheduled Pinned Locked Moved Plugins
    7 Posts 3 Posters 411 Views 3 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.
    • jojo9J Offline
      jojo9
      last edited by

      Hi,
      i have a plugin (downloaded from ruby depot i believe) who states to rename scenes. Scenes are renamed always with prefix "scene" but thats not what i wanted.
      the script seems to use dialog boxes too, but i never got the choice to enter another scene name. Whats wrong?

      Here, the code:

      
      # mirale999 first release, with Thomthom's help.
      # Permission to use, copy, modify, and distribute this software for 
      # any purpose and without fee is hereby granted
      # Freely use
      # Name               ;          Named_Scene.rb
      # Date               ;          v1.0 11/12/6
      # Description        ;          To Let you rename it upon adding a new scene
      # Menu Item          ;          View -> Add Named Scene
      
      # It works like this ;
      # Hit the hotkey or click the menu item, give you an inputbox, you can
      # choose to give the new a unique name, Or leave it to its default and
      # create like normal; Scene 1- Scene 2- Scene 3-...
      #----------------------------------------------------------------------------
      
      require 'sketchup.rb'
      
      module Named_Scene
        
        # Add menu items.
        unless file_loaded? File;;basename(__FILE__)
          add_separator_to_menu("View")
          UI.menu("View").add_item("Add Named Scene") { self.add_namedScene }
        end
      
        @@scene_i = 1
      
        def self.add_namedScene
          model = Sketchup.active_model
          pages = model.pages    
      
          # Ask user for page name.
          list = []
          prompts = ["Scene Name;"]
          defaults = ["Scene"+" "+"#{@@scene_i}" ]
          input = UI.inputbox( prompts, defaults, list, "Add Named Scene" )
      
          # Check if the user cancelled.
          return if input==false
      
          # Get data from result array
          scene_name = input
          @@scene_i = @@scene_i + 1
      
          status = pages.add( scene_name.to_s )
        end
        
      end
      
      #-----------------------------------------------------------------------------
          file_loaded File;;basename(__FILE__)
      #-----------------------------------------------------------------------------
      
      
      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        Do you not get the input box saying 'Scene 1' etc?
        The code
        "Scene"+" "+"#{@@scene_i}"
        can be edited to say whatever default you want, perhaps
        "JoJo"+" "+"#{@@scene_i}"

        TIG

        1 Reply Last reply Reply Quote 0
        • jojo9J Offline
          jojo9
          last edited by

          Hi,
          yes, it is a way. However, scenes situations change and the need to rename them differently too. So, i wanted a dynamic way to assign names, using a dialog box.
          Nice would be too, to have the option to rename only a part of scenes, like to rename scene 1 through 4 (of 10) with a given name, followed by a numeric value in one shot.

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            Look at smustard.com... I think there's a scene-renamer ?

            TIG

            1 Reply Last reply Reply Quote 0
            • jojo9J Offline
              jojo9
              last edited by

              Hi,
              i got the plugin. I tried to:

              #1) rename tab 1 to tab 3 using the !-prefix, as the script explains.
              However, the scheme continues to extend the name convention of the first tab to all scenes, and ignores the ! in tag 4, were i wanted to start with another (the given) name scheme.

              #2) exclude tabs 4 through 10 == ex-and included scenes are renamed without distinction.

              Sum.
              Renaming with a custom name should be easy. And not via wildcards, special characters of any sort. Implicit, Intuitive methods are easy to forget and not valid for everybody.
              I'm not a 'friend' of message boxes, because they block the workflow, but sometimes they are fine. They are simple to invoke; plus renaming should help to organize and therefore limited to active scenes in my opinion.

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

                Hi, have you seen [Re]Scene? It can rename scenes and do other stuff as well. Here is link...
                http://sketchucation.com/forums/viewtopic.php?p=472206#p472206

                Also if you only want to rename just a few of your scene just uncheck "Include in animation" the ones that you don't want to rename. Hope this helps...cheers!

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

                1 Reply Last reply Reply Quote 0
                • TIGT Offline
                  TIG Moderator
                  last edited by

                  Thanks Renderiza...
                  I thought there was another tool - forgot about you 😳
                  I think yours will do what he wants...

                  PS: I have adjusted your PluginStore listing's description text to include the words 'rename' and 'reorder', so a search for scene rename will find it πŸ˜„

                  TIG

                  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