Scene rename-missing dialog box
-
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__) #-----------------------------------------------------------------------------
-
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}"
-
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. -
Look at smustard.com... I think there's a scene-renamer ?
-
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. -
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#p472206Also 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!
-
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
Advertisement