true, but ensuring your list is sorted by length and checking that an object
exists before renaming isnt THAT ugly.

On Fri, Jan 8, 2010 at 1:23 PM, Chad Dombrova <[email protected]> wrote:

>
>  Also worth mentioning here is the strength of using the api for such
>> operations. For instance, it's straight forward to grab all of the MObjects
>> of the nodes you are working on, before renaming them. If you rename a
>> number of nodes in the same hierarchy using a mel-centric approach you need
>> to do some pretty ugly string manipulation to ensure that you don't maintain
>> a reference to a node that was renamed by your action. If you grab the
>> MObjects first, you don't have to worry about this possibility since
>> renaming an MObjects won't change its address.
>>
>
> same goes for pymel objects
>
> -chad
>
>
>
> --
> http://groups.google.com/group/python_inside_maya
>
-- 
http://groups.google.com/group/python_inside_maya

Reply via email to