[Plugin] Rename by Layer v1.0.3
-
Thanks Renderiza! Great work as always...I do have a possible request if there think there'd be a place for it. I usually precede my component names with symbols (like !, @, #, $, %, ^, etc) so that they show up in the order I want in the component menu. It's a little odd to get used to, but it lets me organize my components by importance and amount of detail. Would there be a possibility of appending a customizable section in front of the renaming the script does? I can give an example of a model if you like, of course.
Thanks!
-
@matt.gordon320 said:
hanks Renderiza! Great work as always...I do have a possible request if there think there'd be a place for it. I usually precede my component names with symbols (like !, @, #, $, %, ^, etc) so that they show up in the order I want in the component menu. It's a little odd to get used to, but it lets me organize my components by importance and amount of detail. Would there be a possibility of appending a customizable section in front of the renaming the script does? I can give an example of a model if you like, of course.
Thanks!
I am adding the "prefix" & "suffix" feature for the numbers. For example:
prefix = 001 - layername
suffix = layername - 001Will see how I can integrate costume prefix & suffix with a text input.
If you want to send example that will help me understand better it will be appreciated indeed. Thanks for suggestions!
Note: I have also added the filter for Active Layer and will post new update soon.
-
Rasteriza,
Your plugin does exactly what it says, (of course) however it only works on the context we are working at the model and doesn't dig deeper in the nested groups/components in the model.
This is fine and I can easily adapt to it, however, I would somehow expect that components and groups on layer 0 that were nested inside a component on layer X would be renamed after layer X. Of course that would probably be harmful for other users (maybe an option? maybe if a selection isn't active? maybe a box with ok and cancel?
Imagine the following example:
- I have a group that has all the closets of an house.
- I name it "closets" and assign it to layer closets of course
- However all components nested inside the group (the actual individual closet models) are in layer 0,
- I would love to be able to rename them all in orderly fashion without having to assign each one to a the "closets" layer. This happens to me a lot, as I only have layers for the big groups and not for every kind of subgroups/subcomponents in the project.
In a matter of fact, I actually think this is the best way to not get lost between using layers and the outliner for organizing and naming components.
I also noticed something. When renaming multiple instances of the same component, they get the name of the last instance renamed and not the first one. I take it that the plugin cycles through all components in the context, renaming them one by one.
Example:
- I am in the "doors" group and turned all door components to layer "doors"
- It has, for an example, 12 doors and all of them are instances of the same component,
- The instances will be renamed "doors - 012" as the last component will be renamed "doors - 012". The renaming is done both on the component's name and definition name, renaming all instances of the same component, that had already be renamed.
- This is a thing I'm perfectly able to live with, but doesn't feel much tidy to me. Only change it if it's easy and if the plugin keeps being fast though...
Last considerations:
-
Have you ever thought of doing a plugin exactly like this, but for groups and not layers? I feel that this is the right way to organize a sketchup model, layers should handle only visibility and I would love to have that possibility.
-
Have you thought of using the sketchup standard way of renaming instances #1 #2 #3? When creating a new door by the "make unique" context option it would follow and be door#4 and the original organization would be kept. Your naming is cleaner though so I don't know what I prefer too...
Well thank you again for your amazing work and best regards,
JQL
-
@jql said:
however, I would somehow expect that components and groups on layer 0 that were nested inside a component on layer X would be renamed after layer X.
Here is little test code that will take the subgroups that are on layer0 and name them with the parent layer name.
model = Sketchup.active_model ents = model.active_entities groups = ents.grep(Sketchup;;Group) groups.each do |group| gg = group.entities.grep(Sketchup;;Group) gg.each do |g| g.name = group.layer.name end end
Will see how this feature can be integrated in future update to existing code. Since other requests are already done maybe will go ahead and release them first and then add what we just mentioned. Thanks for suggestions!
-
Renderiza,
I wouldn't know where to insert the code you have there... Maybe I could get there by myself, but I prefer to use what you have right now as it is, and wait for further developments on the plugin.
I'm curious though: are you considering the idea of making a new plugin that would be based on groups instead of layers?
Thanks and best regards,
JQL
-
[pre:1trtoyqg]Authors:: | Bagatelo| Renderiza |
Plugin Name:: Rename by Layer
Version:: 1.0.1
Date:: 9/13/2013
Cost:: Free[/pre:1trtoyqg]
Rename by Layer v1.0.1 is now available for download. -
@jql said:
I wouldn't know where to insert the code you have there...
To test code I recommend using [as] Ruby Code Editor - http://extensions.sketchup.com/en/content/ruby-code-editor ... but there are other good ones as well.
@jql said:
I'm curious though: are you considering the idea of making a new plugin that would be based on groups instead of layers?
I am having difficulties in picturing exactly how will it work...can you give me an example to see if I understand better?
-
-
Are you real Renderiza?
Are you peeking on my shoulder and coding while I'm writing? Are you doing it right now? Yikes!
Let me test and I will answer!
Thanks,
JQL
-
Ghosteriza you uncanny coder,
I already tested it and you nailed it! The option to write a name is awesome!
The only option the plugin lacks right now could be "renaming selection only". If you manage to pull it off too, then it covers everything I need for now and in the predictable future... in terms of renaming!
There is still some room for improvement... If you are the prefectionist it seems you are, you could some how automate/facilitate the process described in the images that follow.
The idea for plugin that I was talking about before was to rename groups/components, using the name of the group/components where they are nested in. When you are working inside a group called "columns" every group component inside it would be renamed to "columns - 00n" whatever the layer they would be on.
In other words your dialog would have a logo that would say "My name is: rename by GROUP". For me it's redundant now, but I can see some uses though. Maybe create even one more option would solve it.
This would pose a new problem though... your plugin would be much more than layer based naming, and you could also want to change the name of the plugin. You have a keen sense for names/renames so I bet you can figure out something funny! An image that crosses my mind would be Swiss Army Kname...
Thanks and thanks, and get the hell out of my shoulder... It spooks me!
JQL
-
What a powerful concept! Could make me rethink the way I manage my Sketchup models...
Could the plugin be adapted to also have a filter for the active layer?
Thank you very much!
-
@jql said:
The only option the plugin lacks right now could be "renaming selection only".
Will try to add this feature for next update.
@jql said:
In other words your dialog would have a logo that would say "My name is: rename by GROUP".
Good idea indeed will see if I can work on it.
@jql said:
An image that crosses my mind would be Swiss Army Kname...
Love it!
@jql said:
However if one could somehow choose to rename/clear only instances names or definition names the job would be handled much easily.
Will see how that can be a feature for next update.
Note: By the way thanks for making me laugh!
-
[pre:m1n0fdbx]Authors:: | Bagatelo| Renderiza |
Plugin Name:: Rename by Layer
Version:: 1.0.2
Date:: 9/14/2013
Cost:: Free[/pre:m1n0fdbx]
Rename by Layer v1.0.2 is now available for download.
%(#909090)[Thanks to the people that contributed ideas to make the plugin better! ] -
Very good updates. It's almost unbelievable that something like this is not already done before.
-
great idea... really great for organizing models.
-
the window could be 80% smaller
-
You can make the content smaller by pressing ( ctrl - ). What is the resolution of your screen...can I see screen capture?
In the future maybe collapsible tabs may help but not sure.
Thanks
-
It is getting really great - BIG THANKS!!
Can We have an option to append the layer name or/and numbers to the existing component's/group's names? -
@dedmin said:
It is getting really great - BIG THANKS!!
Can We have an option to append the layer name or/and numbers to the existing component's/group's names?That is good suggestion so lets see if it can be added to next update.
-
Amazing! Really Really good. A great companion to this is "Layers Panel" - photoshop layers window with nested layers. still in Beta and some wrinkles to iron out but, Like this plugin, very impressive!!
All i could say on a negative - could we have a smaller window? it takes up alot of space and we know the name of it, if we lost the logo (sorry), at least i'd get back half my screen.
cheers for the great plugin
c
Advertisement