wjpiovano
02-29-2008, 12:38 AM
I've been having some trouble with importing and namespaces. I have a function which imports and then deletes a couple of objects. This function is called several times, and when the same objects are re-imported, even after having been deleted, there are clashes in nodes.
So I decided to have a parameter $namespace which allows the calls to differentiate the objects imported. Only problem is, if I pass "one", then the first object will be "one:objName" but the next object I import in the function gets called "one1:obj2Name". When I try to delete these namespaces after I delete the objects, it still says "namespace not empty". So I end up having "one17:objName" or the like in later calls, and of course I can't select my object cause I don't know what namespace Maya has pulled out for it at that point.
I'm not sure what the best solution is. Should I be using namespaces at all? Is there a way to find out what namespace has been assigned to the imported object?
Thanks.
So I decided to have a parameter $namespace which allows the calls to differentiate the objects imported. Only problem is, if I pass "one", then the first object will be "one:objName" but the next object I import in the function gets called "one1:obj2Name". When I try to delete these namespaces after I delete the objects, it still says "namespace not empty". So I end up having "one17:objName" or the like in later calls, and of course I can't select my object cause I don't know what namespace Maya has pulled out for it at that point.
I'm not sure what the best solution is. Should I be using namespaces at all? Is there a way to find out what namespace has been assigned to the imported object?
Thanks.
