Change Namespace of a Reference (python)


#1

Hello Everyone,

I’m trying to modify the Namespace of a reference with python commands…

But I must admit I have no clues about how to do that in practice.

Any Idea will be welcome !
Thanks

Adrien


#2

You’ll need to get the full path of the file and then it’s namespace with the command file.

cmds.file( ‘referenceFilePath/file.ma’, e=1, namespace=‘newNameSpace’)


#3

Many thanks myara !
I didn’t know the file command. (Shame on me…) This sounds really helpfull. :thumbsup: