out of interest I looked @ how easy it would be for me to fix.
# fix..
def getParent(self):
if (str(self)!=":"):
return self.__class__(self.splitAll()[:-1][0])
Time to put some research into git...
On Tue, May 18, 2010 at 4:03 PM, MarkJ <[email protected]> wrote:
> I'm in the process of writing a NestedNamespace management tool to try
> and clean up some of the namespace hell that the animators are facing
> importing multiple ref anim sequences. Basically I'm iterating over
> the root namespace then through each child and their subchildren to
> see if it's safe to bump up to root and remove. I'm wondering if
> anybody has used the NameSpace class in PyMel and faced any issues.
> This might just be the way I'm doing this but I get errors if I try to
> use the getParent() func.
>
> Lets say I'm in the child NS :Sphere as in Anim:Ball:Sphere:Rig_01 ,
> iterating over the return from :
>
> ns=pCore.listNamespaces(current)
>
> Am I right to think I should be able to use the ns[i].getParent() to
> give me the parent namespace, if so it always errors out. It really is
> about time the Autodesk added some more useable functions to manage
> namespaces, the current namespace and namespaceInfo cmds are really
> lacking.
>
> thanks
>
> Mark
>
> --
> http://groups.google.com/group/python_inside_maya
>
--
David Moulder
http://www.google.com/profiles/squish3d
--
http://groups.google.com/group/python_inside_maya