News:

 

Topic: Batch rename  (Read 5648 times)

0 Members and 1 Guest are viewing this topic.

  • No avatar
  • Posts: 976
  • Polygon
September 16, 2015, 02:52:57 pm
Hello IStonia. Would you consider adding a batch rename tool when you have some time? For renaming multiple selections according to a specified pattern (and auto counter).

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
September 16, 2015, 06:49:24 pm
Can you give me samples about patterns and counter?

  • No avatar
  • Posts: 976
  • Polygon
September 16, 2015, 08:26:47 pm
Hi IStonia.
It doesn't even have to use patterns. It could be something like this:


  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
September 19, 2015, 09:05:08 am

  • No avatar
  • Posts: 976
  • Polygon
September 19, 2015, 03:03:05 pm
Fantastic! Thank you.  ;D

I performed some tests and it works great, but I also found two problems:
1. Counter padding doesn't seem to work.
2. Search and Replace: if you leave Replace field blank, an error will pop up: "Input name incorrect". This prevents from deleting substrings. For example, if you want to remove "my" from "myObject", it's not possible

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
September 19, 2015, 06:35:04 pm
How is padding supposed to work?

  • No avatar
  • Posts: 976
  • Polygon
September 19, 2015, 07:36:13 pm
It's the number of zeroes before the counter. For example:

You want to rename 100 objects to "object"
If you start the counter at 1 and set the padding to 2, you'll get:
Code: [Select]
object001
object002
...
object009
object010
...
object099
object100
If you set the padding to 1, you'll get:
Code: [Select]
object01
object02
...
object09
object10
...
object99
object100
Padding of 0:
Code: [Select]
object1
object2
...
object10
...
object99
object100
etc.

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
September 19, 2015, 09:29:46 pm
Try this
http://www.digitalfossils.com/Download/NVil-Sep-20-15.rar

Padding will be increased automatically if the set value is too small.

  • No avatar
  • Posts: 976
  • Polygon
September 19, 2015, 11:34:51 pm
IStonia, this is nearly perfect.
Can you make the padding optional? Some 3D applications or scripts written for them expect a very specific object name patterns. Some don't like zeroes before the counter.
Also, could you please add TAB support to jump between the input fields and make the Batch Renamer remember last typed values so that when we reopen the renamer they will show up?
Thanks!

P.S. If I may make one more suggestion, I think the default value for Start at should be 1.
P.P.S. There's a typo in renamer's window title: "Batch Remane".

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
September 20, 2015, 12:11:47 am
Can you give me pattern examples?

  • No avatar
  • Posts: 976
  • Polygon
September 20, 2015, 01:04:06 am
Sorry, my post was a little bit cryptic. It's late here and I'm after a whole day of work.
What I meant is to be able to choose between counter with padding and without:
Code: [Select]
object1
object2
...
object10
object11
Or
Code: [Select]
object01
object02
...
object10
etc.
Some 3D programs use counters without padding, but on the other hand counters with padding are in a more human readable form when you look at dozens of objects in the app's equivalent of Nvil's scene explorer. Plus some programs or scripts might have trouble processing multiple selection of objects with padding in their counters. There are also some pipelines that enforce the use of certain naming conventions (they might require padding or not). Hence I think the freedom of choice between applying padding or not is necessary here.

At the moment you have set the lower limit of padding to 1, meaning that there is always one zero added in front of the counter (if, for example, you're renaming at least 10 objects and start from 1).
If you could lower the limit to 0 (preferably) or add a checkbox that when unchecked would prevent the renamer from adding the padding, then it would be perfect. :)

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
September 20, 2015, 10:29:43 am

  • No avatar
  • Posts: 976
  • Polygon
September 20, 2015, 11:34:48 am
Beautiful. Works like a charm. :D
This will help A LOT when working with assets consisting of many objects. It's a very important feature.

Thank you!!!

  • No avatar
  • Posts: 976
  • Polygon
October 25, 2015, 10:24:07 pm
IStonia, you can't imagine how much time this feature saves. I'm very grateful for it. :D
Thanks again!