Did find a simple workaround.
instead of
> renSphere = sp4.getChildren()[1]

i can use
renSphere = sp4.getChildren()[1].nodeName()

But still I think it should atleast give a warning :)


On Aug 19, 10:45 pm, Red <[email protected]> wrote:
> Hello all,
>
> I think I have run into a renaming bug/problem or something similar.
>
> When trying to rename an object that has a the same name as another
> object in the scene, it results in a problem while renaming.
> For example.
>
> # create a simple hierarchy
> sp1 = sphere(name = 'childSphere')[0]
> sp2 = sphere(name = 'rootSphere')[0]
> sp2 | sp1
>
> sp3 = sphere(name = 'childSphere')[0]
> sp4 = sphere(name = 'rootSphere')[0]
> sp4 | sp3
>
> # get the child object of sphere 4
> renSphere = sp4.getChildren()[1]
> rename(sp2, 'myName_'+renSphere)
>
> # Result: nt.Transform(u'|childSphere')
>
> now the result should be myName_childSphere
> however only the renSphere variable is passed and not the string
> infront of it.
>
> I think that this should create a warning but it could also be my
> logic failing me here.
>
> Just wanted to point it out.
>
> Kind regards,
> Red

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to