How to export object data from a linked object?

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

el_filipe
Posts: 2
Joined: Tue Aug 07, 2012 4:18 pm

How to export object data from a linked object?

Postby el_filipe » Tue Aug 07, 2012 4:23 pm

hello
I have a scene where I added "Group Instance".
These "Group Instance" are Link (not Append) from a Library .blend file.

My problem is: in my python script, these instances are EMPTY types.
This comes as no surprise given that liked object are not mesh

but, how to get their data anyway?

merci beaucoup!

CoDEmanX
Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Thu Aug 09, 2012 12:15 am

i'm not sure if this is what you are looking for but...

there is a "Make duplicates real" function, to turn dupli stuff into real meshes.
I'm sitting, waiting, wishing, building Blender in superstition...

el_filipe
Posts: 2
Joined: Tue Aug 07, 2012 4:18 pm

Postby el_filipe » Thu Aug 09, 2012 1:29 pm

hello CoDEmanX, no i whant do this methode

recently i try somethings like this:

Code: Select all

bScene = context.scene
for bObject in bScene.objects:
   print( bObject.type ) # show> EMPTY
   pprint.pprint( bObject ) # show> bpy.data.objects['myLikedObj']
   bObject.dupli_list_create(bScene)
   bObject.to_mesh(self.gBScene, True, 'PREVIEW')

unfortunately to_mesh() return me RuntimeError: Error: Object does not have geometry data


Return to “Python”

Who is online

Users browsing this forum: No registered users and 1 guest