Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography



Maxunderground news unavailable

Another naming problem/challenge? (maxscript)
show user profile  carrrottt09
Once again I have a question about appending numbers/names to objects.

The renamer tool in max can't do what I am looking to achieve.

I am trying to automate renaming the children of about 500 parents.
I would like to have each part of the group keep its current name, but be appended with the number applied at the end of the group + ## starting from 01.

For example Parent: Jabberwocky#~3020
Has 3 children:
Alice
Mad hatter
looking glass

I would like the names of the objects in the group to be:
Alice#~3020-01
Mad hatter#~3020-02
Looking glass#~3020-03

I know this numbering convention is terrible, but it is what I have to use for the programming department.

If this script can also work on Parents and their Children in the same way I would be ecstatic.

read 464 times
9/29/2011 4:07:32 PM (last edit: 9/29/2011 4:07:32 PM)
show user profile  Garp
Are all the parents already numbered?
An what with the #~ bit? Is it already appended to all the names?




read 450 times
9/29/2011 8:01:27 PM (last edit: 9/29/2011 8:01:27 PM)
show user profile  carrrottt09
All parents are already numbered and have the #~.

The ~# is something to separate comments in the file and associate different parts of the object's name with some content that the programming department uses. The # and ~ will get stripped out from an xml file and the number hidden in the final project.

I can add the #~ to all the child objects' names easily, but they currently do not have it.

I know I have some crazy requests...
Thanks.
read 433 times
9/30/2011 4:37:48 PM (last edit: 9/30/2011 4:38:52 PM)
show user profile  Garp
Do the appended numbers need to be exactly 2 digits?
What if there are 3 children? Or 300?

Also what should happen if a child has already #~ in its name? Should it be ignored? Renumbered?

And what do you mean by the script working on parents and children in the same way? You said the parents were already numbered.

Do you want the script to work from all parents in the scene or only from selected ones?




read 426 times
9/30/2011 6:21:20 PM (last edit: 9/30/2011 6:21:20 PM)
show user profile  carrrottt09
Sorry it took so long to reply:

Digits need to only go up to 3 places. So lowest is 000 to highest is 999
If the child already has the #~ it should be ignored.
The script can work only on selected objects.
read 399 times
10/6/2011 11:20:19 PM (last edit: 10/19/2011 6:12:26 PM)
show user profile  carrrottt09
EDIT:

Can this also work on objects in a group?
e.g. group number would be applied to all objects in the group that do not have the #~ in it?

There is occasionally information between the # and ~, so perhaps the script can be based off of the ~ only?

for example:
Group Name#descriptive text~234567
"ABC" an object in group
"DEF" an object in group

I would like to have the objects in the group be renamed as:
ABC#~234567-001
DEF#~234567-002
read 357 times
10/19/2011 6:12:43 PM (last edit: 10/19/2011 6:12:43 PM)
show user profile  Garp
Oh boy. This is getting messier each time around.
And you say this crappy convention comes from the programming department? Are there any programmers in it?
Maybe you should ask them if they've ever heard the expression 'data structure'.




read 352 times
10/19/2011 7:55:07 PM (last edit: 10/19/2011 7:55:07 PM)
show user profile  carrrottt09
I wish I had a better way or a great answer... At this point it is WAY too late to try and change how we are handling all this information.

The fact that things are now in groups is a hitch that someone in the 3D department that was working on this project introduced...
read 349 times
10/19/2011 7:59:06 PM (last edit: 10/19/2011 7:59:06 PM)
show user profile  carrrottt09
So, I asked one of the programmers if they had ever heard of it - figured it was the least I could do for you after all that you've helped with.

Their answer was yes.

The reason we (have) to do it this way (unless you have another idea) is that the name part of the name of the object is subject to change. By placing a unique ID# which will not change with the object in addition to its name we can refer to the objects by the ID# in the name.
This likely has to be done in Max as I am the one who is controlling/compiling/updating all the content.

Thanks.
read 332 times
10/20/2011 8:34:22 PM (last edit: 10/20/2011 8:34:22 PM)
show user profile  carrrottt09
1st question: Is there a way to PM people on here?

And... At the risk of seeming like I am spamming the forum, I wanted to see if anyone was going to give this a shot (or if I should start naming objects by hand).

I have made some progress on this script... I'll post what I sort out for a quick review.

Thanks.
read 318 times
10/21/2011 6:54:06 PM (last edit: 10/21/2011 9:39:54 PM)
#Maxforums IRC
Open chat window


Support Maxforums.org