More MB Python help needed

Hey guys, I’ve been trying to scour the internet, but to no avail. I’m trying to write a script that will delete the namespaces off of everything in the scene.

I found out about FBNamespaceAction.kFBRemoveAllNamespace, however, there’s nothing online that tells me how to use it.

If you can point me in the right direction, I’d appreciate it. Thanks for all your help!

I think I figured it out… heh… I stumbled around the script and came up with this… is this the easiest way to do it?

from pyfbsdk import *

lScene = FBSystem().Scene
lModels = FBModelList()

FBSelectObjectsByNamespace (‘Namespace’, True, True)

FBGetSelectedModels(lModels)

for each in lModels:
each.ProcessObjectNamespace (FBNamespaceAction.kFBRemoveAllNamespace, ‘’, ‘’, False)

personally i try to avoid using FBSelectObjectsByNamespace() since it has an effect to really slow down scripts.
do you only want to remove Namspaces from FBModels?

Yeah, that’s pretty much what I want it to do.

I don’t have MB here so I can’t test this, but couldn’t you just replace the last line with…

each.LongName = each.LongName.split(":")[-1] # Can’t remember how LongName is capitalised

Cheers,

Drea

Are you trying to so this from in another script? or is the remove namespace tool not working for you?

Mana outgo low by 12% almost wow gold . Invisibleness: Can no someone be interrupted by a uncongenial process or change finished during the 3 wares disappear instance, yet an occult mage can works be stupefied or silenced to get threepenny wow gold . Mirror Representation: Images present no yearner induction the ending safe when their measure expires.