Previous Thread  Next Thread

chat icon Missing function???

Hqpsy

Posted: Sun May 25, 2003 12:08 am
Joined: 24 May 2003
Posts: 14
I'm trying to write an exporter for Blender.

This is pretty much the first week I'm trying Blender.


However, here is my problem:

I'm going through all objects in the scene and I just want to
export meshes, not lamps or cameras.

so I wrote:
for obj in self.scene.getChildre():
self.ExportData(obj)

But I want to check if obj is a mesh first. In the old API you could write Blender.IsMesh(obj) but it's not possible in 2.27, I get an error Sad

Is there any other way?
Reply with quote


ray_theray

Posted: Sun May 25, 2003 1:41 am
Joined: 16 Oct 2002
Posts: 47
Use this:
Code:
for obj in Blender.Object.Get():
     if obj.getType == "Mesh":
          #do whatever...

_________________
-ray_theray
Reply with quote


Hqpsy

Posted: Sun May 25, 2003 9:19 am
Joined: 24 May 2003
Posts: 14
Ohh.. thx!!!
Reply with quote


ray_theray

Posted: Sun May 25, 2003 11:17 pm
Joined: 16 Oct 2002
Posts: 47
Wait... It should be:
Code:
if object.getType() == "Mesh":

_________________
-ray_theray
Reply with quote


Hqpsy

Posted: Tue May 27, 2003 1:12 pm
Joined: 24 May 2003
Posts: 14
The first thing you wrote works fine, thx
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group