Listing Actor Bones before use of eggtoChar

Hello All,

I need a little advice on this point:
I want to plug a button in the SceneEditor to help the use of eggtochar.

Idea is the following:
First user select a .X file which has not been yet converted with the -a options
Then panda load the file, list all bones , show the list to enduser that select the bones he want to expose or control
Then user click “Go” and panda launch the eggtochar utility with the -a option and the new hierarchy to be exposed/controled to create a eggmodel (or several if user selected batch apply)
(usefull if you made one skeleton file and several animation file for the
same actor)

In this case two questions:

  1. is there a way to list bones when you load a x file without loading it as an actor ? (assuming file is a perfect actor file with bones and animation)
  2. is there a recommended way to plug such an button in the scene editor?

Try this for listing all the joints in a model:

def buildJointList(list, part):
    for i in range(part.getNumChildren()):
        child = part.getChild(i)
        buildJointList(list, child)

model = loader.loadModel('myAnimatedModel.egg')
charNode = model.find('**/+Character').node()
bundle = charNode.getBundle()

joints = []
buildJointList(joints, bundle)
print joints

I can’t answer the SceneEditor question; maybe some at ETC can address that one?