|
I have a base character set up in a scene that we use for all our animations… When merging in a second character - I try to add an incrememted namespace - but it seems to hold any other namespaces used previously somewhere in the memory...? so I end up with:
charNamespace01:
charNamespace05:
charNamespace06:
and so on…
charNamespace02, 03 and 04 have been used before during the setup process and it remembers them in the setup file - How do I get rid of them...!!??
Any help appreciated.
T
|
|
|
|
I have had similar issues with loading and unloading assets using namespaces. Motionbuilder tends to leave things behind in the scene with that namespace on when you delete the character. It is also very finicky with deletion via script and tends to crash a lot if you dont get the order of deletion right.
The workflow that worked for me in the end is as follows.
-Delete character definition. This needs to be removed first. If you delete the nodes associated with the character first, MB will crash.
-Delete the hierarchy for the character in the scene. Make sure to reverse up the hierarchy when deleting else MB will crash. A simple recursive function will do this. In fact I think there is a sample file that does this. Don’t remember the name though.
-Finally, do a sweep through all components in the scene and delete by matching the name. Make sure to try and delete rather than strait delete else MB will crash. Something like this
deleteList = [] for lComp in FBSystem().Scene.Components:
if nameToRemove in lComp.LongName:
deleteList.append(lComp)
for node in deleteList:
try:
node.FBDelete()
except:
pass
That should clear out any traces of the namespace. Hope it helps.
|
|
|