Import 3D max scene files

I have a scene file with textures on it but i can’t get it to load.
this is what i have written:

import direct.directbase.DirectStart
from pandac.PandaModules import *

from direct.task import Task
from direct.actor import Actor
from direct.interval.IntervalGlobal import *
import math

#Load the first environment model
environ = loader.loadModel(“models/Game3”)
environ.reparentTo(render)
environ.setScale(0.25,0.25,0.25)
environ.setPos(-8,42,0)

run()

I just took it from the panda program.
The 3D max scene file is in the right folder but this is what it says in the CP.

Traceback :
File my.py, line 11
environ.reparentTo(render)
AttributeError: None type object has no attribute reparent to

How do i load the file?
Thanks

It means it couldn’t find the model file, so there is no model to reparent to render.
I think the problem is that you are missing an extension in your path – please append .bam or .egg, whatever it is (like “models/Game3.bam”)

Ok thanx i updated the extention to the .dxf and th program ran. But all i see is a grey screen, as if notheing were loaded and i tried moving around with the mouse but couldn’t find anything.

here is my code

import direct.directbase.DirectStart
from direct.task import Task
from direct.actor import Actor
import math

environ = loader.loadModel(“models/Game3.dxf”)
environ.reparentTo(render)
environ.setScale(1,1,1)
environ.setPos(0,0,0)

run()

Looking through the comand prompt the only thing that looks wierd is:
aux display modules not yet loaded
and
display:gsg:glgsg(warning): 3-D textures advertised as supported by OpenGL runtime, but could not get pointers to extension functions.

Can you tell me what is wrong?
Thanks

Nothing to worry about in those warnings. They’re pretty minor.

Either your model is empty, or it is not at the origin and so you can’t see it.

Try running “pview models/Game3.dxf” to ensure that your model is not empty. Press the “c” key to center the view on your model. If that makes it appear, then your model is simply not near the origin, so when you put it onscreen your camera is not looking at it.

David

ok i did both of those things and i still get a grey screen.
So i guess this means my modle is empty?
but i can view it in 3d max and there is a whole room.

what should i do?

Maybe it didn’t convert properly, then? Examine the egg file. Do you see any and entries?

David

I can’t view the egg file, or don’t know how. Since it is a .dxf file.
Sugestions? thanks

Oh, right, sorry. Use the program dxf2egg to generate an egg file:
dxf2egg -o Game3.egg Game3.dxf
And then examine the resulting egg file. If it contains data, try pviewing the egg file. If it doesn’t contain data, then there is a problem with dxf2egg.

David

I think it’s because your camera is pointed at the center of the scene – probably inside your model. Try zooming out by dragging with the right mouse cursor.