Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / Add Namespaces with Python
  RSS 2.0 ATOM  

Add Namespaces with Python
Rate this thread
 
32585
 
Permlink of this thread  
avatar
  • sublist
  • Posted: 29 July 2009 05:50 AM
  • Location: Germany
  • Total Posts: 57
  • Joined: 22 August 2006 02:12 AM

Found the “FBNamespaceAction” Class.

But how is the syntax to add them to object or list of objects



Replies: 1
/img/forum/dark/default_avatar.png

It’s a method on FBComponent, which nearly all objects are subclassed from.

object.ProcessObjectNamespace(FBNamespaceAction, “Namespace")

Look at the FBComponent help docs for more info and other options, depending on the FBNamespaceAction you choose.

Author: babel

Replied: 29 July 2009 06:12 AM  
avatar
  • sublist
  • Posted: 29 July 2009 09:16 AM

hmm… still confused....

what kind of object should i use to apply that method to?

<???>.ProcessObjectNamespace(FBNamespaceAction“Namespace")

i tried something like this:

selectedModels FBModelList()
FBGetSelectedModels (selectedModels
NoneTrue )

selectedModels[0]
.ProcessObjectNamespace(FBNamespaceAction"test")

still learning Mobu Python…



Replies: 1
/img/forum/dark/default_avatar.png

Close, you just need to choose one of the three enumerated FBNamespaceAction attributes:

kFBConcatNamespace
kFBReplaceNamespace
kFBRemoveAllNamespace

selectedModels[0].ProcessObjectNamespace(FBNamespaceAction.kFBConcatNamespace, “test")

Author: babel

Replied: 29 July 2009 09:24 AM  
avatar
  • sublist
  • Posted: 29 July 2009 09:35 AM

ok i see

thanks a lot!



Replies: 0