animating .obj files

Hi!

Im trying to animate .obj files with this code

from direct.actor.Actor import Actor
from direct.directbase.DirectStart import *
from direct.showbase.ShowBase import ShowBase
from direct.task import Task
from direct.interval.IntervalGlobal import Sequence
from pandac.PandaModules import Point3
from direct.showbase.InputStateGlobal import inputState
from direct.controls.GravityWalker import GravityWalker 
from direct.controls.GravityWalker import GravityWalker
from panda3d.core import CollisionTraverser,CollisionNode
from panda3d.core import CollisionHandlerQueue,CollisionRay
from panda3d.core import Vec3,Vec4,BitMask32

terr = loader.loadModel('terrain.obj')
tex = loader.loadTexture('Textures/Blocks-Items/Terrain.png')
tex1 = loader.loadTexture('Textures/Blocks-Items/TerrainV2.png')
terr.setTexture(tex)
terr.setTexture(tex1)
terr.reparentTo(render)
terr.setPos(0,0,0)
terr.setHpr(18.2,90,341.88)

#load a model with animations
panda = Actor("charactor.obj",
				{"walk": "walk_back.obj"})
tex = loader.loadTexture('tex/400th Sub Skin.png')
panda.setTexture(tex)
panda.reparentTo(render)
panda.setPos(0,0,5)
panda.setTwoSided(True)
panda.loop("walk")

I get warning character.obj is not a character
then it crashes with keyerror: ‘modelroot’

Any help is thanked!

We currently do not support converting skinned meshes from .obj files. I don’t believe that the .obj format supports this at all, but I’m not sure.